using Infrastructure.Application; using IoT.Shared.Application.Domain.Entities; using System; using System.ComponentModel.DataAnnotations; using UoN.ExpressiveAnnotations.NetCore.Attributes; namespace Platform.Application.Models { [Display(Name = "机构用户")] public class EditOrganUserModel : EditModel { [Display(Name = "机构")] [ReadOnlyForEdit] [AjaxSelect("GetOrgan", "Ajax", "IoTCenter")] [Required] public Guid? OrganId { get; set; } [Display(Name = "用户")] [ReadOnlyForEdit] [AjaxSelect("GetUser", "Ajax", "IoTCenter")] [Required] public Guid? UserId { get; set; } [Display(Name = "类型")] [DataType("SelectList")] [Required] public OrganUserType? Type { get; set; } [Display(Name = "自定义类型")] [RequiredIf("Type==1000", ErrorMessage = "类型为自定时必须填写此字段")] public string CustomType { get; set; } [Display(Name = "默认机构")] public bool? IsDefault { get; set; } } }