using SqlSugar; using Volo.Abp.Domain.Entities.Auditing; using Yi.Framework.AiHub.Domain.Shared.Enums; namespace Yi.Framework.AiHub.Domain.Entities; /// /// 激活码 /// [SugarTable("Ai_ActivationCode")] [SugarIndex($"index_{nameof(Code)}", nameof(Code), OrderByType.Asc, true)] [SugarIndex($"index_{nameof(GoodsType)}", nameof(GoodsType), OrderByType.Asc)] public class ActivationCodeAggregateRoot : FullAuditedAggregateRoot { /// /// 激活码(唯一) /// [SugarColumn(Length = 50)] public string Code { get; set; } = string.Empty; /// /// 商品类型 /// public ActivationCodeGoodsTypeEnum GoodsType { get; set; } /// /// 是否允许多人各使用一次 /// public bool IsReusable { get; set; } /// /// 是否限制同类型只能兑换一次 /// public bool IsSameTypeOnce { get; set; } /// /// 已使用次数 /// public int UsedCount { get; set; } /// /// 备注 /// [SugarColumn(Length = 500, IsNullable = true)] public string? Remark { get; set; } }