#nullable enable
using System.ComponentModel.DataAnnotations;
using YD_Event.Core.Enum;
using SqlSugar;
using Easy.Core;
namespace YD_Event.Application.AppUser.Dtos;
///
/// 运动员查询输入
///
public class AthleteQueryInput : Pagination
{
///
/// 姓名
///
public string? Name { get; set; }
///
/// 身份证号
///
public string? IdCardNumber { get; set; }
///
/// 开始注册时间
///
public DateTime? StartTime { get; set; }
///
/// 结束注册时间
///
public DateTime? EndTime { get; set; }
}
///
/// 新增运动员输入
///
public class AddAthleteInput
{
///
/// 姓名
///
[Required(ErrorMessage = "姓名不能为空"), MaxLength(64)]
public string Name { get; set; } = null!;
///
/// 性别
///
public Gender Gender { get; set; }
///
/// 出生日期
///
public DateTime? BirthDate { get; set; }
///
/// 身份证号
///
[Required(ErrorMessage = "身份证号不能为空"), MaxLength(20)]
public string IdCardNumber { get; set; } = null!;
///
/// 身份证图片URL
///
[MaxLength(512)]
public string? IdCardImageUrl { get; set; }
///
/// 联系电话
///
[MaxLength(20)]
public string? Mobile { get; set; }
}
///
/// 修改运动员输入
///
public class UpdateAthleteInput : AddAthleteInput
{
///
/// 主键Id
///
[Required(ErrorMessage = "Id不能为空")]
public long Id { get; set; }
}
///
/// 运动员信息输出
///
public class AthleteOutput
{
///
/// 主键Id
///
public long Id { get; set; }
///
/// 姓名
///
public string Name { get; set; } = null!;
///
/// 性别
///
public Gender Gender { get; set; }
///
/// 性别描述
///
public string GenderName => Gender.Description();
///
/// 年龄
///
public int Age { get; set; }
///
/// 出生日期
///
public DateTime? BirthDate { get; set; }
///
/// 身份证号
///
public string IdCardNumber { get; set; } = null!;
///
/// 身份证图片URL
///
public string? IdCardImageUrl { get; set; }
///
/// 联系电话
///
public string? Mobile { get; set; }
///
/// 状态
///
public AvailabilityStatus Status { get; set; }
///
/// 注册时间
///
public DateTime CreatedTime { get; set; }
}
///
/// OCR识别输入
///
public class AthleteOcrInput
{
///
/// 图片URL
///
[Required(ErrorMessage = "图片URL不能为空")]
public string ImageUrl { get; set; } = null!;
}