DD.WellWorkover.Cloud/AsbCloudDb/Model/UserRole.cs
2021-04-02 17:28:07 +05:00

29 lines
733 B
C#

using Microsoft.EntityFrameworkCore;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace AsbCloudDb.Model
{
[Table("t_user_role"), Comment("Роли пользователей в системе")]
public class UserRole
{
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; }
}
}