2022-07-27 18:14:07 +05:00
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
using System;
|
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
2022-08-09 15:59:40 +05:00
|
|
|
|
using System.Text.Json;
|
2022-07-27 18:14:07 +05:00
|
|
|
|
|
|
|
|
|
namespace AsbCloudDb.Model
|
|
|
|
|
{
|
|
|
|
|
[Table("t_user_settings"), Comment("настройки интерфейса пользователя")]
|
|
|
|
|
public class UserSetting
|
|
|
|
|
{
|
2022-07-28 10:37:05 +05:00
|
|
|
|
[Column("id_user")]
|
2022-07-27 18:14:07 +05:00
|
|
|
|
public int IdUser { get; set; }
|
|
|
|
|
|
|
|
|
|
[Column("key"), Comment("Ключ настроек пользователя"), StringLength(255)]
|
|
|
|
|
public string Key { get; set; } = null!;
|
|
|
|
|
|
|
|
|
|
[Column("setting_value", TypeName = "jsonb"), Comment("Значение настроек пользователя")]
|
2022-08-09 15:59:40 +05:00
|
|
|
|
public JsonDocument? Value { get; set; }
|
2022-07-27 18:14:07 +05:00
|
|
|
|
|
|
|
|
|
[ForeignKey(nameof(IdUser))]
|
|
|
|
|
public User User { get; set; } = null!;
|
|
|
|
|
}
|
|
|
|
|
}
|