using Hotline.Share.Dtos;
using Hotline.Share.Dtos.Order;
using SqlSugar;
using XF.Domain.Entities;
using XF.Domain.Events;
using XF.Domain.Repository;

namespace Hotline.Orders;

public class OrderExtension : CreationEntity
{
    /// <summary>
    /// 同步省工单编号和省上传下来的工单都用这个字段（冗余：省工单的扩展信息）
    /// </summary>
    public string? ProvinceNo { get; set; }

    /// <summary>
    /// 工单类型
    /// </summary>
    public string? OrderType { get; set; }
    public string? OrderTypeCode { get; set; }

    #region 投诉人信息

    /// <summary>
    /// 证件类型
    /// </summary>
    public string? LicenceTypeCode { get; set; }

    public string? LicenceType { get; set; }

    /// <summary>
    /// 证件号码, 证件类型已选的情况为必填，否则非必填
    /// </summary>
    public string? LicenceNo { get; set; }

    /// <summary>
    /// 提供方身份类型
    /// </summary>
    public string? IdentityTypeCode { get; set; }

    public string? IdentityType { get; set; }

    /// <summary>
    /// 提供方身份（投诉人身份）
    /// </summary>
    public string? IdentityCode { get; set; }

    public string? Identity { get; set; }

    /// <summary>
    /// 国籍或地区
    /// </summary>
    public string? NationalityCode { get; set; }

    public string? Nationality { get; set; }

    /// <summary>
    /// 民族
    /// </summary>
    public string? NationCode { get; set; }

    public string? Nation { get; set; }

    /// <summary>
    /// 邮政编码
    /// </summary>
    public string? PostalCode { get; set; }

    /// <summary>
    /// 邮箱
    /// </summary>
    public string? Email { get; set; }

    /// <summary>
    /// 其他联系方式
    /// </summary>
    public string? OtherContact { get; set; }

    #endregion

    #region 投诉对象信息

    /// <summary>
    /// 企业名称
    /// </summary>
    public string? EnterpriseName { get; set; }

    /// <summary>
    /// 统一社会信用代码
    /// </summary>
    public string? UnifiedSocialCreditCode { get; set; }

    /// <summary>
    /// 注册地址
    /// </summary>
    public string? RegisterAddress { get; set; }

    /// <summary>
    /// 注册号
    /// </summary>
    public string? RegisterNumber { get; set; }

    /// <summary>
    /// 企业联系人
    /// </summary>
    public string? EnterpriseContact { get; set; }

    /// <summary>
    /// 市场主体类型
    /// </summary>
    public string? MarketTypeCode { get; set; }

    public string? MarketType { get; set; }

    /// <summary>
    /// 行业分类
    /// </summary>
    public string? IndustryClassifyCode { get; set; }
    public string? IndustryClassify { get; set; }

    #endregion

    #region 投诉/举报 详情


    /// <summary>
    /// 商品分类/品牌
    /// </summary>
    public string? BrandCode { get; set; }

    public string? Brand { get; set; }

    /// <summary>
    /// 消费金额，只能填写数字，且只能填写非负数
    /// </summary>
    public double? Amount { get; set; }

    /// <summary>
    /// 客体类别
    /// </summary>
    public string? ObjectClassifyCode { get; set; }

    public string? ObjectClassify { get; set; }

    /// <summary>
    /// 销售方式
    /// </summary>
    public string? SalesModeCode { get; set; }
    public string? SalesMode { get; set; }

    /// <summary>
    /// 电商平台，销售方式为“网购”时展示该字段且必填
    /// </summary>
    public string? ECommercePlatformCode { get; set; }

    public string? ECommercePlatform { get; set; }

    /// <summary>
    /// 外部订单号，销售方式为“ 网购”时展示该字段且必填
    /// </summary>
    public string? ExternalOrderNo { get; set; }

    /// <summary>
    /// 销售渠道
    /// <remarks>
    /// 销售方式为“电视购物”“电话购物”“邮购”时展示该字段，且必填 1.电视购物 2.电话购物 3.邮购
    /// </remarks>
    /// </summary>
    public string? SalesChannel { get; set; }
    public string? SalesChannelCode { get; set; }

    /// <summary>
    /// 专利权人，“投诉问题类别”为“专利”时展示该字段，选填
    /// </summary>
    public string? Patentee { get; set; }

    /// <summary>
    /// 专利名称，“投诉问题类别”为“专利”时展示该字段，选填
    /// </summary>
    public string? PatentName { get; set; }

    /// <summary>
    /// 专利类型，“投诉问题类别”为“专利”时展示该字段，选填
    /// </summary>
    public string? PatentTypeCode { get; set; }

    public string? PatentType { get; set; }

    /// <summary>
    /// 专利号，“投诉问题类别”为“专利”时展示该字段，选填
    /// </summary>
    public string? PatentNo { get; set; }

    /// <summary>
    /// 产品名称
    /// </summary>
    public string? ProductName { get; set; }

    /// <summary>
    /// 批准文号
    /// </summary>
    public string? ApprovalNumber { get; set; }

    /// <summary>
    /// 产品批号
    /// </summary>
    public string? ProductBatchNo { get; set; }

    /// <summary>
    /// 产品规格
    /// </summary>
    public string? ProductStandard { get; set; }

    /// <summary>
    /// 产品有效期
    /// </summary>
    public DateTime? ProductExpiredTime { get; set; }

    /// <summary>
    /// 生产厂家
    /// </summary>
    public string? Manufacturer { get; set; }

    /// <summary>
    /// 销售企业
    /// </summary>
    public string? SalesEnterprise { get; set; }

    /// <summary>
    /// 消费者地址
    /// </summary>
    public string? ConsumerAddress { get; set; }

    #endregion

    #region 投诉详情

    /// <summary>
    /// 投诉问题类别
    /// </summary>
    public string? ComplainClassifyCode { get; set; }

    public string? ComplainClassify { get; set; }

    /// <summary>
    /// 争议发生时间
    /// </summary>
    public DateTime? OccurrenceTime { get; set; }

    /// <summary>
    /// 投诉目标，销售方式为“网购”时展示该字段且必填
    /// </summary>
    public string? ComplainTargetCode { get; set; }

    public string? ComplainTarget { get; set; }

    /// <summary>
    /// 经营地址，销售方式为“现场”时必填
    /// </summary>
    [SugarColumn(ColumnDataType = "json", IsJson = true)]
    public Position? BusinessPosition { get; set; }

    /// <summary>
    /// 诉求内容，多选
    /// </summary>
    [SugarColumn(ColumnDataType = "json", IsJson = true)]
    public List<Kv>? ComplainTypes { get; set; }

    #endregion

    #region 举报详情

    /// <summary>
    /// 举报问题类别
    /// </summary>
    public string? ReportClassifyCode { get; set; }

    public string? ReportClassify { get; set; }

    /// <summary>
    /// 举报目标，销售方式为“网购”时展示该字段且必填
    /// </summary>
    public string? ReportTargetCode { get; set; }

    public string? ReportTarget { get; set; }

    #endregion

    #region 医疗服务中心受理单

    /// <summary>
    /// 投诉医院名称
    /// </summary>
    public string? MedName { get; set; }

    /// <summary>
    /// 投诉医院地址
    /// </summary>
    public string? MedAddress { get; set; }

    /// <summary>
    /// 投诉医院科室
    /// </summary>
    public string? MedDepartment { get; set; }

    /// <summary>
    /// 投诉医院医生
    /// </summary>
    public string? MedDoctor { get; set; }

    /// <summary>
    /// 患者
    /// </summary>
    public string? MedPatient { get; set; }

    /// <summary>
    /// 就诊卡号
    /// </summary>
    public string? MedNo { get; set; }

    /// <summary>
    /// 身份证号
    /// </summary>
    public string? MedIdNo { get; set; }

    #endregion

    #region 电视购物及商铺购买退换货中心受理单

    /// <summary>
    /// 电视台（商铺）
    /// </summary>
    public string? ExchTv { get; set; }

    /// <summary>
    /// 购买时间
    /// </summary>
    public DateTime? ExchTradeTime { get; set; }

    /// <summary>
    /// 产品名称
    /// </summary>
    public string? ExchProduct { get; set; }

    /// <summary>
    /// 消费金额
    /// </summary>
    public double? ExchAmount { get; set; }

    /// <summary>
    /// 商家名称
    /// </summary>
    public string? ExchName { get; set; }

    /// <summary>
    /// 商家地址
    /// </summary>
    public string? ExchAddress { get; set; }

    /// <summary>
    /// 收货人
    /// </summary>
    public string? ExchConsignee { get; set; }

    /// <summary>
    /// 收货人地址
    /// </summary>
    public string? ExchConsigneeAddress { get; set; }

    #endregion

    #region 电视台虚假广告中心受理单

    /// <summary>
    /// 虚假广告电视台名称
    /// </summary>
    public string? AdTv { get; set; }

    /// <summary>
    /// 虚假广告产品名称
    /// </summary>
    public string? AdProduct { get; set; }

    /// <summary>
    /// 虚假广告具体内容
    /// </summary>
    public string? AdContent { get; set; }
    #endregion

    #region 高速公路投诉中心受理单

    /// <summary>
    /// 高速入口
    /// </summary>
    public string? ExpwyEntrance { get; set; }

    /// <summary>
    /// 高速出口
    /// </summary>
    public string? ExpwyExit { get; set; }

    /// <summary>
    /// 发生时间
    /// </summary>
    public DateTime? ExpwyTime { get; set; }

    /// <summary>
    /// 车牌号
    /// </summary>
    public string? ExpwyNo { get; set; }
    #endregion

    #region 四川政务服务网技术中心受理单

    /// <summary>
    /// 四川政务服务网账号
    /// </summary>
    public string? ZwfwwAccount { get; set; }

    /// <summary>
    /// 四川政务服务网联系方式
    /// </summary>
    public string? ZwfwwContact { get; set; }
    #endregion

    #region 四川省12366热线诉求交办单

    /// <summary>
    /// 主管税务机关（问题归属地）
    /// </summary>
    public string? Location12366Sq { get; set; }

    /// <summary>
    /// 被投诉单位或个人信息
    /// </summary>
    public string? Info12366Sq { get; set; }

    /// <summary>
    /// 12366的投诉类型
    /// </summary>
    public string? Type12366Sq { get; set; }
    #endregion

    #region 四川省12366热线咨询交办单

    /// <summary>
    /// 主管税务机关（问题归属地）
    /// </summary>
    public string? Location12366Zx { get; set; }

    /// <summary>
    /// 被投诉单位或个人信息
    /// </summary>
    public string? Info12366Zx { get; set; }
    #endregion

    #region 12328服务监督中心受理单

    /// <summary>
    /// 受理方式
    /// </summary>
    public string? AcceptType12328 { get; set; }

    /// <summary>
    /// 客户
    /// </summary>
    public string? Client12328 { get; set; }
    #endregion

    #region 邮政业消费者申诉受理单

    /// <summary>
    /// 申诉人姓名
    /// </summary>
    public string? MailClaimantName { get; set; }

    /// <summary>
    /// 申诉人电话
    /// </summary>
    public string? MailClaimantPhone { get; set; }

    /// <summary>
    /// 申诉人企业
    /// </summary>
    public string? MailClaimantEnterprise { get; set; }

    /// <summary>
    /// 寄件人姓名
    /// </summary>
    public string? MailSenderName { get; set; }
    public string? MailSenderPhone { get; set; }
    public string? MailSenderAddress { get; set; }

    /// <summary>
    /// 收件人姓名
    /// </summary>
    public string? MailReceiverName { get; set; }
    public string? MailReceiverPhone { get; set; }
    public string? MailReceiverAddress { get; set; }

    /// <summary>
    /// 涉及金额
    /// </summary>
    public double? MailAmount { get; set; }

    /// <summary>
    /// 是否联系快递公司投诉
    /// </summary>
    public bool? MailIsContacted { get; set; }

    /// <summary>
    /// 处理结果
    /// </summary>
    public string? MailResult { get; set; }
    #endregion

    #region 环保举报业务受理单

    /// <summary>
    /// 举报人邮箱
    /// </summary>
    public string? EpEmail { get; set; }

    /// <summary>
    /// 举报人通讯地址
    /// </summary>
    public string? EpAddress { get; set; }

    /// <summary>
    /// 举报对象
    /// </summary>
    public string? EpObject { get; set; }

    /// <summary>
    /// 被举报对象地址
    /// </summary>
    public string? EpObjectAddress { get; set; }

    /// <summary>
    /// 对应行业类型
    /// </summary>
    public string? EpIndustryType { get; set; }

    /// <summary>
    /// 重点要素
    /// </summary>
    public string? EpKeyPoint { get; set; }
    #endregion
}