namespace TCMSDAL.DTO; /// /// MTCMSTESTCASE — a single test scenario with full Gherkin detail. /// Auto-assigned TC-[MOD]-[SEQ] identifier at creation time. /// Optionally seeded from PIE UAT scenarios (PIESCENID links back for traceability). /// public sealed class TCMSTestCaseDTO { public int TestCaseId { get; set; } /// Auto-generated: TC-[ModuleCode]-[SEQ] e.g. TC-INV-001 public string TcId { get; set; } = string.Empty; public string Title { get; set; } = string.Empty; public string? Description { get; set; } /// FK → MTCMSMODULE public int ModuleId { get; set; } public string? ModuleName { get; set; } public string? ModuleCode { get; set; } /// FK → MTCMSFEATURE (nullable) public int? FeatureId { get; set; } public string? FeatureName { get; set; } /// P1 | P2 | P3 public string Priority { get; set; } = "P2"; /// CRUD | Validation | Functional | Negative | Boundary | Integration | Performance | API public string TestType { get; set; } = "Functional"; /// UI | API | DB | Manual public string ExecutionType { get; set; } = "UI"; /// HappyPath | ErrorHandling | EdgeCase | Negative | Boundary | Integration public string ScenarioType { get; set; } = "HappyPath"; /// Active | Draft | Deprecated public string Status { get; set; } = "Active"; public string? Preconditions { get; set; } public string? PostConditions { get; set; } public string? Tags { get; set; } // Comma-separated: @UI @P1 @Regression /// PIE UAT scenario link — populated by ImportFromPIE public Guid? PieScenId { get; set; } /// PIE variant linked (for behavior-matrix coverage tracking) public Guid? PieVariantId { get; set; } /// Was this auto-generated from a PIE scenario? public bool IsAutoGenerated { get; set; } /// Last run status (denormalized from TTCMSRUNRESULT) public string? LastRunStatus { get; set; } public DateTime? LastRunDate { get; set; } public bool IsActive { get; set; } = true; public int TenantId { get; set; } public int CreatedBy { get; set; } public DateTime CreatedDate { get; set; } public int? ModifiedBy { get; set; } public DateTime? ModifiedDate { get; set; } /// Loaded steps — populated by GetTCMSTestCase (single record only) public List Steps { get; set; } = new(); } public sealed class TCMSTestCaseListDTO { public int TestCaseId { get; set; } public string TcId { get; set; } = string.Empty; public string Title { get; set; } = string.Empty; public string ModuleName { get; set; } = string.Empty; public string? FeatureName { get; set; } public string Priority { get; set; } = string.Empty; public string TestType { get; set; } = string.Empty; public string Status { get; set; } = string.Empty; public string? LastRunStatus { get; set; } public bool IsAutoGenerated { get; set; } public bool IsActive { get; set; } } public sealed class TCMSTestCaseSelectDTO { public int TestCaseId { get; set; } public string TcId { get; set; } = string.Empty; public string Title { get; set; } = string.Empty; }