using FluentValidation;
using OASystem.Domain.ViewModels.Groups;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace OASystem.Domain.Dtos.Groups
{
    /// <summary>
    /// 酒店预定
    /// item Dto
    /// </summary>
    public class HotelReservationItemDto : UserPageFuncDtoBase
    {
        public int DiId { get; set; }

        public int IsPaySign { get; set; }
    }

    /// <summary>
    /// 酒店预定
    /// BasicsData Dto
    /// </summary>
    public class HotelReservationBasicsDataInitDto : UserPageFuncDtoBase
    {
        public int DiId { get; set; }
    }

    /// <summary>
    /// 酒店预定
    /// Details Dto
    /// </summary>
    public class HotelReservationsDetailsDto : UserPageFuncDtoBase
    {
       public  int DiId { get; set; }
        public int Id { get; set; }
    }

    /// <summary>
    /// 酒店预定
    /// Add Or Edit
    /// </summary>
    public class HotelReservationsAddOrEditDto : UserPageFuncDtoBase
    {
        /// <summary>
        /// Id
        /// Id == 0 Add  Or Id > 0 Edit
        /// </summary>
        public int Id { get; set; }
        
        /// <summary>
        /// 团组Id
        /// </summary>
        public int DiId { get; set; }

        /// <summary>
        /// 客人类型 Id （设置数据外键编号）
        /// </summary>
        public int GTId { get; set; }

        /// <summary>
        /// 入住卷号
        /// </summary>
        public string? CheckNumber { get; set; }

        /// <summary>
        /// 预订网站（设置数据外键编号）
        /// </summary>
        public int ReservationsWebsite { get; set; }

        /// <summary>
        /// 预订号码
        /// </summary>
        public string? ReservationsNo { get; set; }

        /// <summary>
        /// 确认号码
        /// </summary>
        public string? DetermineNo { get; set; }

        /// <summary>
        /// 城市
        /// </summary>
        public string? City { get; set; }

        /// <summary>
        /// 酒店名称
        /// </summary>
        public string? HotelName { get; set; }

        /// <summary>
        /// 酒店电话
        /// </summary>
        public string? HotelTel { get; set; }

        /// <summary>
        /// 酒店地址
        /// </summary>
        public string? HotelAddress { get; set; }

        /// <summary>
        /// 客户名称
        /// </summary>
        public string? GuestName { get; set; }

        /// <summary>
        /// 入住时间
        /// </summary>
        public string? CheckInDate { get; set; }

        /// <summary>
        /// 离店时间
        /// </summary>
        public string? CheckOutDate { get; set; }

        /// <summary>
        /// 房间入住人类型（设置数据外键编号）
        /// </summary>
        public int CheckType { get; set; }

        /// <summary>
        /// 房间说明
        /// </summary>
        public string? RoomExplanation { get; set; }

        /// <summary>
        /// 酒店备注
        /// </summary>
        public string? HotelRemark { get; set; }

        /// <summary>
        /// 单间价格
        /// </summary>
        public decimal SingleRoomPrice { get; set; }

        /// <summary>
        /// 单间数量
        /// </summary>
        public int SingleRoomCount { get; set; }

        /// <summary>
        /// 双间价格
        /// </summary>
        public decimal DoubleRoomPrice { get; set; }

        /// <summary>
        /// 双间数量
        /// </summary>
        public int DoubleRoomCount { get; set; }

        /// <summary>
        /// 套房价格
        /// </summary>
        public decimal SuiteRoomPrice { get; set; }

        /// <summary>
        /// 套房数量
        /// </summary>
        public int SuiteRoomCount { get; set; }

        /// <summary>
        /// 其他房间价格
        /// </summary>
        public decimal OtherRoomPrice { get; set; }

        /// <summary>
        /// 其他房间数量
        /// </summary>
        public int OtherRoomCount { get; set; }

        /// <summary>
        /// 信用卡金额/项费用总计合费用
        /// </summary>
        public decimal CardPrice { get; set; }

        /// <summary>
        /// 信用卡币种/项费用总计合费用币种
        /// </summary>
        public int CardPriceCurrency { get; set; }

        /// <summary>
        /// 子表信息
        /// </summary>
        public List<HotelReservationsContnetDetailsView> Contents { get; set; }

        /// <summary>
        /// C表付款信息 备注
        /// </summary>
        public string? CcpRemark { get; set; }
    }

    /// <summary>
    /// 酒店预定
    /// Del
    /// </summary>
    public class HotelReservationsDelDto : UserPageFuncDtoBase
    {
        /// <summary>
        /// Id
        /// </summary>
        public int Id { get; set; }

        /// <summary>
        /// 团组Id
        /// </summary>
        public int DiId { get; set; }

    }

    /// <summary>
    /// 酒店预订
    /// 预订成本 excel 下载
    /// </summary>
    public class HotelReservations_PCFD_DTO : UserPageFuncDtoBase
    {
        public int DiId { get; set; }
    }

    #region 酒店预订 预订成本 excel 下载 参数验证
    public class HotelReservations_PCFD_DTOFoalidator : AbstractValidator<HotelReservations_PCFD_DTO>
    {
        public HotelReservations_PCFD_DTOFoalidator()
        { 
            RuleFor(it => it.DiId)
                .GreaterThan(0)
                .WithMessage($"请传入有效的用户DiId值");

        }
    }

    #endregion


    /// <summary>
    /// 酒店预订
    /// 生成VOUCHER
    /// </summary>
    public class HotelReservationsCreateVoucherDto : UserPageFuncDtoBase
    {
        public int DiId { get; set; }
        public int Id { get; set; }
    }

    /// <summary>
    /// 酒店预订
    /// 确认单
    /// </summary>
    public class HotelReservationsConfirmationSlipDto : UserPageFuncDtoBase
    {
        public int DiId { get; set; }
    }





    #region 保留

    public class HotelReservationsDto
    {
        /// <summary>
        /// 请求端口分类
        /// 1 Web 2 Android 3 IOS
        /// </summary>
        public int PortType { get; set; } = 1;
        public int UserId { get; set; }
        public int DiId { get; set; }
    }
    /// <summary>
    /// 根据团组查询酒店预订列表数据
    /// </summary>
    public class HotelReservationsByDiIdDto: DtoBase
    {
        public int DiId { get; set; }
    }
    public class HotelReservationsByIdDto
    {
        public int Id { get; set; }
    }

    /// <summary>
    /// 编辑，新增参数
    /// </summary>
    public class OpHotelReservationsData
    {
        /// <summary>
        /// 操作状态
        /// 1 添加 
        /// 2 修改 
        /// </summary>
        public int Status { get; set; }
        public int Id { get; set; }
        /// <summary>
        /// 团组Id
        /// </summary>
        public int DiId { get; set; }
        /// <summary>
        /// 客人类型（设置数据外键编号）
        /// </summary>
        public int GTId { get; set; }
        /// <summary>
        /// 入住卷号码
        /// </summary>
        public string CheckNumber { get; set; }
        /// <summary>
        /// 预订网站（设置数据外键编号）
        /// </summary>
        public int ReservationsWebsite { get; set; }
        /// <summary>
        /// 预订号码
        /// </summary>
        public string ReservationsNo { get; set; }
        /// <summary>
        /// 酒店确定编号
        /// </summary>
        public string DetermineNo { get; set; }
        /// <summary>
        /// 所在城市
        /// </summary>
        public string City { get; set; }
        /// <summary>
        /// 酒店名称
        /// </summary>
        public string HotelName { get; set; }
        /// <summary>
        /// 酒店地址
        /// </summary>
        public string HotelAddress { get; set; }
        /// <summary>
        /// 酒店电话
        /// </summary>
        public string HotelTel { get; set; }
        /// <summary>
        /// 客人姓名
        /// </summary>
        public string GuestName { get; set; }
        /// <summary>
        /// 入住日期
        /// </summary>
        public string CheckInDate { get; set; }
        /// <summary>
        /// 退房日期
        /// </summary>
        public string CheckOutDate { get; set; }
        /// <summary>
        /// 预算币种（设置数据外键编号）
        /// </summary>
        public int BudgetCurrency { get; set; }
        /// <summary>
        /// 单间数量
        /// </summary>
        public int SingleRoomCount { get; set; }
        /// <summary>
        /// 单间单价
        /// </summary>
        public decimal SingleRoomPrice { get; set; }
        /// <summary>
        /// 双间数量
        /// </summary>
        public int DoubleRoomCount { get; set; }
        /// <summary>
        /// 双间单价
        /// </summary>
        public decimal DoubleRoomPrice { get; set; }
        /// <summary>
        /// 套房数量
        /// </summary>
        public int SuiteRoomCount { get; set; }
        /// <summary>
        /// 套房单价
        /// </summary>
        public decimal SuiteRoomPrice { get; set; }
        /// <summary>
        /// 其他房型数量
        /// </summary>
        public int OtherRoomCount { get; set; }
        /// <summary>
        /// 其他房型单价
        /// </summary>
        public decimal OtherRoomPrice { get; set; }
        /// <summary>
        /// 房间说明
        /// </summary>
        public string RoomExplanation { get; set; }
        /// <summary>
        /// 附件地址
        /// </summary>
        public string Attachment { get; set; }
       
        /// <summary>
        /// 信用卡刷卡类型
        /// </summary>
        public int CardPriceCurrency { get; set; }
        /// <summary>
        /// 信用卡金额
        /// </summary>
        public decimal CardPrice { get; set; }
        /// <summary>
        /// 预计单间数量
        /// </summary>
        public int PredictSingleRoom { get; set; }
        /// <summary>
        /// 预计双人间数量
        /// </summary>
        public int PredictDoubleRoom { get; set; }
        /// <summary>
        /// 预计套房数量
        /// </summary>
        public int PredictSuiteRoom { get; set; }
        /// <summary>
        /// 预计其他间数量
        /// </summary>
        public int PredictOtherRoom { get; set; }
        /// <summary>
        /// 地税
        /// </summary>
        public decimal GovernmentRent { get; set; }
        /// <summary>
        /// 地税币种
        /// </summary>
        public int GovernmentRentCurrency { get; set; }
        /// <summary>
        /// 城市税
        /// </summary>
        public decimal CityTax { get; set; }
        /// <summary>
        /// 城市税币种
        /// </summary>
        public int CityTaxCurrency { get; set; }
        /// <summary>
        /// 房间入住人类型
        /// </summary>
        public string CheckType { get; set; }
        /// <summary>
        /// 创建者Id
        /// </summary>
        public int CreateUserId { get; set; }
        /// <summary>
        /// 表备注
        /// </summary>
        public string Remark { get; set; }
        //C表参数
        /// <summary>
        /// 付款金额
        /// </summary>
        public decimal PayMoney { get; set; }
        /// <summary>
        /// 付款币种 数据类型Id
        /// </summary>
        public int PaymentCurrency { get; set; }
        /// <summary>
        /// 支付方式
        /// </summary>
        public int PayDId { get; set; }
        /// <summary>
        /// 消费方式
        /// </summary>
        public string ConsumptionPatterns { get; set; }
        /// <summary>
        /// 消费日期
        /// </summary>
        public String ConsumptionDate { get; set; }
        /// <summary>
        /// 卡类型
        /// </summary>
        public int CTDId { get; set; }

        /// <summary>
        /// 公司银行卡号
        /// </summary>
        public string CompanyBankNo { get; set; }
        /// <summary>
        /// 对方开户行
        /// </summary>
        public string OtherBankName { get; set; }
        /// <summary>
        /// 对方银行账号
        /// </summary>
        public string OtherSideNo { get; set; }
        /// <summary>
        /// 对方姓名
        /// </summary>
        public string OtherSideName { get; set; }

        /// <summary>
        /// 银行卡号
        /// </summary>
        public string BankNo { get; set; }
        /// <summary>
        /// 持卡人姓名
        /// </summary>
        public string CardholderName { get; set; }
        /// <summary>
        /// 收款方
        /// </summary>
        public string Payee { get; set; }
        /// <summary>
        /// 费用标识
        /// </summary>
        public int OrbitalPrivateTransfer { get; set; }

        /// <summary>
        /// C表备注
        /// </summary>
        public string CRemark { get; set; }
    }

    public class HotelReservationsCNYDto 
    {
        /// <summary>
        /// 类型ID
        /// </summary>
        public int CTable { get; set; }
        /// <summary>
        /// 团组Id
        /// </summary>
        public int DiId { get; set; }
        /// <summary>
        /// 信用卡金额
        /// </summary>
        public decimal CardPrice { get; set; }
        /// <summary>
        /// 信用卡金额币种
        /// </summary>
        public int CardPriceCurrency { get; set; }
        /// <summary>
        /// 地税
        /// </summary>
        public decimal GovernmentRent { get; set; }
        /// <summary>
        /// 地税币种
        /// </summary>
        public int GovernmentRentCurrency { get; set; }
        /// <summary>
        /// 城市税
        /// </summary>
        public decimal CityTax { get; set; }
        /// <summary>
        /// 城市税币种
        /// </summary>
        public int CityTaxCurrency { get; set; }
    }
    #endregion
}
