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

namespace Strata.Code.DataAccess.Models;

[PrimaryKey("BudgetConfigId", "ProviderId", "ProviderLineItemId", "DepartmentId", "JobCodeId", "PayCodeGroupId", "UnitTypeId")]
[Table("ProviderCompensationSpreads", Schema = "fp")]
public partial class ProviderCompensationSpread
{
    [Key]
    [Column("BudgetConfigID")]
    public int BudgetConfigId { get; set; }

    [Key]
    [Column("ProviderID")]
    public int ProviderId { get; set; }

    [Key]
    [Column("ProviderLineItemID")]
    public int ProviderLineItemId { get; set; }

    [Key]
    [Column("DepartmentID")]
    public int DepartmentId { get; set; }

    [Key]
    [Column("JobCodeID")]
    public int JobCodeId { get; set; }

    [Key]
    [Column("PayCodeGroupID")]
    public int PayCodeGroupId { get; set; }

    public bool IsInactive { get; set; }

    [Column(TypeName = "decimal(18, 0)")]
    public decimal? SpreadPercentage01 { get; set; }

    [Column(TypeName = "decimal(18, 0)")]
    public decimal? SpreadPercentage02 { get; set; }

    [Column(TypeName = "decimal(18, 0)")]
    public decimal? SpreadPercentage03 { get; set; }

    [Column(TypeName = "decimal(18, 0)")]
    public decimal? SpreadPercentage04 { get; set; }

    [Column(TypeName = "decimal(18, 0)")]
    public decimal? SpreadPercentage05 { get; set; }

    [Column(TypeName = "decimal(18, 0)")]
    public decimal? SpreadPercentage06 { get; set; }

    [Column(TypeName = "decimal(18, 0)")]
    public decimal? SpreadPercentage07 { get; set; }

    [Column(TypeName = "decimal(18, 0)")]
    public decimal? SpreadPercentage08 { get; set; }

    [Column(TypeName = "decimal(18, 0)")]
    public decimal? SpreadPercentage09 { get; set; }

    [Column(TypeName = "decimal(18, 0)")]
    public decimal? SpreadPercentage10 { get; set; }

    [Column(TypeName = "decimal(18, 0)")]
    public decimal? SpreadPercentage11 { get; set; }

    [Column(TypeName = "decimal(18, 0)")]
    public decimal? SpreadPercentage12 { get; set; }

    [Column(TypeName = "decimal(18, 0)")]
    public decimal? TotalImportedValue { get; set; }

    [Column("SpreadHistoryGUID")]
    public Guid SpreadHistoryGuid { get; set; }

    [Column("GlobalSpreadID")]
    public int GlobalSpreadId { get; set; }

    [Key]
    [Column("UnitTypeID")]
    public byte UnitTypeId { get; set; }

    [ForeignKey("DepartmentId")]
    [InverseProperty("ProviderCompensationSpreads")]
    public virtual DimDepartment Department { get; set; } = null!;

    [ForeignKey("SpreadHistoryGuid")]
    [InverseProperty("ProviderCompensationSpreads")]
    public virtual SpreadHistory SpreadHistory { get; set; } = null!;
}
