forked from ddrilling/AsbCloudServer
26 lines
888 B
C#
26 lines
888 B
C#
using Microsoft.EntityFrameworkCore;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
namespace AsbCloudDb.Model
|
|
{
|
|
[Table("t_permission"), Comment("Разрешения на доступ к данным")]
|
|
public class Permission : IId
|
|
{
|
|
[Key]
|
|
[Column("id")]
|
|
public int Id { get; set; }
|
|
|
|
[Column("name"), Comment("Название")]
|
|
[StringLength(255)]
|
|
public string Name { get; set; } = null!;
|
|
|
|
[Column("description"), Comment("Краткое описание")]
|
|
[StringLength(255)]
|
|
public string? Description { get; set; }
|
|
|
|
[InverseProperty(nameof(RelationUserRolePermission.Permission))]
|
|
public virtual ICollection<RelationUserRolePermission> RelationUserRolePermissions { get; set; } = null!;
|
|
}
|
|
} |