track/src/SJZY.Track.Application.Contract/Dtos/Warning/UpsertWarningRuleInput.cs
2025-03-05 10:46:13 +08:00

46 lines
1.0 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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