using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using CoreCms.Net.Model.Entities; namespace CoreCms.Net.Model.ViewModels.SQ { #region 后台管理DTO /// /// 设置房间价格DTO /// public class SetRoomPricingDto { /// /// 房间ID /// [Required(ErrorMessage = "请选择房间")] public int room_id { get; set; } /// /// 时段类型:0=凌晨,1=上午,2=下午,3=晚上 /// [Required(ErrorMessage = "请选择时段")] [Range(0, 3, ErrorMessage = "时段类型必须在0-3之间")] public int time_slot_type { get; set; } /// /// 标准价格 /// [Required(ErrorMessage = "请输入标准价格")] [Range(0, 99999, ErrorMessage = "标准价格必须大于0")] public decimal standard_price { get; set; } /// /// 会员价格 /// [Required(ErrorMessage = "请输入会员价格")] [Range(0, 99999, ErrorMessage = "会员价格必须大于0")] public decimal member_price { get; set; } /// /// 标准价格说明 /// [StringLength(100, ErrorMessage = "标准价格说明不能超过100字")] public string price_desc_standard { get; set; } /// /// 会员价格说明 /// [StringLength(100, ErrorMessage = "会员价格说明不能超过100字")] public string price_desc_member { get; set; } /// /// 生效开始日期(null表示长期有效) /// public DateTime? effective_date_start { get; set; } /// /// 生效结束日期 /// public DateTime? effective_date_end { get; set; } } /// /// 批量设置房间价格DTO /// public class BatchSetRoomPricingDto { /// /// 房间ID列表 /// [Required(ErrorMessage = "请选择房间")] public List room_ids { get; set; } /// /// 时段类型:0=凌晨,1=上午,2=下午,3=晚上 /// [Required(ErrorMessage = "请选择时段")] [Range(0, 3, ErrorMessage = "时段类型必须在0-3之间")] public int time_slot_type { get; set; } /// /// 标准价格 /// [Required(ErrorMessage = "请输入标准价格")] public decimal standard_price { get; set; } /// /// 会员价格 /// [Required(ErrorMessage = "请输入会员价格")] public decimal member_price { get; set; } /// /// 标准价格说明 /// [StringLength(100, ErrorMessage = "标准价格说明不能超过100字")] public string price_desc_standard { get; set; } /// /// 会员价格说明 /// [StringLength(100, ErrorMessage = "会员价格说明不能超过100字")] public string price_desc_member { get; set; } /// /// 生效开始日期 /// public DateTime? effective_date_start { get; set; } /// /// 生效结束日期 /// public DateTime? effective_date_end { get; set; } } /// /// 设置房间不可用时段DTO /// public class SetRoomUnavailableDto { /// /// 房间ID /// [Required(ErrorMessage = "请选择房间")] public int room_id { get; set; } /// /// 日期(Unix时间戳-秒级,用于按时段设置) /// public long? date { get; set; } /// /// 时段类型:0=凌晨,1=上午,2=下午,3=晚上(与date配合使用) /// [Range(0, 3, ErrorMessage = "时段类型必须在0-3之间")] public int? time_slot_type { get; set; } /// /// 精确开始时间(Unix时间戳-秒级,用于精确时间设置) /// public long? start_time { get; set; } /// /// 精确结束时间(Unix时间戳-秒级,用于精确时间设置) /// public long? end_time { get; set; } /// /// 不可用原因 /// [Required(ErrorMessage = "请输入不可用原因")] [StringLength(255, ErrorMessage = "原因不能超过255字")] public string reason { get; set; } /// /// 创建人ID /// public int? created_by { get; set; } } /// /// 房间完整配置DTO /// public class RoomConfigDto { /// /// 房间基础信息 /// public SQRooms room { get; set; } /// /// 价格配置列表(4个时段) /// public List pricing { get; set; } /// /// 不可用时段列表 /// public List unavailable_times { get; set; } } /// /// 房间价格配置DTO /// public class SQRoomPricingDto { /// /// 配置ID /// public int id { get; set; } /// /// 房间ID /// public int room_id { get; set; } /// /// 时段类型 /// public int time_slot_type { get; set; } /// /// 时段名称 /// public string time_slot_name { 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; } /// /// 生效开始日期 /// public DateTime? effective_date_start { get; set; } /// /// 生效结束日期 /// public DateTime? effective_date_end { get; set; } /// /// 是否启用 /// public bool is_active { get; set; } /// /// 创建时间 /// public DateTime created_at { get; set; } /// /// 更新时间 /// public DateTime updated_at { get; set; } } /// /// 节假日定价DTO /// public class SetHolidayPricingDto { /// /// 房间ID列表(空表示所有房间) /// public List room_ids { get; set; } /// /// 节假日名称 /// [Required(ErrorMessage = "请输入节假日名称")] [StringLength(50, ErrorMessage = "节假日名称不能超过50字")] public string holiday_name { get; set; } /// /// 开始日期 /// [Required(ErrorMessage = "请选择开始日期")] public DateTime start_date { get; set; } /// /// 结束日期 /// [Required(ErrorMessage = "请选择结束日期")] public DateTime end_date { get; set; } /// /// 时段价格配置 /// [Required(ErrorMessage = "请配置价格")] public List slot_prices { get; set; } } /// /// 节假日时段价格配置 /// public class HolidaySlotPriceDto { /// /// 时段类型 /// public int time_slot_type { get; set; } /// /// 标准价格 /// public decimal standard_price { get; set; } /// /// 会员价格 /// public decimal member_price { get; set; } } /// /// 预约统计DTO /// public class ReservationStatisticsDto { /// /// 统计开始日期 /// public DateTime start_date { get; set; } /// /// 统计结束日期 /// public DateTime end_date { get; set; } /// /// 总预约数 /// public int total_reservations { get; set; } /// /// 完成预约数 /// public int completed_reservations { get; set; } /// /// 取消预约数 /// public int cancelled_reservations { get; set; } /// /// 总收入 /// public decimal total_revenue { get; set; } /// /// 各房间预约统计 /// public List room_stats { get; set; } /// /// 各时段预约统计 /// public List time_slot_stats { get; set; } } /// /// 房间预约统计 /// public class RoomReservationStatDto { /// /// 房间ID /// public int room_id { get; set; } /// /// 房间名称 /// public string room_name { get; set; } /// /// 预约次数 /// public int reservation_count { get; set; } /// /// 完成次数 /// public int completed_count { get; set; } /// /// 收入 /// public decimal revenue { get; set; } } /// /// 时段预约统计 /// public class TimeSlotStatDto { /// /// 时段类型 /// public int time_slot_type { get; set; } /// /// 时段名称 /// public string time_slot_name { get; set; } /// /// 预约次数 /// public int reservation_count { get; set; } /// /// 收入 /// public decimal revenue { get; set; } } #endregion }