forked from ddrilling/AsbCloudServer
29 lines
1.0 KiB
C#
29 lines
1.0 KiB
C#
using Microsoft.EntityFrameworkCore;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
namespace AsbCloudDb.Model
|
|
{
|
|
[Table("t_permission_info"), Comment("Разрешения на доступ к данным")]
|
|
public class PermissionInfo : IId
|
|
{
|
|
[Key]
|
|
[Column("id")]
|
|
public int Id { get; set; }
|
|
|
|
[Column("name"), Comment("Название")]
|
|
[StringLength(255)]
|
|
public string Name { get; set; }
|
|
|
|
[Column("description"), Comment("Краткое описание")]
|
|
[StringLength(255)]
|
|
public string Description { get; set; }
|
|
|
|
[Column("bit_description", TypeName = "jsonb"), Comment("Описание каждого бита разрешений")]
|
|
public IDictionary<int, string> BitDescription { get; set; }
|
|
|
|
[InverseProperty(nameof(Permission.PermissionInfo))]
|
|
public virtual ICollection<Permission> Permissions { get; set; }
|
|
}
|
|
} |