using Edu.Common.Enum.Sale;
using Edu.Common.Plugin;
using Edu.Model.Entity.Sell;
using Edu.Model.ViewModel.EduTask;
using System;
using System.Collections.Generic;

namespace Edu.Model.ViewModel.Sell
{
    /// <summary>
    /// 客人实体类
    /// </summary>
    [Serializable]
    public class RB_Order_Guest_ViewModel : RB_Order_Guest
    {
        /// <summary>
        /// 订单学生号
        /// </summary>
        public string OrderGuestIds { get; set; }

        /// <summary>
        /// 订单ids
        /// </summary>
        public string OrderIds { get; set; }

        /// <summary>
        /// 班级ids
        /// </summary>
        public string ClassIds { get; set; }

        /// <summary>
        /// 业务员id
        /// </summary>
        public int EnterID { get; set; }

        /// <summary>
        /// 业务员
        /// </summary>
        public string EnterName { get; set; }
        /// <summary>
        /// 班级名称
        /// </summary>
        public string ClassName { get; set; }

        /// <summary>
        /// 班号
        /// </summary>
        public string ClassNo { get; set; }
        /// <summary>
        /// 老师id
        /// </summary>
        public int Teacher_Id { get; set; }

        /// <summary>
        /// rb_student表的id
        /// </summary>
        public int StudentId { get; set; }

        /// <summary>
        /// 课程名称
        /// </summary>
        public string CourseName { get; set; }

        /// <summary>
        /// 出勤
        /// </summary>
        public int IsCheck { get; set; }

        /// <summary>
        /// 生日
        /// </summary>
        public string BirthDay { get; set; }

        /// <summary>
        /// 学员状态
        /// </summary>
        public string GuestStateStr
        {
            get
            {
                return this.GuestState.ToName();
            }
        }

        /// <summary>
        /// 合同主键编号
        /// </summary>
        public int ContractId { get; set; }

        /// <summary>
        /// 合同编号
        /// </summary>
        public string ContractNo { get; set; }

        /// <summary>
        /// 合同状态
        /// </summary>
        public int ContractStatus { get; set; }

        /// <summary>
        /// 合同状态字符串
        /// </summary>
        public string ContractStatusStr
        {
            get; set;
        }

        /// <summary>
        /// 课程编号
        /// </summary>
        public int CourseId { get; set; }

        /// <summary>
        /// 订单类型
        /// </summary>
        public OrderTypeEnum OrderType { get; set; }

        /// <summary>
        /// 开始课时
        /// </summary>
        public int StartClassHours { get; set; }

        /// <summary>
        /// 订单报入类型(1-正常报入，2-插班报入，3-续费订单，4-转班订单，5-分拆订单)
        /// </summary>
        public OrderJoinTypeEnum JoinType { get; set; }

        /// <summary>
        /// 原订单报入类型(1-正常报入，2-插班报入，3-续费订单，4-转班订单，5-分拆订单)
        /// </summary>
        public OrderJoinTypeEnum TargetJoinType { get; set; }

        /// <summary>
        /// 原订单编号
        /// </summary>
        public int SourceOrderId { get; set; }

        /// <summary>
        /// 原订单班级名称
        /// </summary>
        public string SourceClassName { get; set; }

        /// <summary>
        /// 目标订单编号
        /// </summary>
        public int TargetOrderId { get; set; }

        /// <summary>
        /// 目标订单班级名称
        /// </summary>
        public string TargetClassName { get; set; }

        /// <summary>
        /// 生效时间
        /// </summary>
        public DateTime EffectTime { get; set; }

        /// <summary>
        /// 停课生效时间
        /// </summary>
        public DateTime? StopClassEffectTime { get; set; }

        /// <summary>
        /// 生效状态(1-正常，2-全部)
        /// </summary>
        public int QEffectStatus { get; set; }

        /// <summary>
        /// 生效状态(0-未生效，1-生效中，2-完成)
        /// </summary>
        public int EffectStatus { get; set; }

        /// <summary>
        /// 生效状态字符串
        /// </summary>
        public string EffectStatusStr
        {
            get
            {
                string str = "";
                if (this.EffectStatus == 0)
                {
                    str = "未生效";
                }
                else if (this.EffectStatus == 1)
                {
                    str = "生效中";
                }
                else if (this.EffectStatus == 2)
                {
                    str = "完成";
                }
                return str;
            }
        }

        /// <summary>
        /// 前置订单编号
        /// </summary>
        public int UpOrderId { get; set; }

        /// <summary>
        /// 总上课次数
        /// </summary>
        public int TotalPlanNum { get; set; }

        /// <summary>
        /// 已上课次数
        /// </summary>
        public int Ranks { get; set; }

        ///<summary>
        /// 是否续班订单
        /// </summary>
        public int IsRenewOrder { get; set; }

        /// <summary>
        /// 续课订单编号
        /// </summary>
        public int RenewOrderId { get; set; }

        /// <summary>
        /// 老师
        /// </summary>
        public string TeacherName { get; set; }

        /// <summary>
        /// 学校
        /// </summary>
        public string SchoolName { get; set; }
        /// <summary>
        /// 上课时间id
        /// </summary>
        public int ClassTimeId { get; set; }

        /// <summary>
        /// 上课计划id
        /// </summary>
        public int ClassPlanId { get; set; }

        /// <summary>
        /// 合同总课时
        /// </summary>
        public int ContractTotalHours { get; set; }

        /// <summary>
        /// 合同文件列表
        /// </summary>
        public List<string> ContractUrlList
        {
            get
            {
                List<string> list = new List<string>();
                if (!string.IsNullOrEmpty(this.ContractUrl))
                {
                    list = Common.Plugin.JsonHelper.DeserializeObject<List<string>>(this.ContractUrl);
                }
                return list;
            }
        }

        /// <summary>
        /// 已完成课时的学员
        /// </summary>
        public int QFinishGuest { get; set; }

        /// <summary>
        /// 学员业务单据列表
        /// </summary>
        public List<RB_Education_Receipt_ViewModel> GuestEduReceiptList { get; set; }

        /// <summary>
        /// 学习目的
        /// </summary>
        public string LearningGoalsName { get; set; }


        /// <summary>
        /// QQ号码
        /// </summary>
        public string QQ { get; set; }

        /// <summary>
        /// 微信号
        /// </summary>
        public string WeChatNo { get; set; }

        /// <summary>
        /// 用户头像
        /// </summary>
        public string UserIcon { get; set; }

        /// <summary>
        /// 学员手机号码【显示135****6755】
        /// </summary>
        public string StuTel { get; set; }

        /// <summary>
        /// 学员真实手机号码【13551126755】
        /// </summary>
        public string StuRealMobile { get; set; }
    }
}