You can not 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.2 KiB
42 lines
1.2 KiB
using Infrastructure.Application;
|
|
using IoT.Shared.Application.Domain.Entities;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using UoN.ExpressiveAnnotations.NetCore.Attributes;
|
|
|
|
namespace Platform.Application.Models
|
|
{
|
|
[Display(Name = "机构用户")]
|
|
public class EditOrganUserModel : EditModel
|
|
{
|
|
[Display(Name = "机构")]
|
|
[SelectList]
|
|
[ReadOnlyForEdit]
|
|
[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; }
|
|
|
|
[Display(Name = "角色")]
|
|
[MultiSelectList]
|
|
public List<Guid> Roles { get; set; } = new List<Guid>();
|
|
}
|
|
}
|