2026-02-07 16:03:52 +08:00

94 lines
2.1 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System.ComponentModel.DataAnnotations;
using YD_Event.Application.Certificate.Dtos;
namespace YD_Event.Application.Coupon.Dtos;
public class AddCouponInput
{
/// <summary>
/// 优惠券名称
/// </summary>
[Required(ErrorMessage = "优惠券名称不能为空")]
public string Name { get; set; }
/// <summary>
/// 类型(0-折扣 1-定额)
/// </summary>
public int Type { get; set; }
/// <summary>
/// 优惠值
/// </summary>
public decimal Value { get; set; }
/// <summary>
/// 有效期开始时间
/// </summary>
public DateTime? StartTime { get; set; }
/// <summary>
/// 有效期结束时间
/// </summary>
public DateTime? EndTime { get; set; }
/// <summary>
/// 可用赛事ID集合
/// </summary>
public List<long> EventIds { get; set; }
/// <summary>
/// 总数量
/// </summary>
public int TotalQuantity { get; set; }
}
public class UpdateCouponInput : AddCouponInput
{
/// <summary>
/// Id
/// </summary>
[Required(ErrorMessage = "Id不能为空")]
public long Id { get; set; }
}
public class CouponQueryInput : Pagination
{
/// <summary>
/// 名称
/// </summary>
public string Name { get; set; }
/// <summary>
/// 类型
/// </summary>
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<long> 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<CouponPageOutput>
{
public int TotalPage { get; set; }
}
public class EventSelectOutput
{
public long Id { get; set; }
public string Name { get; set; }
}