52 lines
1.0 KiB
C#
52 lines
1.0 KiB
C#
using System.ComponentModel;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
namespace BaseOUDAL
|
|
{
|
|
public class Role : IDataTrace
|
|
{
|
|
/// <summary>
|
|
/// 岗位Json
|
|
/// </summary>
|
|
public string Position { get; set; }
|
|
public int Id { get; set; }
|
|
|
|
[Required]
|
|
[MaxLength(50)]
|
|
[DisplayName("名称")]
|
|
public string Name { get; set; }
|
|
|
|
[MaxLength(50)]
|
|
[DisplayName("备注")]
|
|
public string Remark { get; set; }
|
|
|
|
[DisplayName("操作时间")]
|
|
public DateTime? OptDate { get; set; }
|
|
|
|
public Role()
|
|
{
|
|
Remark = "";
|
|
}
|
|
|
|
public string GetDataTraceKeyInfo()
|
|
{
|
|
return "角色:" + Name;
|
|
}
|
|
}
|
|
|
|
[NotMapped]
|
|
public class RoleDto : Role
|
|
{
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public int RoleUserCount { get; set; }
|
|
}
|
|
|
|
public class RolePosition
|
|
{
|
|
public string Name { get; set; }
|
|
}
|
|
}
|