track/src/TrackCenter.Application/Dtos/Warning/UpsertWarningRuleInput.cs
2025-08-05 10:41:46 +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 TrackCenter.Application.Dtos.Warning.DataAnnotations;
namespace TrackCenter.Application.Dtos.Warning;
/// <summary>
/// 更新或者新增预警规则主体
/// </summary>
public class UpsertWarningRuleInput
{
/// <summary>
/// 唯一id(传0视为新增)
/// </summary>
public int Id { get; set; }
/// <summary>
/// 应用
/// </summary>
[IdRequired]
public string AppKey { get; set; } //应用
/// <summary>
/// 客户
/// </summary>
[IdRequired]
public string Customer { get; set; } //客户
/// <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; }
}