114 lines
3.8 KiB
C#
114 lines
3.8 KiB
C#
using System;
|
||
using System.Collections.Generic;
|
||
using System.ComponentModel.DataAnnotations;
|
||
using YunDa.SOMS.Entities.DataMonitoring;
|
||
|
||
namespace YunDa.SOMS.DataTransferObject.DataMonitoring.SecondaryCircuitInspection
|
||
{
|
||
/// <summary>
|
||
/// 二次回路巡检计划创建输入DTO
|
||
/// </summary>
|
||
public class SecondaryCircuitInspectionPlanCreateInput
|
||
{
|
||
/// <summary>
|
||
/// 计划名称
|
||
/// </summary>
|
||
[Required(ErrorMessage = "计划名称不能为空")]
|
||
[StringLength(200, ErrorMessage = "计划名称长度不能超过200个字符")]
|
||
public string Name { get; set; }
|
||
|
||
/// <summary>
|
||
/// 计划描述
|
||
/// </summary>
|
||
[StringLength(1000, ErrorMessage = "计划描述长度不能超过1000个字符")]
|
||
public string Description { get; set; }
|
||
|
||
/// <summary>
|
||
/// 变电站ID
|
||
/// </summary>
|
||
[Required(ErrorMessage = "变电站ID不能为空")]
|
||
public Guid TransformerSubstationId { get; set; }
|
||
|
||
/// <summary>
|
||
/// 巡检计划类型
|
||
/// </summary>
|
||
[Required(ErrorMessage = "巡检计划类型不能为空")]
|
||
public SecondaryCircuitInspectionPlanType PlanType { get; set; }
|
||
|
||
/// <summary>
|
||
/// 巡检优先级
|
||
/// </summary>
|
||
[Required(ErrorMessage = "巡检优先级不能为空")]
|
||
public SecondaryCircuitInspectionPriority Priority { get; set; } = SecondaryCircuitInspectionPriority.Medium;
|
||
|
||
/// <summary>
|
||
/// 是否启用
|
||
/// </summary>
|
||
[Required]
|
||
public bool IsActive { get; set; } = true;
|
||
|
||
/// <summary>
|
||
/// 定时执行的小时(0-23)
|
||
/// </summary>
|
||
[Range(0, 23, ErrorMessage = "执行小时必须在0-23之间")]
|
||
public int? ScheduledHour { get; set; }
|
||
|
||
/// <summary>
|
||
/// 定时执行的分钟(0-59)
|
||
/// </summary>
|
||
[Range(0, 59, ErrorMessage = "执行分钟必须在0-59之间")]
|
||
public int? ScheduledMinute { get; set; }
|
||
|
||
/// <summary>
|
||
/// 定时执行的星期列表
|
||
/// </summary>
|
||
public List<DayOfWeek> ScheduledWeekDaysList { get; set; }
|
||
|
||
/// <summary>
|
||
/// 间隔执行的间隔分钟数
|
||
/// </summary>
|
||
[Range(1, 10080, ErrorMessage = "间隔分钟数必须在1-10080之间")]
|
||
public int? IntervalMinutes { get; set; }
|
||
|
||
/// <summary>
|
||
/// 检修状态遥信配置ID
|
||
/// </summary>
|
||
public Guid? MaintenanceStatusConfigId { get; set; }
|
||
|
||
/// <summary>
|
||
/// 执行超时时间(秒)
|
||
/// </summary>
|
||
[Range(10, 3600, ErrorMessage = "执行超时时间必须在10-3600秒之间")]
|
||
public int ExecutionTimeoutSeconds { get; set; } = 300;
|
||
|
||
/// <summary>
|
||
/// 重试次数
|
||
/// </summary>
|
||
[Range(0, 5, ErrorMessage = "重试次数必须在0-5之间")]
|
||
public int RetryCount { get; set; } = 1;
|
||
|
||
/// <summary>
|
||
/// 备注
|
||
/// </summary>
|
||
[StringLength(1000, ErrorMessage = "备注长度不能超过1000个字符")]
|
||
public string Remark { get; set; }
|
||
|
||
/// <summary>
|
||
/// 巡检子项列表
|
||
/// </summary>
|
||
public List<EditSecondaryCircuitInspectionItemInput> InspectionItems { get; set; }
|
||
|
||
/// <summary>
|
||
/// 事件驱动配置列表
|
||
/// </summary>
|
||
public List<EditSecondaryCircuitEventDrivenConfigInput> EventDrivenConfigs { get; set; }
|
||
|
||
public SecondaryCircuitInspectionPlanCreateInput()
|
||
{
|
||
InspectionItems = new List<EditSecondaryCircuitInspectionItemInput>();
|
||
EventDrivenConfigs = new List<EditSecondaryCircuitEventDrivenConfigInput>();
|
||
ScheduledWeekDaysList = new List<DayOfWeek>();
|
||
}
|
||
}
|
||
}
|