using System.ComponentModel.DataAnnotations.Schema; using vendorApproverBackend.Enums; namespace vendorApproverBackend.Entities { [Table("evaluation_data")] public class EvaluationData { [Column("id")] public long Id { get; set; } [Column("status")] public EvaluationStatusEnum Status { get; set; } = EvaluationStatusEnum.PENDING; [Column("total_score")] public double TotalScore { get; set; } [Column("evaluation_date")] public string EvaluationDate { get; set; } [Column("evaluated_by")] public string EvaluatedBy { get; set; } [Column("timestmp")] public DateTime Timestamp { get; set; } = DateTime.UtcNow; [Column("request_renew_id")] public long RequestRenewId { get; set; } [NotMapped] public string SupplierName { get; set; } [NotMapped] public string CertificationNumber { get; set; } public EvaluationDetails Evaluation { get; set; } = new(); } public class EvaluationDetails { public CriteriaEvaluation CriteriaEvaluation { get; set; } = new(); public FinalDecision FinalDecision { get; set; } = new(); public ManufacturerDetails ManufacturerDetails { get; set; } = new(); public PolicyChecks PolicyChecks { get; set; } = new(); } public class CriteriaEvaluation { public ScoreRemark ProductPerformance { get; set; } = new(); public ScoreRemark AfterSaleService { get; set; } = new(); public ScoreRemark ComplianceWithStandards { get; set; } = new(); } public class ScoreRemark { public double Score { get; set; } public string Remark { get; set; } } public class FinalDecision { public string Decision { get; set; } public string Reason { get; set; } public string RepresentativeName { get; set; } public string RepresentativeSignature { get; set; } public string RepresentativeDate { get; set; } } public class ManufacturerDetails { public string Name { get; set; } public string Signature { get; set; } public string Date { get; set; } } public class PolicyChecks { public bool IsThirdRenewal { get; set; } public bool IsExpiredOver2Years { get; set; } public bool HasReferenceOrders { get; set; } public bool RequiresManufacturerEvaluation { get; set; } public bool CanProceedWithoutReferences { get; set; } } }