using AutoMapper; using CoreCms.Net.Model.Entities; using SqlSugar; using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Runtime.InteropServices; using System.Text; using System.Threading.Tasks; namespace CoreCms.Net.Model.ViewModels.SQ { [AutoMap(typeof(SQReservations))] public class SQReservationsDto : SQReservations { public List Participants { get; set; } } [AutoMap(typeof(SQReservations))] public class SQReservationsApiDto : SQReservationsBaseDto { /// /// 所属角色 0 参与者 1 发起者 /// public int Role { get; set; } /// /// 是否 赴约 0 默认,1赴约,2未赴约 /// public int is_arrive { get; set; } } /// /// /// [AutoMap(typeof(SQReservations))] public class SQReservationsMyDto : SQReservationsBaseDto { /// /// /// public int pid { get; set; } /// /// 加入时间 /// public System.DateTime join_time { get; set; } /// /// 退出时间 /// public System.DateTime? quit_time { get; set; } /// /// 状态,0正常,1已退出 /// [Display(Name = "状态,0正常,1已退出")] [Required(ErrorMessage = "请输入{0}")] public System.Int32 pstatus { get; set; } } /// /// 基类 /// public class SQReservationsBaseDto : SQReservations { /// /// 参与人员 /// public List Participants { get; set; } } public class SQReservationsAddDto : SQReservations { /// /// 最晚到店时间 /// public long? LatestDateTime { get; set; } /// /// 开始时间 /// [Display(Name = "开始时间")] [Required(ErrorMessage = "请输入{0}")] public new long start_time { get; set; } /// /// 结束时间 /// [Display(Name = "结束时间")] [Required(ErrorMessage = "请输入{0}")] public new long end_time { get; set; } /// /// 预约ID /// public new System.Int32 id { get; set; } /// /// 创建时间 /// public new System.DateTime created_at { get; set; } /// /// 更新时间 /// public new System.DateTime updated_at { get; set; } /// /// 备注 /// [Display(Name = "备注")] [StringLength(maximumLength: 255, ErrorMessage = "{0}不能超过{1}字")] public new System.String remarks { get; set; } /// /// 重要信息 /// public string important_data { get; set; } } public class SQReservationParticipantsAddDto { /// /// 预约ID /// public new System.Int32 ReservationsId { get; set; } /// /// 重要信息 /// public string important_data { get; set; } } /// /// 取消预约DTO /// public class SQReservationCancelDto { /// /// 预约ID /// [Required(ErrorMessage = "请输入预约ID")] public int reservation_id { get; set; } /// /// 取消原因 /// [StringLength(maximumLength: 255, ErrorMessage = "取消原因不能超过{1}字")] public string cancel_reason { get; set; } } /// /// 签到参与人项(不包含发起者) /// public class SQReservationCheckInAttendeeDto { /// /// 用户ID /// public int user_id { get; set; } /// /// 是否出席(true=赴约,false=未赴约) /// public bool isAttended { get; set; } } /// /// 预约签到 DTO(仅发起者可调用) /// public class SQReservationCheckInDto { [Required(ErrorMessage = "请输入预约ID")] public int reservation_id { get; set; } public List attendeds { get; set; } } public class SQPaymentRecordDto { /// /// 预约标题 /// public string title { get; set; } /// /// 订单号 /// public string paymentId { get; set; } /// /// 订单状态 1. 待支付 2. 已支付 3. 待退款 4. 已退款 /// public int is_refund { get; set; } /// /// 加入时间 /// public DateTime? join_time { get; set; } /// /// 预约状态 0 正常 ,1已退出 /// public int status { get; set; } /// /// 订单状态 文字 如:待支付,已支付等 /// public string is_refund_text { get; set; } } #region 按时段预约相关DTO /// /// 按时段创建预约请求DTO /// public class SQReservationsAddBySlotDto { /// /// 房间ID /// [Required(ErrorMessage = "请选择房间")] public int room_id { get; set; } /// /// 预约日期(Unix时间戳-秒级) /// [Required(ErrorMessage = "请选择预约日期")] public long date { get; set; } /// /// 时段类型:0=凌晨,1=上午,2=下午,3=晚上 /// [Required(ErrorMessage = "请选择预约时段")] [Range(0, 3, ErrorMessage = "时段类型必须在0-3之间")] public int time_slot_type { get; set; } /// /// 最晚到店时间(Unix时间戳-秒级) /// public long? latest_arrival_time { get; set; } /// /// 是否为"无需组局"模式 /// public bool is_solo_mode { get; set; } /// /// 人数(is_solo_mode=true时固定为1) /// [Required(ErrorMessage = "请输入人数")] [Range(1, 20, ErrorMessage = "人数必须在1-20之间")] public int player_count { get; set; } /// /// 鸽子费(保证金),0-50整数 /// [Range(0, 50, ErrorMessage = "鸽子费必须在0-50元之间")] public int deposit_fee { get; set; } /// /// 组局名称 /// [Required(ErrorMessage = "请输入组局名称")] [StringLength(100, ErrorMessage = "组局名称不能超过100字")] public string title { get; set; } /// /// 玩法类型(如:补克) /// [Required(ErrorMessage = "请选择玩法类型")] [StringLength(50, ErrorMessage = "玩法类型不能超过50字")] public string game_type { get; set; } /// /// 具体规则(如:斗地主) /// [StringLength(50, ErrorMessage = "具体规则不能超过50字")] public string game_rule { get; set; } /// /// 其他补充 /// [StringLength(255, ErrorMessage = "其他补充不能超过255字")] public string extra_info { get; set; } /// /// 是否禁烟:0=不限制,1=禁烟,2=不禁烟 /// public int is_smoking { get; set; } /// /// 性别限制:0=不限,1=男,2=女 /// public int gender_limit { get; set; } /// /// 最低信誉分 /// public decimal? credit_limit { get; set; } /// /// 最小年龄限制 /// public int? min_age { get; set; } /// /// 最大年龄限制,0=不限 /// public int? max_age { get; set; } /// /// 重要数据(支付相关) /// public string important_data { get; set; } } /// /// 时段信息DTO /// public class SQTimeSlotDto { /// /// 时段类型:0=凌晨,1=上午,2=下午,3=晚上 /// public int slot_type { get; set; } /// /// 时段名称 /// public string slot_name { get; set; } /// /// 时段状态:available=可预约, reserved=已预约, unavailable=不可用, using=使用中 /// public string status { get; set; } /// /// 标准价格 /// public decimal standard_price { get; set; } /// /// 会员价格 /// public decimal member_price { get; set; } /// /// 标准价格说明 /// public string price_desc_standard { get; set; } /// /// 会员价格说明 /// public string price_desc_member { get; set; } /// /// 不可用类型(当status为unavailable时有效):1=禁用/维护,2=后台预约,3=线下预约 /// public int? unavailable_type { get; set; } /// /// 该时段内的预约列表(仅详情接口返回) /// public List reservations { get; set; } public SQTimeSlotDto() { reservations = new List(); } } /// /// 时段内的预约信息DTO /// public class SQTimeSlotReservationDto { /// /// 预约ID /// public int reservation_id { get; set; } /// /// 开始时间(格式:yyyy-MM-dd HH:mm:ss) /// public string start_time { get; set; } /// /// 结束时间(格式:yyyy-MM-dd HH:mm:ss) /// public string end_time { get; set; } /// /// 预约状态:0=待开始,1=进行中,2=已结束,3=已取消 /// public int status { get; set; } /// /// 组局名称 /// public string title { get; set; } /// /// 玩法类型 /// public string game_type { get; set; } } /// /// 可选日期信息DTO /// public class SQAvailableDateDto { /// /// 日期(Unix时间戳-秒级) /// public long date { get; set; } /// /// 日期文本(今天、明天、后天、日期) /// public string dateText { get; set; } /// /// 日期展示(如:12月06日 周五) /// public string dateDisplay { get; set; } } #endregion #region 鸽子费审核相关DTO /// /// 鸽子费审核列表项 DTO /// public class PigeonFeeAuditListDto { /// /// 参与者ID /// public int participant_id { get; set; } /// /// 预约ID /// public int reservation_id { get; set; } /// /// 预约标题 /// public string reservation_title { get; set; } /// /// 用户ID /// public int user_id { get; set; } /// /// 用户昵称 /// public string nick_name { get; set; } /// /// 手机号 /// public string mobile { get; set; } /// /// 鸽子费金额 /// public decimal deposit_fee { get; set; } /// /// 预约开始时间 /// public DateTime start_time { get; set; } /// /// 预约结束时间 /// public DateTime end_time { get; set; } /// /// 标记时间(发起者签到时间) /// public DateTime? mark_time { get; set; } /// /// 赴约状态:0=未处理,1=已赴约,2=未赴约待审核,3=未赴约已审核 /// public int is_arrive { get; set; } /// /// 房间名称 /// public string room_name { get; set; } } /// /// 鸽子费审核请求 DTO /// public class PigeonFeeAuditRequestDto { /// /// 参与者ID /// [Required(ErrorMessage = "请输入参与者ID")] public int participant_id { get; set; } /// /// 预约ID /// [Required(ErrorMessage = "请输入预约ID")] public int reservation_id { get; set; } /// /// 原因(审核未通过时使用) /// [StringLength(255, ErrorMessage = "原因不能超过255字")] public string reason { get; set; } } #endregion }