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

namespace Edu.Model.ViewModel.Course
{
    /// <summary>
    /// 课程报价单视图实体
    /// </summary>
    public class RB_Course_Offer_ViewModel : RB_Course_Offer
    {
        /// <summary>
        /// 创建人
        /// </summary>
        public string CreateByName { get; set; }

        /// <summary>
        /// 修改人
        /// </summary>
        public string UpdateByName { get; set; }


        /// <summary>
        /// 创建时间
        /// </summary>
        public string CreateTimeStr { get { return Common.ConvertHelper.FormatTime(this.CreateTime); } }

        /// <summary>
        /// 修改时间
        /// </summary>
        public string UpdateTimeStr { get { return Common.ConvertHelper.FormatTime(this.UpdateTime); } }

        /// <summary>
        /// 报价单有效期开始时间
        /// </summary>
        public string EffectiveStartStr { get { return Common.ConvertHelper.FormatTime(this.EffectiveStart); } }

        /// <summary>
        /// 报价单有效期结束日期
        /// </summary>
        public string EffectiveEndStr { get { return Common.ConvertHelper.FormatTime(this.EffectiveEnd); } }

        /// <summary>
        /// 客户类型名称
        /// </summary>
        public string CustomerTypeName { get { return Common.Plugin.EnumHelper.ToName(this.CustomerType); } }

        /// <summary>
        /// 客户来源名称
        /// </summary>
        public string CustomerSourceName { get { return Common.Plugin.EnumHelper.ToName(this.CustomerSource); } }

        /// <summary>
        /// 客户确认状态字符串
        /// </summary>
        public string CustomerStatusName { get { return Common.Plugin.EnumHelper.ToName(this.CustomerStatus); } }

        /// <summary>
        /// 报价单类型名称
        /// </summary>
        public string OfferTypeName { get { return Common.Plugin.EnumHelper.ToName(this.OfferType); } }

        /// <summary>
        /// 创建时间--开始
        /// </summary>
        public string QStart { get; set; }

        /// <summary>
        /// 创建时间--结束
        /// </summary>
        public string QEnd { get; set; }

        /// <summary>
        /// 报价单详情列表
        /// </summary>
        public List<RB_Course_OfferDetails_ViewModel> OfferDetails { get; set; }

        /// <summary>
        /// 是否获取报价单详情
        /// </summary>
        public int IsGetDetails { get; set; }

        /// <summary>
        /// 订单Id列表
        /// </summary>
        public List<int> OrderIdList
        {
            get
            {
                List<int> list = new List<int>();
                if (!string.IsNullOrEmpty(this.OrderId))
                {
                    list = Common.ConvertHelper.StringToList(this.OrderId);
                }
                return list;
            }
        }
    }
}
