fix 查询人员权限
This commit is contained in:
@@ -1,45 +1,14 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Dlhis.Entity.Device.Enums;
|
||||
using Dlhis.Entity.Sys.Enums;
|
||||
namespace Dlhis.Basic.Device.Request;
|
||||
|
||||
namespace Dlhis.Basic.Device.Request;
|
||||
|
||||
public class DevicePermissionsAssignToDeviceRequest : IValidatableObject
|
||||
public class DevicePermissionsAssignToDeviceRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 分配类型
|
||||
/// </summary>
|
||||
public DeviceAssignmentTypeEnumType UniqueType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 分配值
|
||||
/// </summary>
|
||||
public Guid UniqueValue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 来源
|
||||
/// </summary>
|
||||
public AssignTypeEnumType AssignType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 来源值
|
||||
/// </summary>
|
||||
public List<string> Values { get; set; }
|
||||
|
||||
|
||||
[EnumDataType(typeof(DeviceTypeEnumType))]
|
||||
public DeviceTypeEnumType Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 只删除权限
|
||||
/// </summary>
|
||||
public bool IsDelete { get; set; }
|
||||
|
||||
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
|
||||
{
|
||||
if (AssignType != AssignTypeEnumType.User)
|
||||
{
|
||||
yield return new ValidationResult("仅支持导入档案人员", new[] { nameof(AssignType) });
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user