using System.ComponentModel.DataAnnotations; using YD_Event.Application.Event.Dtos; using YD_Event.Core.Entities; using YD_Event.Core.Enum; using Microsoft.AspNetCore.Http; namespace YD_Event.Application.Event.Dtos; /// /// 用户端赛事查询输入 /// public class UserEventQueryInput : Pagination { /// /// 赛事状态 (0-全部, 1-报名中, 2-比赛中, 3-已结束) /// public EventStatus? Status { get; set; } /// /// 赛事类型 /// public EventFormat? Type { get; set; } /// /// 时间范围开始 /// public DateTime? StartTime { get; set; } /// /// 时间范围结束 /// public DateTime? EndTime { get; set; } /// /// 关键字搜索(赛事名称) /// public string? Keyword { get; set; } } /// /// 用户端赛事列表输出 /// public class UserEventListOutput { public long Id { get; set; } public string Name { get; set; } public string CoverImage { get; set; } public string Status { get; set; } // 报名中/比赛中/已结束 public string Type { get; set; } // 线上/线下 public DateTime RegistrationEndTime { get; set; } public DateTime MatchStartTime { get; set; } public DateTime MatchEndTime { get; set; } } /// /// 用户端赛事详情输出 /// public class UserEventDetailOutput { public long Id { get; set; } public string Name { get; set; } public string CoverImage { get; set; } public string? EventVideo { get; set; } // 赛事视频 public string Status { get; set; } public string Type { get; set; } public string RegistrationType { get; set; } // 报名方式 public string PointsRuleName { get; set; } // 积分规则名称 public DateTime RegistrationStartTime { get; set; } public DateTime RegistrationEndTime { get; set; } public bool IsNeedMaterial { get; set; } // 是否上传素材 public string? MaterialRemark { get; set; } // 素材备注 public DateTime? MaterialUploadEndTime { get; set; } // 上传素材截止时间 public DateTime MatchStartTime { get; set; } public DateTime MatchEndTime { get; set; } public string Description { get; set; } // 赛事简介/规则 public string Address { get; set; } public string? Remark { get; set; } // 备注 public List Units { get; set; } // 主办/承办单位 // 配置信息 public UserEventLimitOutput? LimitConfig { get; set; } public UserEventFeeOutput? FeeConfig { get; set; } public List? Projects { get; set; } // 项目列表(可选返回) /// /// 当前用户报名状态 (未报名/已报名/审核中) /// public string UserRegistrationStatus { get; set; } public long? RegistrationId { get; set; } // 如果已报名,返回报名ID } public class UserEventLimitOutput { public int IndividualProjectLimit { get; set; } public int TeamProjectLimit { get; set; } } public class UserEventFeeOutput { public string ChargeMode { get; set; } public decimal Price { get; set; } } /// /// 报名项目选择输出 /// public class UserEventProjectListOutput { public long Id { get; set; } public string Name { get; set; } public string GroupName { get; set; } // 组别名称 public decimal Fee { get; set; } public int? LimitCount { get; set; } // 人数限制 public int RegisteredCount { get; set; } // 已报名人数 public string Requirements { get; set; } // 报名要求描述 public int TeamSize { get; set; } // 团队人数要求 (1为个人) public int CompletionCount { get; set; } // 完成人数 } /// /// 团队成员搜索输入 /// public class UserMemberSearchInput { public string Keyword { get; set; } // 手机号或ID } /// /// 团队成员信息输出 /// public class UserTeamMemberOutput { public long UserId { get; set; } public string Name { get; set; } public string Mobile { get; set; } public string IdCard { get; set; } // 脱敏显示 public string Gender { get; set; } public bool IsEligible { get; set; } // 是否符合参赛资格 public string IneligibilityReason { get; set; } // 不符合原因 } /// /// 提交报名输入 (草稿或正式提交) /// public class UserSubmitRegistrationInput { public long EventId { get; set; } /// /// 选中的项目ID列表 /// public List ProjectIds { get; set; } /// /// 队员列表 /// public List MemberIds { get; set; } /// /// 是否保存草稿 /// public bool IsDraft { get; set; } } /// /// 订单预览输出 /// public class UserOrderPreviewOutput { public long EventId { get; set; } public string EventName { get; set; } public List Projects { get; set; } public List Members { get; set; } public decimal TotalAmount { get; set; } public Dictionary FeeDetails { get; set; } // 费用明细 } /// /// 创建支付订单输入 /// public class UserCreateOrderInput { public long RegistrationId { get; set; } public int PaymentMethod { get; set; } // 1-微信, 2-支付宝, 3-银行卡 } /// /// 支付结果输出 /// public class UserPaymentResultOutput { public string OrderNo { get; set; } public string PayUrl { get; set; } // 支付链接或二维码内容 public int Status { get; set; } // 0-待支付 } #region 参赛记录相关 DTOs /// /// 参赛记录查询输入 /// public class RegistrationListQueryInput : Pagination { /// /// 赛事ID (可选) /// public long? EventId { get; set; } /// /// 状态 (可选) /// public string? Status { get; set; } // 对应 RegistrationStatus 或 PaymentStatus 组合状态 /// /// 关键字搜索 (队伍名/赛事名) /// public string? Keyword { get; set; } } /// /// 参赛记录列表项输出 /// public class RegistrationItemDTO { public long RegistrationId { get; set; } public string EventName { get; set; } public string TeamName { get; set; } public string Status { get; set; } // 综合状态描述: 待付款, 待上传素材, 已取消, 已报名, 待审核 public DateTime CreateTime { get; set; } public DateTime? UpdateTime { get; set; } public string PayStatus { get; set; } public string CertStatus { get; set; } // 证书状态 public bool HasMaterial { get; set; } public bool HasVoucher { get; set; } public int MemberCount { get; set; } public int MaxMember { get; set; } // 允许的最大人数 public DateTime? ExpireTime { get; set; } // 支付或素材上传截止时间 } /// /// 上传素材输入 /// public class UploadMaterialInput { /// /// 文件列表 (最多5个) /// [Required] public List Files { get; set; } /// /// 素材类型 (图片/视频/其他) /// [Required] public string MaterialType { get; set; } /// /// 描述 (可选) /// public string? Description { get; set; } } /// /// 素材信息输出 /// public class MaterialDTO { public string MaterialId { get; set; } public string OssUrl { get; set; } public string FileName { get; set; } public long FileSize { get; set; } public DateTime UploadTime { get; set; } } /// /// 上传支付凭证输入 /// public class UploadVoucherInput { /// /// 凭证图片 (单张) /// [Required] public IFormFile File { get; set; } /// /// 支付金额 /// [Required] public decimal PayAmount { get; set; } /// /// 支付时间 /// [Required] public DateTime PayTime { get; set; } /// /// 支付渠道 (微信/支付宝/银行转账) /// [Required] public string PayChannel { get; set; } /// /// 交易流水号 (可选) /// public string? TransactionId { get; set; } } /// /// 支付凭证输出 /// public class VoucherDTO { public string VoucherId { get; set; } public string OssUrl { get; set; } public string AuditStatus { get; set; } } /// /// 队员信息 DTO /// public class TeamMemberDTO { public long UserId { get; set; } public string RealName { get; set; } public string Phone { get; set; } public string Email { get; set; } public string Role { get; set; } // 队长/队员 public string InviteStatus { get; set; } // 邀请状态 public DateTime JoinTime { get; set; } } /// /// 更换队员输入 /// public class ReplaceMemberInput { /// /// 新队员用户ID /// [Required] public long NewUserId { get; set; } /// /// 更换原因 (可选) /// public string? ReplaceReason { get; set; } } /// /// 证书信息输出 /// public class CertificateDTO { public string CertUrl { get; set; } public string CertNumber { get; set; } public DateTime IssueTime { get; set; } public DateTime? ExpireTime { get; set; } } /// /// 统一响应 DTO (泛型) /// public class ResponseDTO { public int Code { get; set; } public string Message { get; set; } public T Data { get; set; } public bool Success { get; set; } } #endregion