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
{
public long Id { get; set; }
public string Name { get; set; }
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; } // 展示用
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
{
public long Id { get; set; }
public string Name { get; set; }
}