DD.WellWorkover.Cloud/AsbCloudDb/Model/UserRole.cs

29 lines
739 B
C#
Raw Normal View History

using Microsoft.EntityFrameworkCore;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace AsbCloudDb.Model
{
[Table("t_user_role"), Comment("Роли пользователей в системе")]
2021-04-07 18:01:56 +05:00
public class UserRole : IId
{
public UserRole()
{
Users = new HashSet<User>();
}
[Key]
[Column("id")]
public int Id { get; set; }
[Column("caption"), Comment("Название")]
[StringLength(255)]
public string Caption { get; set; }
[InverseProperty(nameof(User.Role))]
public virtual ICollection<User> Users { get; set; }
}
}