using System;
using System.Collections.Generic;
using System.Text;
using Edu.Model.Entity.Scroll;

namespace Edu.Model.ViewModel.Scroll
{
    /// <summary>
    /// 滚动开班上课时段扩展类
    /// </summary>
    public class RB_Scroll_CourseTime_ViewModel : RB_Scroll_CourseTime
    {
        /// <summary>
        /// 时段
        /// </summary>
        public List<CourseTimeModel> TimeList { get; set; }

        /// <summary>
        /// ids
        /// </summary>
        public string CourseTimeIds { get; set; }
    }

    /// <summary>
    /// 时段
    /// </summary>
    public class CourseTimeModel { 
        /// <summary>
        /// 排序
        /// </summary>
        public int Sort { get; set; }

        /// <summary>
        /// 开始时间
        /// </summary>
        public string StartTime { get; set; }

        /// <summary>
        /// 结束时间
        /// </summary>
        public string EndTime { get; set; }

        /// <summary>
        /// 上课分钟数
        /// </summary>
        public int Minutes { get; set; }

        /// <summary>
        /// 消费课时
        /// </summary>
        public int ClassHours { get; set; }

    }

    /// <summary>
    /// 时段扩展
    /// </summary>
    public class CourseTimeExtend : CourseTimeModel
    {
        /// <summary>
        /// 预约状态  1未预约  2不可预约  3他人预约  4我的预约
        /// </summary>
        public int State { get; set; }

        /// <summary>
        /// 预约的课程
        /// </summary>
        public int CourseId { get; set; }

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

        /// <summary>
        /// 课程章节
        /// </summary>
        public int CourseChapterNo { get; set; }

        /// <summary>
        /// 预约人数
        /// </summary>
        public int PeopleNum { get; set; }

        /// <summary>
        /// 最少人数
        /// </summary>
        public int MinPeopleNum { get; set; }

        /// <summary>
        /// 最大人数
        /// </summary>
        public int MaxPeopleNum { get; set; }

        /// <summary>
        /// 标识 （用于判断哪些时段是一起上的）
        /// </summary>
        public string SortIdentify { get; set; }

        /// <summary>
        /// 描述
        /// </summary>
        public string Description { get; set; }

        public DateTime SDate { get => Convert.ToDateTime("2022-01-01 " + this.StartTime); }
        public DateTime EDate { get => Convert.ToDateTime("2022-01-01 " + this.EndTime); }
    }
}