/*********************************************************************** * Project: CoreCms * ProjectName: 核心内容管理系统 * Web: https://www.corecms.net * Author: 大灰灰 * Email: jianweie@163.com * CreateTime: 2025/12/06 * Description: 房间相关 DTO ***********************************************************************/ using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; namespace CoreCms.Net.Model.ViewModels.SQ { /// /// 房间列表响应 DTO(含时段信息) /// public class SQRoomListDto { /// /// 房间ID /// public int id { get; set; } /// /// 房间名称 /// public string name { get; set; } /// /// 房间类型 /// public string room_type { get; set; } /// /// 房间图片URL /// public string image_url { get; set; } /// /// 价格/小时 /// public decimal price_per_hour { get; set; } /// /// 可容纳人数 /// public int capacity { get; set; } /// /// 房间描述 /// public string description { get; set; } /// /// 房间状态:available-可预约, using-使用中, unavailable-不可用 /// public string status { get; set; } /// /// 是否可预约 /// public bool is_available { get; set; } public string room_type_name { get; set; } public bool can_reserve { get; set; } public string standard_price_desc { get; set; } public string member_price_desc { get; set; } /// /// 时段占用信息(仅当 showTimeSlots=true 时返回) /// public List time_slots { get; set; } } /// /// 房间时段占用信息 /// public class SQRoomTimeSlotsDto { /// /// 凌晨 0:00-6:00 /// public SQRoomTimeSlotDto dawn { get; set; } /// /// 上午 6:00-12:00 /// public SQRoomTimeSlotDto morning { get; set; } /// /// 下午 12:00-18:00 /// public SQRoomTimeSlotDto afternoon { get; set; } /// /// 晚上 18:00-24:00 /// public SQRoomTimeSlotDto evening { get; set; } } /// /// 单个时段占用信息 /// public class SQRoomTimeSlotDto { /// /// 是否被占用 /// public bool is_occupied { get; set; } /// /// 预约列表 /// public List reservations { get; set; } public SQRoomTimeSlotDto() { reservations = new List(); } } /// /// 时段内的预约信息 /// public class SQRoomTimeSlotReservationDto { /// /// 开始时间 /// public string start_time { get; set; } /// /// 结束时间 /// public string end_time { get; set; } } /// /// 可预约房间响应 DTO(增强版) /// public class SQRoomAvailableDto { /// /// 房间ID /// public int id { get; set; } /// /// 房间名称 /// public string name { get; set; } /// /// 房间类型 /// public string room_type { get; set; } /// /// 房间图片URL /// public string image_url { get; set; } /// /// 价格/小时 /// public decimal price_per_hour { get; set; } /// /// 可容纳人数 /// public int capacity { get; set; } /// /// 房间描述 /// public string description { get; set; } /// /// 显示名称(用于前端直接显示) /// public string display_name { get; set; } } /// /// 房间详情响应 DTO /// public class SQRoomDetailDto { /// /// 房间ID /// public int id { get; set; } /// /// 房间名称 /// public string name { get; set; } /// /// 房间类型 /// public string room_type { get; set; } /// /// 房间类型名称 /// public string room_type_name { get; set; } /// /// 房间主图URL /// public string image_url { get; set; } /// /// 房间多图展示 /// public List images { get; set; } /// /// 价格/小时 /// public decimal price_per_hour { get; set; } /// /// 可容纳人数 /// public int capacity { get; set; } /// /// 房间描述 /// public string description { get; set; } /// /// 设施列表 /// public List amenities { get; set; } /// /// 房间状态:available-可预约, using-使用中, unavailable-不可用 /// public string status { get; set; } /// /// 是否可预约 /// public bool is_available { get; set; } /// /// 是否可以立即预约(至少有一个时段可用) /// public bool can_reserve { get; set; } /// /// 标准价格说明 /// public string standard_price_desc { get; set; } /// /// 会员价格说明 /// public string member_price_desc { get; set; } /// /// 时段占用信息(包含4个时段的状态和价格) /// public List time_slots { get; set; } /// /// 今日预约情况 /// public List today_reservations { get; set; } public SQRoomDetailDto() { images = new List(); amenities = new List(); time_slots = new List(); today_reservations = new List(); } } /// /// 房间详情中的预约信息 /// public class SQRoomDetailReservationDto { /// /// 开始时间 /// public string start_time { get; set; } /// /// 结束时间 /// public string end_time { get; set; } /// /// 预约状态 /// public int status { get; set; } } /// /// 营业时间配置响应 DTO /// public class SQBusinessHoursDto { /// /// 开始营业时间(HH:mm格式) /// public string open_time { get; set; } /// /// 结束营业时间(HH:mm格式) /// public string close_time { get; set; } /// /// 是否24小时营业 /// public bool is_24_hours { get; set; } /// /// 营业时间描述文本 /// public string description { get; set; } } }