namespace PARR.API.Contracts.V1.Responses
{
public class TemplateBaseResponse
{
public Guid Id { get; set; }
public required string Name { get; set; }
public bool IsActiveTemplate { get; set; }
public bool IsActiveSchedule { get; set; }
public string? ScheduleEsppId { get; set; }
public DateTimeOffset? LastRun { get; set; }
public DateTimeOffset NextRun { get; set; }
///
/// NextRun с учетом ЗО (локальное время по ЗО, не UTC)
///
public DateTimeOffset? NextRunResponseAreaInLocal { get; set; }
public bool IsResponseAreaTimezone { get; set; }
///
/// Рабочая группа (формируется из шорткода)
///
public string? WorkGroup { get; set; }
///
/// ЗО, формируется из шорткода
///
public string? ResponseArea { get; set; }
public UnitWithAttributesResponse? Unit { get; set; }
public TemplateStatusTypeResponse? StatusType { get; set; }
public TemplateAgentResponse? Agent { get; set; }
public List? SyncStatus { get; set; }
public int OrderCount { get; set; }
public bool IsAutoDistributionEnabled { get; set; }
public ScheduleResponseAreaTimeOffsetResponse? Timezone { get; set; }
}
public class TemplateListResponse : TemplateBaseResponse
{
}
public class TemplateResponse : TemplateBaseResponse
{
public required string Category { get; set; }
public required string Initiator { get; set; }
public required string ClosingCode { get; set; }
public required string ShortDescription { get; set; }
public required string FullDescription { get; set; }
public required string Solution { get; set; }
public required string TemplateDuration { get; set; }
public JobResponse? Job { get; set; }
public ProcessResponse? Process { get; set; }
public SubprocessResponse? Subprocess { get; set; }
public TnkResponse? Tnk { get; set; }
///
/// Расписание
///
public EsppScheduleResponse? Schedule { get; set; }
///
/// Тип исклчения
///
public ScheduleExcludeTypeResponse? ScheduleExcludeType { get; set; }
///
/// Тип исключения - календарь
///
public ScheduleExcludeTypeCalendarResponse? ScheduleExcludeTypeCalendar { get; set; }
public JobGroupDistributionConfigResponse? DistributionConfig { get; set; }
}
}