namespace KArtSell.Modules.ModelOperations.SellDecision;

public class SellDecisionEntity
{
    public Guid Id { get; set; }
    public Guid ModelId { get; set; }
    public required string Status { get; set; }
    public decimal? PboScore { get; set; }
    public decimal? DsrMetric { get; set; }
    public required string OosPerformance { get; set; }
    public int? SellPriority { get; set; }
    public int? TargetQuantity { get; set; }
    public decimal? TargetPrice { get; set; }
    public Guid? ApprovalId { get; set; }
    public Guid? ExecutionId { get; set; }
    public DateTime CreatedAt { get; set; }
    public required string CreatedBy { get; set; }
    public required string CreatedJustification { get; set; }
    public DateTime PublishedAt { get; set; }
    public Guid CorrelationId { get; set; }
    public int Revision { get; set; }
}

public class SellDecisionEvidenceEntity
{
    public Guid Id { get; set; }
    public Guid DecisionId { get; set; }
    public required string EvidenceType { get; set; }
    public required string EvidenceUrl { get; set; }
    public DateTime? ValidatedAt { get; set; }
    public required string ValidatorEmail { get; set; }
    public required string Comments { get; set; }
    public DateTime PublishedAt { get; set; }
    public Guid CorrelationId { get; set; }
}

public enum SellPriority
{
    HardImpairment = 1,
    PortfolioSurvival = 2,
    DynamicProfitFloor = 3,
    Concentration = 4,
    Liquidity = 5,
    OpportunityCost = 6,
    ReentryOption = 7
}

public enum SellDecisionStatus
{
    Pending,
    SignalGenerated,
    PboValidated,
    DsrValidated,
    OosApproved,
    ReadyForApproval,
    Approved,
    Executed,
    Confirmed
}
