refactor: 邀请码逻辑调整,支持双方填写/使用邀请码统计,并移除已被邀请状态字段

This commit is contained in:
ccnetcore
2025-11-14 23:53:29 +08:00
parent da23d17af8
commit 4bd2fc357d
5 changed files with 32 additions and 71 deletions

View File

@@ -19,7 +19,6 @@ public class InviteCodeAggregateRoot : FullAuditedAggregateRoot<Guid>
{
UserId = userId;
Code = code;
IsUserInvited = false;
UsedCount = 0;
}
@@ -33,12 +32,7 @@ public class InviteCodeAggregateRoot : FullAuditedAggregateRoot<Guid>
/// </summary>
[SugarColumn(Length = 50)]
public string Code { get; set; } = string.Empty;
/// <summary>
/// 邀请码拥有者是否已被他人邀请(被邀请后不可再提供邀请码)
/// </summary>
public bool IsUserInvited { get; set; }
/// <summary>
/// 被使用次数(统计用,一个邀请码可以被多人使用)
/// </summary>
@@ -49,12 +43,5 @@ public class InviteCodeAggregateRoot : FullAuditedAggregateRoot<Guid>
/// </summary>
[SugarColumn(Length = 500, IsNullable = true)]
public string? Remark { get; set; }
/// <summary>
/// 标记用户已被邀请
/// </summary>
public void MarkUserAsInvited()
{
IsUserInvited = true;
}
}