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/Platform/Application/Models/EditIoTTimerModel.cs

41 lines
1.3 KiB

using Infrastructure.Application;
using Microsoft.AspNetCore.Mvc;
using Platform.Areas.IoTCenter.Controllers;
using System;
using System.ComponentModel.DataAnnotations;
namespace Platform.Application.Models
{
[Display(Name = "平台定时器")]
public class EditIoTTimerModel : EditModel
{
[Display(Name = "机构")]
[SelectList(nameof(BuildingId), nameof(AjaxController.GetBuilding))]
[ReadOnlyForEdit]
public Guid? OrganId { get; set; }
[Display(Name = "场景建筑")]
[SelectList(nameof(IoTSceneId), nameof(AjaxController.GetIoTScene))]
[ReadOnlyForEdit]
public Guid? BuildingId { get; set; }
[Display(Name = "机构场景")]
[SelectList]
[Required(ErrorMessage = nameof(RequiredAttribute))]
public Guid? IoTSceneId { get; set; }
[Display(Name = "定时器名称")]
[MaxLength(24, ErrorMessage = "{0}最大长度为{1}")]
public string Name { get; set; }
[Display(Name = "定时器规则")]
[UIHint("Cron")]
[Remote(nameof(AjaxController.CronValid), "Ajax","")]
[Required(ErrorMessage = nameof(RequiredAttribute))]
public string Cron { get; set; }
[Display(Name = "禁用")]
public bool? Disabled { get; set; }
}
}