using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;

namespace Strata.Code.DataAccess.Models;

[Table("EntityGroupConfig", Schema = "fp")]
public partial class EntityGroupConfig
{
    [Key]
    [Column("EntityGroupConfigGUID")]
    public Guid EntityGroupConfigGuid { get; set; }

    [Column("BudgetConfigGUID")]
    public Guid BudgetConfigGuid { get; set; }

    [StringLength(100)]
    public string? Name { get; set; }

    [StringLength(1000)]
    public string? Comments { get; set; }

    [Column("AccountTimeClassID")]
    public byte AccountTimeClassId { get; set; }

    [Column("AccountFiscalYearID")]
    public short AccountFiscalYearId { get; set; }

    [Column("PayrollTimeClassID")]
    public byte PayrollTimeClassId { get; set; }

    [Column("PayrollFiscalYearID")]
    public short PayrollFiscalYearId { get; set; }

    [Column("ServiceLineEncounterTimeClassID")]
    public byte ServiceLineEncounterTimeClassId { get; set; }

    [Column("ServiceLineEncounterFiscalYearID")]
    public short ServiceLineEncounterFiscalYearId { get; set; }

    [Column("DepartmentChargeVolumeTimeClassID")]
    public byte DepartmentChargeVolumeTimeClassId { get; set; }

    [Column("DepartmentChargeVolumeFiscalYearID")]
    public short DepartmentChargeVolumeFiscalYearId { get; set; }

    [Column(TypeName = "datetime")]
    public DateTime AccountLastSampled { get; set; }

    [Column(TypeName = "datetime")]
    public DateTime PayrollLastSampled { get; set; }

    [Column(TypeName = "datetime")]
    public DateTime ServiceLineEncounterLastSampled { get; set; }

    [Column(TypeName = "datetime")]
    public DateTime DepartmentChargeVolumeLastSampled { get; set; }

    [Column("CostingConfigGUID")]
    public Guid CostingConfigGuid { get; set; }

    [Column("CostingConfigTimeClassID")]
    public byte CostingConfigTimeClassId { get; set; }

    [Column(TypeName = "smalldatetime")]
    public DateTime? DateModified { get; set; }

    [Column(TypeName = "smalldatetime")]
    public DateTime? DatePublished { get; set; }

    [Column("BenefitsTimeClassID")]
    public byte BenefitsTimeClassId { get; set; }

    [Column("BenefitsFiscalYearID")]
    public short BenefitsFiscalYearId { get; set; }

    [Column(TypeName = "datetime")]
    public DateTime BenefitsLastSampled { get; set; }

    public bool IsMarkedForDeletion { get; set; }

    [Column("StatisticsTimeClassID")]
    public byte StatisticsTimeClassId { get; set; }

    [Column("StatisticsFiscalYearID")]
    public short StatisticsFiscalYearId { get; set; }

    [Column(TypeName = "datetime")]
    public DateTime StatisticsLastSampled { get; set; }

    [Column("EntityGroupConfigID")]
    public int EntityGroupConfigId { get; set; }

    public bool IsBudgetLockDown { get; set; }

    public bool IsRosterUsed { get; set; }

    public short StatisticsModel { get; set; }

    [Column("RevenueAndDeductionsTimeClassID")]
    public byte RevenueAndDeductionsTimeClassId { get; set; }

    [Column("RevenueAndDeductionsFiscalYearID")]
    public short RevenueAndDeductionsFiscalYearId { get; set; }

    [Column(TypeName = "datetime")]
    public DateTime RevenueAndDeductionsLastSampled { get; set; }

    public bool IsPatientActivityFlexingForStaffing { get; set; }

    public bool IsPatientActivityFlexingForNonStaffing { get; set; }

    public Guid ParentEntityGroupConfigGuid { get; set; }

    public bool IsPayorGroupUsedForCrosswalk { get; set; }

    [InverseProperty("EntityGroupConfig")]
    public virtual ICollection<DepartmentConfig> DepartmentConfigs { get; set; } = new List<DepartmentConfig>();
}
