马梓彭 99a1857088 完善二期接口
补齐接口文档和上线SQL
优化底层保存逻辑
2026-08-30 21:46:05 +08:00

187 lines
4.7 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 YD_Event.Core.Enum;
namespace YD_Event.Core.Entities;
/// <summary>
/// 普通用户表 (实名信息)
/// </summary>
[SugarTable("AppUser")]
public class AppUser : Entity<long>, ISoftDelete, ICreatedUserId, ICreatedTime, IUpdatedUserId, IUpdatedTime, IAvailability
{
/// <summary>
/// 关联的单位认证ID(单位账号)
/// </summary>
[SugarColumn(IsNullable = true)]
public long? MerchantCertificationId { get; set; }
/// <summary>
/// 人员类型:0-普通用户,1-运动员,2-教练,3-领队
/// </summary>
public PersonType PersonType { get; set; }
/// <summary>
/// 小程序账户角色:1-参赛者,2-裁判,3-检录员。
/// 与报名人员类型 PersonType 相互独立。
/// </summary>
public MiniProgramRole MiniProgramRole { get; set; } = MiniProgramRole.Participant;
/// <summary>
/// 技能等级(教练特有)
/// </summary>
[SugarColumn(Length = 64, IsNullable = true)]
public string? SkillLevel { get; set; }
/// <summary>
/// 认证状态(教练特有):0-未认证,1-已认证
/// </summary>
[SugarColumn(IsNullable = true)]
public int? CertificationStatus { get; set; }
/// <summary>
/// 昵称 (来自微信等第三方)
/// </summary>
[SugarColumn(Length = 64, IsNullable = true)]
public string? NickName { get; set; }
/// <summary>
/// 头像 (来自微信等第三方)
/// </summary>
[SugarColumn(Length = 512, IsNullable = true)]
public string? Avatar { get; set; }
/// <summary>
/// 姓名
/// </summary>
[SugarColumn(Length = 64, IsNullable = true)]
public string? Name { get; set; }
/// <summary>
/// 性别
/// </summary>
public Gender Gender { get; set; }
/// <summary>
/// 出生日期
/// </summary>
[SugarColumn(IsNullable = true)]
public DateTime? BirthDate { get; set; }
/// <summary>
/// 年龄
/// </summary>
[SugarColumn(IsNullable = true)]
public int? Age { get; set; }
/// <summary>
/// 联系电话
/// </summary>
[SugarColumn(Length = 20)]
public string Mobile { get; set; } = null!;
/// <summary>
/// 密码(用于登录)
/// </summary>
[SugarColumn(Length = 64, IsNullable = true)]
public string? Password { get; set; }
/// <summary>
/// 身份证号码
/// </summary>
[SugarColumn(Length = 20, IsNullable = true)]
public string? IdCardNumber { get; set; }
/// <summary>
/// 护照号码
/// </summary>
[SugarColumn(Length = 20, IsNullable = true)]
public string? PassportNumber { get; set; }
/// <summary>
/// 身份证正面图片URL
/// </summary>
[SugarColumn(Length = 512, IsNullable = true)]
public string? IdCardImageUrl { get; set; }
/// <summary>
/// 身份证背面图片URL
/// </summary>
[SugarColumn(Length = 512, IsNullable = true)]
public string? IdCardBackImageUrl { get; set; }
/// <summary>
/// 护照图片URL
/// </summary>
[SugarColumn(Length = 512, IsNullable = true)]
public string? PassportPhotoUrl { get; set; }
/// <summary>
/// 户口本图片URL
/// </summary>
[SugarColumn(Length = 512, IsNullable = true)]
public string? HouseholdPhotoUrl { get; set; }
/// <summary>
/// 认证类型:0-未认证,1-身份证,2-护照,3-户口本
/// </summary>
public int AuthType { get; set; } = 0;
/// <summary>
/// 审核状态
/// </summary>
public AuditStatus AuditStatus { get; set; }
/// <summary>
/// 审核备注
/// </summary>
[SugarColumn(Length = 512, IsNullable = true)]
public string? AuditRemark { get; set; }
/// <summary>
/// 审核人(后台系统用户ID)
/// </summary>
[SugarColumn(IsNullable = true)]
public long? AuditUserId { get; set; }
/// <summary>
/// 审核时间
/// </summary>
[SugarColumn(IsNullable = true)]
public DateTime? AuditTime { get; set; }
/// <summary>
/// 备注
/// </summary>
[SugarColumn(Length = 512, IsNullable = true)]
public string? Remark { get; set; }
/// <summary>
/// 可用状态
/// </summary>
public AvailabilityStatus Status { get; set; }
/// <summary>
/// 标记删除
/// </summary>
public bool DeleteMark { get; set; }
/// <summary>
/// 创建人
/// </summary>
public long CreatedUserId { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public DateTime CreatedTime { get; set; }
/// <summary>
/// 更新人
/// </summary>
public long? UpdatedUserId { get; set; }
/// <summary>
/// 更新时间
/// </summary>
public DateTime? UpdatedTime { get; set; }
}