You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.4 KiB
C#

using NPin.Framework.SqlSugarCore.Abstractions.Data;
using NPin.Framework.Upms.Domain.Shared.Enums;
using SqlSugar;
using Volo.Abp.Auditing;
using Volo.Abp.Domain.Entities;
namespace NPin.Framework.Upms.Domain.Entities;
[SugarTable("Role", "角色表")]
public class RoleEntity : Entity<Guid>, ISoftDelete, IAuditedObject, IOrderNum, IEnabled
{
[SugarColumn(IsPrimaryKey = true, ColumnDescription = "主键")]
public override Guid Id { get; protected set; }
[SugarColumn(ColumnDescription = "角色代码")]
public string Code { get; set; } = string.Empty;
[SugarColumn(ColumnDescription = "角色名称")]
public string Name { get; set; } = string.Empty;
[SugarColumn(ColumnDescription = "角色数据权限范围")]
public DataScopeEnum DataScope { get; set; } = DataScopeEnum.All;
[SugarColumn(ColumnDescription = "描述")]
public string? Remark { get; set; }
public bool IsDeleted { get; }
public DateTime CreationTime { get; } = DateTime.Now;
public Guid? CreatorId { get; }
public DateTime? LastModificationTime { get; }
public Guid? LastModifierId { get; }
public int OrderNum { get; set; }
public bool IsEnabled { get; set; }
#region 导航
[Navigate(typeof(RoleOrganizationEntity), nameof(RoleOrganizationEntity.RoleId),
nameof(RoleOrganizationEntity.OrgId))]
public List<OrganizationEntity> OrganizationList { get; set; }
#endregion
}