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

namespace Edu.Model.ViewModel.Customer
{
    /// <summary>
    /// 同业客户任务扩展实体类
    /// </summary>
    public class RB_Task_Extend : RB_Task
    {
        /// <summary>
        /// 创建人
        /// </summary>
        public string CreateByName { get; set; }

        /// <summary>
        /// 任务详情列表
        /// </summary>
        public List<RB_TaskDetails_Extend> DetailsList { get; set; }

        /// <summary>
        /// 任务开始时间
        /// </summary>
        public string TaskStartTimeStr { get { return Common.ConvertHelper.FormatTime(this.TaskStartTime); } }

        /// <summary>
        /// 任务结束时间
        /// </summary>
        public string TaskEndTimeStr { get { return Common.ConvertHelper.FormatTime(this.TaskEndTime); } }

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

        /// <summary>
        /// 任务图片数组
        /// </summary>
        public List<string> TaskImageList
        {
            get
            {
                List<string> list = new List<string>();
                if (!string.IsNullOrEmpty(this.TaskImage))
                {
                    list = Common.Plugin.JsonHelper.DeserializeObject<List<string>>(this.TaskImage);
                }
                return list;
            }
        }



        /// <summary>
        /// 兑换截止日期
        /// </summary>
        public string ExchangeEndTimeStr { get { return Common.ConvertHelper.FormatTime(this.ExchangeEndTime); } }
    }
}
