Files
TakeoutSaaS.AdminApi/src/Domain/TakeoutSaaS.Domain/Coupons/Entities/Coupon.cs

51 lines
1.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 TakeoutSaaS.Domain.Coupons.Enums;
using TakeoutSaaS.Shared.Abstractions.Entities;
namespace TakeoutSaaS.Domain.Coupons.Entities;
/// <summary>
/// 用户领取的券。
/// </summary>
public sealed class Coupon : MultiTenantEntityBase
{
/// <summary>
/// 模板标识。
/// </summary>
public long CouponTemplateId { get; set; }
/// <summary>
/// 券码或序列号。
/// </summary>
public string Code { get; set; } = string.Empty;
/// <summary>
/// 归属用户。
/// </summary>
public long UserId { get; set; }
/// <summary>
/// 订单 ID已使用时记录
/// </summary>
public long? OrderId { get; set; }
/// <summary>
/// 状态。
/// </summary>
public CouponStatus Status { get; set; } = CouponStatus.Available;
/// <summary>
/// 发放时间。
/// </summary>
public DateTime IssuedAt { get; set; } = DateTime.UtcNow;
/// <summary>
/// 使用时间。
/// </summary>
public DateTime? UsedAt { get; set; }
/// <summary>
/// 到期时间。
/// </summary>
public DateTime ExpireAt { get; set; }
}