using System;
using System.Collections.Generic;
using System.Text;
using Edu.Common.Enum.Sale;
using Edu.Model.Entity.WeChat;

namespace Edu.Model.ViewModel.WeChat
{
    /// <summary>
    /// 企业微信客户信息扩展类
    /// </summary>
    public class RB_WeChat_CustomerInfo_ViewModel : RB_WeChat_CustomerInfo
    {
        /// <summary>
        /// 查询自定义参数
        /// </summary>
        public List<CustomerInfoSelectModel> SelectList { get; set; }

        /// <summary>
        /// 查询条件  1并且  2或者
        /// </summary>
        public int AddCondition { get; set; }

        /// <summary>
        /// 企业标签列表
        /// </summary>
        public List<RB_WeChat_Lable_ViewModel> LableList { get; set; }

        /// <summary>
        /// 自定义字段值
        /// </summary>
        public List<CustomFiledContentExtend> CustomFiledList { get; set; }

        /// <summary>
        /// 字段明细列表（包含下拉选项s）
        /// </summary>
        public List<RB_WeChat_CustomerField_ViewModel> FiledDetailList { get; set; }

        /// <summary>
        /// 客户阶段名称
        /// </summary>
        public string StageName { get; set; }

        /// <summary>
        /// 内部员工名称
        /// </summary>
        public string EmpName { get; set; }

        /// <summary>
        /// 前负责人名称
        /// </summary>
        public string OldEmpName { get; set; }

        /// <summary>
        /// 未跟进天数
        /// </summary>
        public int Q_NotFollowUpDay { get; set; }

        /// <summary>
        /// 排序 1创建时间升序  2创建时间降序  3跟进时间升序  4跟进时间降序
        /// </summary>
        public int OrderBy { get; set; }

        /// <summary>
        /// 好友关系
        /// </summary>
        public string Q_Friends { get; set; }

        /// <summary>
        /// 获取途径
        /// </summary>
        public string Q_AddWay { get; set; }

        /// <summary>
        /// 客户IDs
        /// </summary>
        public string Q_CustomerIds { get; set; }

        /// <summary>
        /// 客户企业微信Ids
        /// </summary>
        public string Q_ExternalUserIds { get; set; }

        /// <summary>
        /// 员工的部门ID
        /// </summary>
        public int DeptId { get; }

        /// <summary>
        /// 客人姓名
        /// </summary>
        public string CName { get; set; }

        /// <summary>
        /// 姓名自定义字段ID
        /// </summary>
        public int CNameId { get; set; }

        /// <summary>
        /// 创建开始时间
        /// </summary>
        public string CreateSTime { get; set; }
        /// <summary>
        /// 创建结束时间
        /// </summary>
        public string CreateETime { get; set; }
        /// <summary>
        /// 好友开始时间
        /// </summary>
        public string FriendSTime { get; set; }
        /// <summary>
        /// 好友结束时间
        /// </summary>
        public string FriendETime { get; set; }

        /// <summary>
        /// 转客户开始时间
        /// </summary>
        public string TurnCustomerSTime { get; set; }
        /// <summary>
        /// 转客户结束时间
        /// </summary>
        public string TurnCustomerETime { get; set; }

        /// <summary>
        /// 分配客户开始时间
        /// </summary>
        public string AllotCustomerSTime { get; set; }
        /// <summary>
        /// 分配客户结束时间
        /// </summary>
        public string AllotCustomerETime { get; set; }
    }

    /// <summary>
    /// 扩展字段查询Model
    /// </summary>
    public class CustomerInfoSelectModel { 
        /// <summary>
        /// 字段名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 类型  1包含  2等于  3日期   4日期范围  5数值
        /// </summary>
        public int Type { get; set; }

        /// <summary>
        /// 方向  1包含所有/等于/等于  2包含任意/不等于/大于  3不包含/为空/大于等于  4为空/不为空/小于  5不为空/模糊/小于等于   对应 type的1/2/5
        /// </summary>
        public int Direction { get; set; }

        /// <summary>
        /// 开始值
        /// </summary>
        public string StartValue { get; set; }

        /// <summary>
        /// 结束值
        /// </summary>
        public string EndValue { get; set; }

        /// <summary>
        /// 是否自定义字段  1是  2否
        /// </summary>
        public int IsCustom { get; set; }
    }

    /// <summary>
    /// 客户信息自定义字段存值
    /// </summary>
    public class CustomerFiledContentModel { 
        /// <summary>
        /// 字段ID
        /// </summary>
        public int Id { get; set; }

        /// <summary>
        /// 字段值  多选的：英文逗号分隔
        /// </summary>
        public string Value { get; set; }
    }

    /// <summary>
    /// 自定义字段返回扩展
    /// </summary>
    public class CustomFiledContentExtend : CustomerFiledContentModel
    { 
        /// <summary>
        /// 字段名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 显示值
        /// </summary>
        public string ShowValue { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        public int Sort { get; set; }
    }
}
