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.3 KiB
42 lines
1.3 KiB
using Infrastructure.Application;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using System;
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace Application.Models
|
|
{
|
|
[Display(Name = "触发器")]
|
|
public class EditTiggerModel : EditModel
|
|
{
|
|
[Display(Name = "触发器名称")]
|
|
[Required(ErrorMessage = nameof(RequiredAttribute))]
|
|
public string Name { get; set; }
|
|
|
|
[Display(Name = "触发规则")]
|
|
[Remote("ConditionValid", "Ajax", "Admin", AdditionalFields = "DataId")]
|
|
[Required(ErrorMessage = nameof(RequiredAttribute))]
|
|
public string Condition { get; set; }
|
|
|
|
[Display(Name = "禁用")]
|
|
public bool Disabled { get; set; }
|
|
|
|
[DataType("SelectList")]
|
|
[Display(Name = "节点")]
|
|
[Required(ErrorMessage = nameof(RequiredAttribute))]
|
|
public Guid? NodeId { 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; }
|
|
|
|
[HiddenInput(DisplayValue = false)]
|
|
[ScaffoldColumn(true)]
|
|
public string NodeNumber { get; set; }
|
|
}
|
|
} |