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

namespace Strata.Code.DataAccess.Models;

[PrimaryKey("RequestGuid", "AttemptId", "StepId")]
[Table("EngineLog", Schema = "fp")]
public partial class EngineLog
{
    [Key]
    [Column("RequestGUID")]
    public Guid RequestGuid { get; set; }

    [Key]
    [Column("StepID")]
    public int StepId { get; set; }

    [Key]
    [Column("AttemptID")]
    public int AttemptId { get; set; }

    [StringLength(300)]
    public string StepName { get; set; } = null!;

    [StringLength(300)]
    public string ClassName { get; set; } = null!;

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

    [Column("OptionsJSON")]
    public string OptionsJson { 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; } = null!;

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

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

    public int AffectedDepartmentCount { get; set; }
}
