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.
38 lines
1.2 KiB
38 lines
1.2 KiB
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 EditAreaModel : EditModel
|
|
{
|
|
[Display(Name = "名称")]
|
|
[MaxLength(24, ErrorMessage = "{0}最大长度为{1}")]
|
|
[Required(ErrorMessage = nameof(RequiredAttribute))]
|
|
public string Name { get; set; }
|
|
|
|
[Display(Name = "编号")]
|
|
[Required(ErrorMessage = nameof(RequiredAttribute))]
|
|
public string Number { get; set; }
|
|
|
|
[Display(Name = "类型")]
|
|
[DataType("SelectList")]
|
|
[Required(ErrorMessage = nameof(RequiredAttribute))]
|
|
public AreaType? Type { get; set; }
|
|
|
|
[Display(Name = "自定义类型")]
|
|
[RequiredIf("Type==1000", ErrorMessage = "类型为自定时必须填写此字段")]
|
|
public string CustomType { get; set; }
|
|
|
|
[Display(Name = "上级")]
|
|
[DataType("SelectList")]
|
|
public Guid? ParentId { get; set; }
|
|
|
|
[Display(Name = "序号")]
|
|
public int DisplayOrder { get; set; }
|
|
}
|
|
}
|