using System.ComponentModel.DataAnnotations;
using YD_Event.Core.Enum;
namespace YD_Event.Application.Client.Dtos;
///
/// 赛事列表项DTO
///
public class EventListDto
{
public long Id { get; set; }
public string EventName { get; set; }
public string CoverImage { get; set; }
public EventStatus EventStatus { get; set; }
public DateTime RegistrationStartTime { get; set; }
public DateTime RegistrationEndTime { get; set; }
public DateTime MatchStartTime { get; set; }
public DateTime MatchEndTime { get; set; }
public string Address { get; set; } // 省市区+详细地址
}
///
/// 轮播图DTO
///
public class BannerDto
{
public string Title { get; set; }
public string ImageUrl { get; set; }
public LinkType LinkType { get; set; }
public string LinkUrl { get; set; }
public long? EventId { get; set; }
}
///
/// 赛事单位DTO
///
public class EventUnitDto
{
public UnitType UnitType { get; set; }
public string UnitName { get; set; }
public string LogoUrl { get; set; }
}
///
/// 赛事详情DTO
///
public class EventDetailDto : EventListDto
{
public string EventVideo { get; set; }
public EventFormat EventType { get; set; }
public ChargeMode ChargeMode { get; set; }
public RegistrationType RegistrationType { get; set; }
public string EventIntroduction { get; set; }
public string MaterialRemark { get; set; }
public DateTime? MaterialUploadStartTime { get; set; }
public DateTime? MaterialUploadEndTime { get; set; }
// 额外规则字段
public string RefundRule { get; set; } // 退款规则文本
public string PointsRule { get; set; } // 积分规则文本
// 限制条件
public int IndividualProjectLimit { get; set; } // 个人项目限报数量
public int TeamProjectLimit { get; set; } // 团队项目限报数量
// 单位列表
public List Units { get; set; }
// 项目列表
public List Projects { get; set; }
}
///
/// 赛事项目DTO
///
public class EventProjectDto
{
public long Id { get; set; }
public string Name { get; set; }
public string TypeName { get; set; } // 个人/团队
public decimal Fee { get; set; }
public List Groups { get; set; }
}
///
/// 项目组别DTO
///
public class EventProjectGroupDto
{
public long Id { get; set; }
public string GroupName { get; set; }
public string GenderRequirement { get; set; } // 性别要求文本
public string AgeRequirement { get; set; } // 年龄要求文本
}
///
/// 赛事报名提交DTO
///
public class SubmitRegistrationInput
{
[Required]
public long EventId { get; set; }
[Required]
public int RegistrationMode { get; set; } // 1-个人 2-团队
public string? TeamName { get; set; } // 团队报名必填
[Required]
public string ContactName { get; set; }
[Required]
public string ContactPhone { get; set; }
// 报名项目列表
[Required]
public List Items { get; set; }
}
public class SubmitRegistrationItemInput
{
public long ProjectId { get; set; }
public string GroupName { get; set; } // 冗余存储,也可传 GroupId
public long? GroupId { get; set; } // 建议传ID
// 参赛人员列表
public List Persons { get; set; }
}
public class PersonInput
{
[Required]
public string Name { get; set; }
[Required]
public string IdCard { get; set; }
public Gender Gender { get; set; }
public string Phone { get; set; }
public DateTime BirthDate { get; set; }
}
///
/// 支付信息DTO
///
public class PaymentInfoDto
{
public long RegistrationId { get; set; }
public decimal Amount { get; set; }
public int PaymentMethod { get; set; } // 1-线下 2-线上
// 线下支付信息
public string? BankAccountName { get; set; }
public string? BankAccountNo { get; set; }
public string? BankName { get; set; }
// 线上支付参数 (模拟微信支付参数)
public object? WechatPayParams { get; set; }
}
///
/// 上传凭证输入DTO
///
public class UploadVoucherInput
{
[Required]
public string VoucherUrl { get; set; }
}
///
/// 更新参赛人输入DTO
///
public class UpdatePlayerInput
{
[Required]
public long PersonId { get; set; }
[Required]
public string Name { get; set; }
[Required]
public string IdCard { get; set; }
public Gender Gender { get; set; }
public string Phone { get; set; }
}
///
/// 已报赛事列表DTO
///
public class MyEventListDto
{
public long RegistrationId { get; set; }
public long EventId { get; set; }
public string EventName { get; set; }
public string CoverImage { get; set; }
public int RegistrationStatus { get; set; } // 报名状态
public int PaymentStatus { get; set; } // 支付状态
public DateTime RegistrationTime { get; set; }
public int ProjectCount { get; set; } // 报名项目数
}
public class RegistrationDetailDto
{
public long RegistrationId { get; set; }
public long EventId { get; set; }
public string EventName { get; set; }
public string CoverImage { get; set; }
public EventStatus EventStatus { get; set; } // 赛事状态
public int RegistrationStatus { get; set; }
public int PaymentStatus { get; set; }
public decimal TotalAmount { get; set; }
public string OrderNo { get; set; }
public DateTime RegistrationTime { get; set; }
public string? ReviewRemark { get; set; }
// 报名项目及人员
public List Items { get; set; }
}
public class RegistrationItemDto
{
public long Id { get; set; }
public string ProjectName { get; set; }
public string GroupName { get; set; }
public decimal Price { get; set; }
public List Persons { get; set; }
}
public class RegistrationPersonDto
{
public long Id { get; set; }
public string Name { get; set; }
public string IdCard { get; set; }
public Gender Gender { get; set; }
public string Phone { get; set; }
}
///
/// 报名状态查询DTO
///
public class RegistrationStatusDto
{
public long RegistrationId { get; set; }
public int RegistrationStatus { get; set; }
public int PaymentStatus { get; set; }
public string RejectReason { get; set; } // 拒绝/取消原因
}