using System.ComponentModel.DataAnnotations; namespace FlatRender.IdentitySvc.Models.Requests; public record PurchasePlanRequest( [Required] Guid PlanId, string? Gateway, string? DiscountCode ); public record ValidateDiscountRequest([Required] string Code, Guid? PlanId); public record CreateDiscountRequest( [Required] string Name, [Required] string Code, [Required] string Kind, [Required] decimal Value, Guid? OwnerUserId, decimal OwnerProfitPercentage = 0, int? MaxUseCount = null, Guid[]? AppliesToPlanIds = null, DateTime? StartsAt = null, DateTime? ExpiresAt = null ); // Partial update — every field optional; only non-null values are applied. public record UpdateDiscountRequest( string? Name = null, string? Code = null, string? Kind = null, decimal? Value = null, Guid? OwnerUserId = null, decimal? OwnerProfitPercentage = null, int? MaxUseCount = null, Guid[]? AppliesToPlanIds = null, DateTime? StartsAt = null, DateTime? ExpiresAt = null, bool? IsActive = null ); public record IssueRefundRequest( [Required] Guid PaymentId, long? AmountMinor, [Required] string Reason, string RefundTo = "Balance" );