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.
47 lines
1.5 KiB
47 lines
1.5 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 EditBuildingModel : EditModel
|
|
{
|
|
[DataType("SelectList")]
|
|
[Display(Name = "机构")]
|
|
public Guid? OrganId { get; set; }
|
|
|
|
[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 BuildingType? 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; }
|
|
|
|
[Display(Name = "网关")]
|
|
[DataType("MultiSelectList")]
|
|
public List<Guid> IoTGateways { get; set; } = new List<Guid>();
|
|
}
|
|
}
|