feat 数据权限
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Dlhis.Entity.Sys.Enums;
|
||||
|
||||
namespace Dlhis.Sys.DataPermission.Request;
|
||||
|
||||
public class DataPermissionSaveRequest : IValidatableObject
|
||||
{
|
||||
[Required]
|
||||
public string AssignValue { get; set; }
|
||||
|
||||
[EnumDataType(typeof(DeviceAssignmentTypeEnumType))]
|
||||
public DeviceAssignmentTypeEnumType UniqueType { get; set; }
|
||||
|
||||
public List<Guid> Codes { get; set; } = new();
|
||||
|
||||
|
||||
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
|
||||
{
|
||||
if (UniqueType == DeviceAssignmentTypeEnumType.BusinessPlace)
|
||||
{
|
||||
yield return new ValidationResult("不支持营业点分配", new[] { nameof(UniqueType) });
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user