using System;
using FreeSql.DataAnnotations;
using ZhonTai.Admin.Core.Entities;
using NPP.SmartSchedue.Api.Contracts.Core.Consts;

namespace NPP.SmartSchedue.Api.Contracts.Domain.Time;

/// <summary>
/// 人员班次分配
/// </summary>
[Table(Name = DbConsts.TableNamePrefix + "personnel_shift_assignment")]
public partial class PersonnelShiftAssignmentEntity : EntityTenant
{
    /// <summary>
    /// 人员ID
    /// </summary>
    public long PersonnelId { get; set; }

    /// <summary>
    /// 班次ID
    /// </summary>
    public long ShiftId { get; set; }

    /// <summary>
    /// 分配日期
    /// </summary>
    public DateTime AssignmentDate { get; set; }

    /// <summary>
    /// 分配类型 (指定/自动)
    /// </summary>
    [Column(StringLength = 20)]
    public string AssignmentType { get; set; }

    /// <summary>
    /// 分配原因
    /// </summary>
    [Column(StringLength = 200)]
    public string AssignmentReason { get; set; }

    /// <summary>
    /// 分配状态
    /// </summary>
    [Column(StringLength = 20)]
    public string Status { get; set; }

    /// <summary>
    /// 是否违反规则
    /// </summary>
    public bool IsRuleViolation { get; set; } = false;

    /// <summary>
    /// 违反规则描述
    /// </summary>
    [Column(StringLength = 500)]
    public string ViolationDescription { get; set; }

    /// <summary>
    /// 年度累计班次数
    /// </summary>
    public int YearlyShiftCount { get; set; } = 0;

    /// <summary>
    /// 周累计班次数
    /// </summary>
    public int WeeklyShiftCount { get; set; } = 0;
} 