using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Atomx.Common.Entities
{
///
/// 角色
///
[Table("Roles")]
public class Role
{
///
/// 数据ID
///
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
[Key]
public int Id { get; set; }
///
/// 角色类型
///
public int Type { get; set; }
///
/// 角色名称
///
public string Name { get; set; } = string.Empty;
///
/// 说明
///
[Column(TypeName = "varchar(255)")]
public string Description { get; set; } = string.Empty;
///
/// 权限
///
[Column(TypeName = "text")]
public string Permission { get; set; } = string.Empty;
///
/// 是否系统角色
///
public bool IsSystemRole { get; set; }
///
/// 角色用户数量
///
public int Count { get; set; }
///
/// 是否可用
///
public bool Enabled { get; set; }
///
/// 创建时间
///
[Column(TypeName = "timestamptz")]
public DateTime CreateTime { get; set; }
///
/// 更新时间
///
[Column(TypeName = "timestamptz")]
public DateTime? UpdateTime { get; set; }
}
}