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", "DepartmentId", "AccountId", "ProviderId", "ProviderLineItemId")]
[Table("StatisticsSpreads", Schema = "fp")]
public partial class StatisticsSpread
{
    [Key]
    [Column("BudgetConfigID")]
    public int BudgetConfigId { get; set; }

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

    [Key]
    [Column("AccountID")]
    public int AccountId { 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("ProviderID")]
    public int ProviderId { get; set; }

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

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

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