namespace ComplianceDAL.DTO.GSTEInvoice; public class GSTEInvoiceDTO { public int EInvoiceId { get; set; } public int ArtifactId { get; set; } public int DocumentId { get; set; } public string DocumentType { get; set; } = "Invoice"; public string DocumentNumber { get; set; } = string.Empty; public DateTime? DocumentDate { get; set; } public string GSTIN { get; set; } = string.Empty; public string IRN { get; set; } = string.Empty; public string SignedQRCode { get; set; } = string.Empty; public string SignedEInvoice { get; set; } = string.Empty; public string AcknowledgementNumber { get; set; } = string.Empty; public DateTime? AcknowledgementDate { get; set; } public string Status { get; set; } = "Generated"; public DateTime? CancelledOn { get; set; } public string CancellationReason { get; set; } = string.Empty; public string SubmissionMode { get; set; } = "API"; public string BatchId { get; set; } = string.Empty; public int ClientId { get; set; } public string DatabaseName { get; set; } = string.Empty; public int CreatedById { get; set; } public DateTime CreatedOn { get; set; } public int? ModifiedById { get; set; } public DateTime? ModifiedOn { get; set; } } public class GenerateEInvoiceRequestDTO { public int DocumentId { get; set; } public string DocumentType { get; set; } = "Invoice"; public string SubmissionMode { get; set; } = "API"; } public class GenerateBulkEInvoiceRequestDTO { public List DocumentIds { get; set; } = []; public string DocumentType { get; set; } = "Invoice"; public string SubmissionMode { get; set; } = "API"; public string GSTIN { get; set; } = string.Empty; public string ReturnPeriod { get; set; } = string.Empty; } // Matches GB4's CancelIRNDTO (IRNNumber/CancelReasonType/CancelReason) — EInvoiceId is a GB5 addition, // needed to look up the TGST_EINVOICE row (and its ArtifactId/SubmissionMode) for the cancel call and // for audit logging, since GB4 identifies the row to cancel purely by IRN against TMMHEAD. public class CancelEInvoiceRequestDTO { public int EInvoiceId { get; set; } public string IRNNumber { get; set; } = string.Empty; public int CancelReasonType { get; set; } // 1=Duplicate, 2=Data Entry Mistake, 3=Order Cancel, 4=Others public string CancelReason { get; set; } = string.Empty; public string SubmissionMode { get; set; } = "API"; } public class EInvoiceCoverageDTO { public string ReturnPeriod { get; set; } = string.Empty; public string GSTIN { get; set; } = string.Empty; public int TotalDocuments { get; set; } public int WithIRN { get; set; } public int WithoutIRN { get; set; } public int Cancelled { get; set; } public decimal CoveragePercent { get; set; } } public class EInvoicePortalResponseDTO { public string IRN { get; set; } = string.Empty; public string SignedQRCode { get; set; } = string.Empty; public string SignedEInvoice { get; set; } = string.Empty; public string AcknowledgementNumber { get; set; } = string.Empty; public DateTime? AcknowledgementDate { get; set; } public bool IsSuccess { get; set; } public string ErrorCode { get; set; } = string.Empty; public string ErrorMessage { get; set; } = string.Empty; public int HttpStatusCode { get; set; } public string RawResponse { get; set; } = string.Empty; }