using System.ComponentModel.DataAnnotations;
using TrackCenter.Application.Dtos.Warning.DataAnnotations;
namespace TrackCenter.Application.Dtos.Warning;
///
/// 更新或者新增预警规则主体
///
public class UpsertWarningRuleInput
{
///
/// 唯一id(传0视为新增)
///
public int Id { get; set; }
///
/// 应用
///
[IdRequired]
public string AppKey { get; set; } //应用
///
/// 客户
///
[IdRequired]
public string Customer { get; set; } //客户
///
/// 预警规则名称
///
[Required]
public string Name { get; set; }
///
/// 是否启用
///
[Required]
public bool IsEnabled { get; set; }
///
/// 预警类型,1:运输时效,2:回传时效,3:完整预警
///
[Range(1, 3, ErrorMessage = "预警类型只能选取以下值,1:运输时效,2:回传时效,3:完整预警")]
public int WarningType { get; set; }
}