2026-01-20 16:17:09 +10:00
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
2026-04-15 09:35:03 +10:00
|
|
|
|
using PARR.Domain.Constants;
|
2026-01-20 16:17:09 +10:00
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
|
|
|
2026-04-30 10:35:31 +10:00
|
|
|
|
namespace PARR.Domain.Entities.Job
|
2026-01-20 16:17:09 +10:00
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Настройки автораспределения для JobGroup
|
|
|
|
|
|
/// </summary>
|
2026-04-15 09:35:03 +10:00
|
|
|
|
[Table("GroupDistributionConfigs", Schema = DatabaseSchemas.Job)]
|
2026-01-20 16:17:09 +10:00
|
|
|
|
[Comment("Настройки автораспределения для группы работ")]
|
|
|
|
|
|
public class JobGroupDistributionConfig
|
|
|
|
|
|
{
|
|
|
|
|
|
[Key]
|
|
|
|
|
|
public Guid GroupId { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public Guid DistributionPeriodId { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Исключать выходные и праздничные дни
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public bool IsExcludeWeekends { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Группировать по рабочей группе
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public bool IsGroupingByWorkGroup { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[ForeignKey(nameof(GroupId))]
|
|
|
|
|
|
public JobGroup? Group { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[ForeignKey(nameof(DistributionPeriodId))]
|
|
|
|
|
|
public DistributionPeriod? DistributionPeriod { get; set; }
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|