using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection.Metadata.Ecma335;
using System.Text;
using System.Threading.Tasks;

namespace OASystem.Domain.ViewModels.Statistics
{
    /// <summary>
    /// 企业利润报表
    /// </summary>
    public class CorporateProfit
    {
        public int DiId { get; set; }

        public string TeamName { get; set; }

        public DateTime CreateDt { get; set; }

        /// <summary>
        /// 总支出
        /// </summary>
        public decimal TotalExpenditure { get; set; }

        /// <summary>
        /// 支出Item
        /// </summary>
        public List<ExpenditureInfo> ExpenditureItem { get; set; }

        /// <summary>
        /// 应收金额
        /// </summary>
        public decimal AmountReceivable { get; set; }

        /// <summary>
        /// 已收金额
        /// </summary>
        public decimal AmountReceived { get; set; }

        /// <summary>
        /// 应收利润
        /// </summary>
        public decimal ReceivableProfit { get; set; }

        /// <summary>
        /// 已收利润
        /// </summary>
        public decimal ReceivedProfit { get; set; }
    }

    public class ExpenditureInfo
    {
        /// <summary>
        /// 名称
        /// </summary>
        public string ItemName { get; set; }

        /// <summary>
        /// 金额
        /// </summary>
        public decimal Amount { get; set; }
    }

    #region 企业利润 View

    public class CorporateProfitMonthView
    {
        /// <summary>
        /// 月份
        /// </summary>
        public int Month { get; set; }

        /// <summary>
        /// 利润
        /// </summary>
        public decimal Profit { get; set; }

        public Object GroupInfos { get; set; }
    }
    #endregion

    #region 团组各类型预订数量 View

    public class BookingNumberBaseView
    {
        public string Name { get; set; }

        public int Number { get; set; }

        
    }

    /// <summary>
    /// 接团 View
    /// </summary>
    public class GroupBookingNumberView: BookingNumberBaseView
    {
        public List<GroupInfo> GroupItem { get; set; }
    }

    /// <summary>
    /// 酒店 View
    /// </summary>
    public class HotelBookingNumberView : BookingNumberBaseView
    {
        public List<HotelInfo> HotelItem { get; set; }
    }

    public class HotelInfo : StatisticsHotelInfo
    {
        public GroupInfo GroupInfo { get; set; }
    }



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

        /// <summary>
        /// 团组名称
        /// </summary>
        public string TeamName { get; set; }

        /// <summary>
        /// 接团时间
        /// </summary>
        public string CreateTime { get; set; }

        /// <summary>
        /// 单位
        /// </summary>
        public string ClientUnit { get; set; }

        /// <summary>
        /// 负责人
        /// </summary>
        public string Principal { get; set; }
    }


    public class GroupTypeNumberInfo
    {
        public int DiId { get; set; }

        public string GroupName { get; set; }

        public List<TypeInfo> TypeItem { get; set; }
    }

    public class TypeInfo
    {
        /// <summary>
        /// 类型Id
        /// 1 接团 2 酒店 3 机票 4 车辆
        /// </summary>
        public int Id { get; set; }

        public string Name { get {
                if (Id == 1) return "接团";
                else if (Id == 2) return "酒店";
                else if (Id == 3) return "机票";
                else if (Id == 4) return "车辆";
                return "Unknown";
            } }

        public List<RegionInfo> RegionItem { get; set; }
    }

    public class RegionInfo
    {

        public string Name { get; set; }
        public int Number { get; set; }

        public List<dynamic> Data { get; set; }= new List<dynamic>();
    }

    public class StatisticsHotelInfo
    {
        public string HotelName { get; set; }

        public int SingleRoomNum { get; set; }

        public int DoubleRoomNum { get; set; }

        public int SuiteRoomNum { get; set; }

        public int OtherRoomNum { get; set; }

    }

    #endregion
}
