Files
parr_api/PARR.API/Contracts/V1/Requests/JobGroupRequest.cs

86 lines
2.6 KiB
C#

namespace PARR.API.Contracts.V1.Requests
{
public record JobGroupRequest
{
public required string Name { get; init; }
//public bool? IsUmbrella { get; set; }
public Guid GroupTypeId { get; init; }
/// <summary>
/// Поле по которому групиируем, если тип - ГРУППА
/// </summary>
public Guid? GroupingUnitFieldId { get; init; }
public bool? IsGroupByResponsible { get; init; }
public required string ShortDescription { get; init; }
public required string FullDescription { get; init; }
public required string Solution { get; init; }
public required string TemplateDuration { get; init; }
public DateTimeOffset ReferenceDate { get; init; }
public int? UserTimeZoneOffsetMinutes { get; init; }
/// <summary>
/// Использовать таймзону рабочей группы ответственного за ЭК шаблона
/// </summary>
public bool IsWorkGroupTimezone { get; init; }
public Guid ScheduleExcludeTypeId { get; init; }
public Guid? ScheduleExcludeTypeCalendarId { get; init; }
public bool IsAutoDistributionEnabled { get; init; }
/// <summary>
/// Настройки автораспределения
/// </summary>
public DistributionConfigRequest? DistributionConfig { get; init; }
//public bool IsAgent { get; set; }
//public string? AgentName { get; set; }
//public int? AgentTimeOutSec { get; set; }
//public string? AgentScript { get; set; }
public List<EsppSchValueRequest> Schedule { get; init; } = new List<EsppSchValueRequest>();
/// <summary>
/// Настройки автоконтроля (возможны только в случае, если JobGroupType.IsJobGroupAutocontrol==true)
/// </summary>
public JobAutoControlRequest? AutoControl { get; init; }
}
public record EsppSchValueRequest
{
public Guid TypeValueId { get; init; }
public Guid TypeConfigId { get; init; }
}
public record DistributionConfigRequest
{
public Guid DistributionPeriodId { get; init; }
/// <summary>
/// Исключать выходные и праздники
/// </summary>
public bool IsExcludeWeekends { get; init; }
/// <summary>
/// Группировать по рабочей группе
/// </summary>
public bool IsGroupingByWorkGroup { get; init; }
}
}