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.
iot/projects/IoTCenter/Application/Models/EditGlobalSceneTiggerModel.cs

45 lines
1.5 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

using Infrastructure.Application;
using Microsoft.AspNetCore.Mvc;
using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
namespace IoTCenter.Application.Models
{
[Display(Name = "平台触发器")]
public class EditGlobalSceneTiggerModel : EditModel
{
[DataType("SelectList")]
[Display(Name = "平台场景")]
[Required(ErrorMessage = nameof(RequiredAttribute))]
public Guid SceneId { get; set; }
[Display(Name = "触发器名称")]
[MaxLength(24, ErrorMessage = "{0}最大长度为{1}")]
public string Name { get; set; }
[DataType("SelectList")]
[Display(Name = "设备节点")]
[Required(ErrorMessage = nameof(RequiredAttribute))]
public Guid? DeviceNodeId { get; set; }
[DataType("SelectList")]
[Display(Name = "设备")]
[Required(ErrorMessage = nameof(RequiredAttribute))]
public Guid? DeviceId { get; set; }
[DataType("SelectList")]
[Display(Name = "数据")]
[Required(ErrorMessage = nameof(RequiredAttribute))]
public Guid? DataId { get; set; }
[Display(Name = "触发规则")]
[Description("javascript逻辑运算表达式如value>250或value==\"开\"")]
[Remote("ConditionValid", "Ajax", "Admin", AdditionalFields = "DataId")]
[Required(ErrorMessage = nameof(RequiredAttribute))]
public string Condition { get; set; }
[Display(Name = "禁用")]
public bool Disabled { get; set; }
}
}