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

namespace Strata.Code.DataAccess.Models;

[Table("InitialPlanRule", Schema = "fp")]
public partial class InitialPlanRule
{
    [Key]
    [Column("RowID")]
    public int RowId { get; set; }

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

    [Column("BudgetConfigID")]
    public short BudgetConfigId { get; set; }

    [Column("PlanSectionID")]
    public int PlanSectionId { get; set; }

    [Column("SubSectionID")]
    public int SubSectionId { get; set; }

    [Column("TimeClassID")]
    public byte TimeClassId { get; set; }

    [Column("DimensionalityJSON")]
    public string DimensionalityJson { get; set; } = null!;

    [Column("ProjectionMethodID")]
    public int ProjectionMethodId { get; set; }

    public byte TrailingMonths { get; set; }

    public int RulePriority { get; set; }

    [Column("VersionID")]
    public int? VersionId { get; set; }

    [ForeignKey("BudgetConfigGuid")]
    [InverseProperty("InitialPlanRules")]
    public virtual BudgetConfig BudgetConfig { get; set; } = null!;
}
