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.
39 lines
1.2 KiB
39 lines
1.2 KiB
using Infrastructure.Application;
|
|
using Platform.Areas.IoTCenter.Controllers;
|
|
using System;
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace Platform.Application.Models
|
|
{
|
|
[Display(Name = "机构场景")]
|
|
public class EditIoTSceneModel : EditModel
|
|
{
|
|
[Display(Name = "机构")]
|
|
[SelectList(nameof(BuildingId), nameof(AjaxController.GetBuilding))]
|
|
[ReadOnlyForEdit]
|
|
[Required(ErrorMessage = nameof(RequiredAttribute))]
|
|
public Guid? OrganId { get; set; }
|
|
|
|
[Display(Name = "建筑")]
|
|
[SelectList]
|
|
[ReadOnlyForEdit]
|
|
[Required(ErrorMessage = nameof(RequiredAttribute))]
|
|
public Guid? BuildingId { get; set; }
|
|
|
|
[Display(Name = "场景名称")]
|
|
[MaxLength(24, ErrorMessage = "{0}最大长度为{1}")]
|
|
[Required(ErrorMessage = nameof(RequiredAttribute))]
|
|
public string Name { get; set; }
|
|
|
|
[Display(Name = "图片")]
|
|
[DataType(DataType.ImageUrl)]
|
|
[Required(ErrorMessage = nameof(RequiredAttribute))]
|
|
public string Image { get; set; } = "/images/empty.svg";
|
|
|
|
[Display(Name = "隐藏")]
|
|
public bool? Hidden { get; set; }
|
|
|
|
[Display(Name = "序号")]
|
|
public int Order { get; set; }
|
|
}
|
|
} |