namespace EntitlementDAL.DTOs; // MENTITLEMENTSUBSCRIPTION — one row per client. public class SubscriptionDTO { public int SubscriptionId { get; set; } public int ClientId { get; set; } public int PlanId { get; set; } public string IdmsEngagementRef { get; set; } = string.Empty; public byte SubscriptionStatus { get; set; } // 0=Pending 1=Active 2=Expired 3=Suspended public byte TrialFlag { get; set; } public DateTime? TrialEndDate { get; set; } public DateTime StartDate { get; set; } public DateTime LicenseValidTill { get; set; } public DateTime SupportValidTill { get; set; } public DateTime HostingValidTill { get; set; } public int GracePeriodDays { get; set; } = 30; public byte AutoRenew { get; set; } public string? Remarks { get; set; } // Entitlement↔Payment loose coupling (20260901_Entitlement_Subscription_PayOrderId, // Docs/Platform-Architecture-Integration-Reference.md §9.1) — the most recent PAY // TPAYORDER created for this subscription (SourceDocType=EntitlementSubscription, // SourceDocId=SubscriptionId). NULL = no payment ever initiated (e.g. comped subscription). public int? PayOrderId { get; set; } // audit tail public short Version { get; set; } public byte Status { get; set; } = 1; public int SortOrder { get; set; } public int CreatedById { get; set; } public DateTime CreatedOn { get; set; } public int ModifiedById { get; set; } public DateTime ModifiedOn { get; set; } public byte SourceType { get; set; } public int TenantId { get; set; } = -1; } // MENTITLEMENT (detail) — resolved per-subscription feature grant. public class EntitlementDTO { public int EntitlementId { get; set; } public int SubscriptionId { get; set; } public short SlNo { get; set; } = 1; public int FeatureId { get; set; } public byte IsEnabled { get; set; } = 1; public string? FeatureValue { get; set; } public byte EntitlementSource { get; set; } // 0=Plan 1=Addon 2=Promotion 3=AdminOverride public DateTime ValidFrom { get; set; } public DateTime ValidUntil { get; set; } }