using Microsoft.EntityFrameworkCore;
using PARR.Domain.Constants;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace PARR.Domain.Entities.JobGroupEntities
{
///
/// Настройки автораспределения для JobGroup
///
[Table("GroupDistributionConfigs", Schema = DatabaseSchemas.JobGroup)]
[Comment("Настройки автораспределения для группы работ")]
public class JobGroupDistributionConfig
{
[Key]
public Guid GroupId { get; set; }
public Guid DistributionPeriodId { get; set; }
///
/// Исключать выходные и праздничные дни
///
public bool IsExcludeWeekends { get; set; }
///
/// Группировать по рабочей группе
///
public bool IsGroupingByWorkGroup { get; set; }
[ForeignKey(nameof(GroupId))]
public JobGroup? Group { get; set; }
[ForeignKey(nameof(DistributionPeriodId))]
public DistributionPeriod? DistributionPeriod { get; set; }
}
}