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

namespace Strata.Code.DataAccess.Models;

[Keyless]
[Table("BudgetRefreshRequestHistory", Schema = "fp")]
public partial class BudgetRefreshRequestHistory
{
    [Column("RequestGUID")]
    public Guid RequestGuid { get; set; }

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

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

    [StringLength(64)]
    public string UserName { get; set; } = null!;

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

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

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

    public byte Status { get; set; }

    public string? ErrorMessage { get; set; }

    public string? StackTrace { get; set; }

    [Column("SourceActionID")]
    public short SourceActionId { get; set; }

    public string AffectedDepartments { get; set; } = null!;

    [Column("CollapsedRequestGUID")]
    public Guid CollapsedRequestGuid { get; set; }

    public bool IsIgnoreTargetingError { get; set; }

    [StringLength(100)]
    public string Source { get; set; } = null!;

    [StringLength(100)]
    public string JazzVersion { get; set; } = null!;

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

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

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

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

    public string CanceledBy { get; set; } = null!;

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

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

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

    public int AffectedDepartmentCount { get; set; }

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