80 lines
2.3 KiB
C#
80 lines
2.3 KiB
C#
using Dlhis.DataPermission.Model;
|
|
using Dlhis.Entity.Device.Enums;
|
|
using Kurisu.AspNetCore.DataAccess.Entity;
|
|
using Kurisu.AspNetCore.DataAccess.SqlSugar;
|
|
using Mapster;
|
|
using SqlSugar;
|
|
using SqlSugar.DbConvert;
|
|
|
|
namespace Dlhis.Entity.Device.Entities;
|
|
|
|
/// <summary>
|
|
/// 设备组
|
|
/// </summary>
|
|
[SugarTable(TableName = "DeviceGroup", TableDescription = "设备组")]
|
|
public class DeviceGroupEntity : SugarBaseEntity, ITenantId, ISoftDeleted
|
|
{
|
|
/// <summary>
|
|
/// 设备组功能类型
|
|
/// </summary>
|
|
[SugarColumn(IsNullable = false, ColumnDescription = "设备组功能类型", ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert))]
|
|
public DeviceTypeEnumType Type { get; set; }
|
|
|
|
/// <summary>
|
|
/// 上级设备组code
|
|
/// </summary>
|
|
[SugarColumn(IsNullable = true, ColumnDescription = "上级设备组code")]
|
|
public Guid? PCode { get; set; }
|
|
|
|
/// <summary>
|
|
/// 设备组code
|
|
/// </summary>
|
|
[DeviceGroupCode]
|
|
[AdaptIgnore(MemberSide.Destination)]
|
|
[SugarColumn(ColumnDescription = "设备组code")]
|
|
public Guid Code { get; set; }
|
|
|
|
/// <summary>
|
|
/// 设备组名称
|
|
/// </summary>
|
|
[SugarColumn(IsNullable = false, ColumnDescription = "设备组名称")]
|
|
public string Name { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
/// 是否可编辑
|
|
/// </summary>
|
|
[SugarColumn(IsNullable = false, ColumnDataType = "bit", DefaultValue = "1", ColumnDescription = "是否可编辑")]
|
|
public bool Editable { get; set; } = true;
|
|
|
|
/// <summary>
|
|
/// 可设置下级
|
|
/// </summary>
|
|
[SugarColumn(IsNullable = false, ColumnDataType = "bit", DefaultValue = "1")]
|
|
public bool AbleSetNext { get; set; } = true;
|
|
|
|
/// <summary>
|
|
/// 备注
|
|
/// </summary>
|
|
[SugarColumn(IsNullable = true)]
|
|
public string Remark { get; set; }
|
|
|
|
/// <summary>
|
|
/// 可作为预约分组
|
|
/// </summary>
|
|
[SugarColumn(IsNullable = false, ColumnDataType = "bit", DefaultValue = "0")]
|
|
public bool AsAppointment { get; set; } = false;
|
|
|
|
|
|
/// <summary>
|
|
/// 是否为出差分组
|
|
/// </summary>
|
|
[SugarColumn(IsNullable = false, ColumnDataType = "bit", DefaultValue = "0")]
|
|
public bool IsBusinessTrip { get; set; } = false;
|
|
|
|
[SugarColumn(IsNullable = true)]
|
|
public string TenantId { get; set; }
|
|
|
|
|
|
public bool IsDeleted { get; set; }
|
|
} |