using System.ComponentModel.DataAnnotations; using YD_Event.Application.Certificate.Dtos; namespace YD_Event.Application.Coupon.Dtos; public class AddCouponInput { /// /// 优惠券名称 /// [Required(ErrorMessage = "优惠券名称不能为空")] public string Name { get; set; } /// /// 类型(0-折扣 1-定额) /// public int Type { get; set; } /// /// 优惠值 /// public decimal Value { get; set; } /// /// 有效期开始时间 /// public DateTime? StartTime { get; set; } /// /// 有效期结束时间 /// public DateTime? EndTime { get; set; } /// /// 可用赛事ID集合 /// public List EventIds { get; set; } /// /// 总数量 /// public int TotalQuantity { get; set; } } public class UpdateCouponInput : AddCouponInput { /// /// Id /// [Required(ErrorMessage = "Id不能为空")] public long Id { get; set; } } public class CouponQueryInput : Pagination { /// /// 名称 /// public string Name { get; set; } /// /// 类型 /// public int? Type { get; set; } } /// /// 优惠券分页输出参数 /// public class CouponPageOutput { /// /// ID /// public long Id { get; set; } /// /// 优惠券名称 /// public string Name { get; set; } /// /// 类型(0-折扣 1-定额) /// public int Type { get; set; } /// /// 优惠值 /// public decimal Value { get; set; } /// /// 有效期开始时间 /// public DateTime? StartTime { get; set; } /// /// 有效期结束时间 /// public DateTime? EndTime { get; set; } /// /// 适用赛事名称集合 (展示用) /// public string EventNames { get; set; } /// /// 适用赛事ID集合 (编辑回显用) /// public List EventIds { get; set; } /// /// 兑换码 /// public string RedemptionCode { get; set; } /// /// 总数量 /// public int TotalQuantity { get; set; } /// /// 已领取数量 /// public int ClaimedQuantity { get; set; } /// /// 已使用数量 /// public int UsedQuantity { get; set; } /// /// 创建时间 /// public DateTime CreatedTime { get; set; } } /// /// 优惠券分页结果 /// public class CouponPageResult : PageResult { /// /// 总页数 /// public int TotalPage { get; set; } } /// /// 赛事选择输出 /// public class EventSelectOutput { /// /// 赛事ID /// public long Id { get; set; } /// /// 赛事名称 /// public string Name { get; set; } }