using Edu.Common.Plugin;
using Edu.Model.Entity.Customer;

namespace Edu.Model.ViewModel.Customer
{
    /// <summary>
    /// 同业客户信息扩展实体类
    /// </summary>
    public class RB_Customer_Extend : RB_Customer
    {
        /// <summary>
        /// 创建人
        /// </summary>
        public string CreateByName { 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 CustomerStateStr
        {
            get
            {
                return this.CustomerState.ToName();
            }
        }

        /// <summary>
        /// 审核状态
        /// </summary>
        public string ApproveStateStr
        {
            get
            {
                string str = "待审核";
                if (this.ApproveState == 0)
                {
                    str = "待审核";
                }
                else if (this.ApproveState == 1)
                {
                    str = "通过";
                }
                else
                {
                    str = "拒绝";
                }
                return str;
            }

        }

        /// <summary>
        /// 审核状态
        /// </summary>
        public int QApproveState { get; set; }

        /// <summary>
        /// 审核人
        /// </summary>
        public string ApproveName { get; set; }

        /// <summary>
        /// 审核时间
        /// </summary>
        public string ApproveTimeStr { get { return Common.ConvertHelper.FormatTime(this.ApproveTime); } }

        /// <summary>
        /// 状态(1-正式客户，2-非正式客户，3-未通过客户，4-黑名单客户)
        /// </summary>
        public int QCustomerState { get; set; }

        /// <summary>
        /// 同业Ids
        /// </summary>
        public string CustomerIds { get; set; }

        /// <summary>
        /// 学生数量
        /// </summary>
        public int StuNum { get; set; }

        /// <summary>
        /// 订单数量
        /// </summary>
        public int OrderNum { get; set; }

        /// <summary>
        /// 销售额
        /// </summary>
        public decimal OrderSales { get; set; }

        /// <summary>
        /// 查询创建人
        /// </summary>
        public int QCreateBy { get; set; }

        /// <summary>
        /// 查询日期
        /// </summary>
        public string QDate { get; set; }

        /// <summary>
        /// 同行数量
        /// </summary>
        public int CustomerCount { get; set; }

        /// <summary>
        /// 开始日期
        /// </summary>
        public string StartDate { get; set; }

        /// <summary>
        /// 结束日期
        /// </summary>
        public string EndDate { get; set; }

        /// <summary>
        /// 客户编号
        /// </summary>
        public string QCategoryIds { get; set; }

        /// <summary>
        /// 同业名称
        /// </summary>
        public string CategoryName { get; set; }
    }
}
