using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PTMedicalInsurance.Entity
{
    /// <summary>
    /// 人员信息获取[1101]的请求参数
    /// </summary>
    public class PersonInfoRequest
    {
        /// <summary>
        /// 就诊凭证类型
        /// </summary>
        public string mdtrt_cert_type { get; set; }

        /// <summary>
        /// 就诊凭证编号
        /// </summary>
        public string mdtrt_cert_no { get; set; }

        /// <summary>
        /// 卡识别码
        /// </summary>
        public string card_sn { get; set; }

        /// <summary>
        /// 开始时间
        /// </summary>
        public string begntime { get; set; }

        /// <summary>
        /// 人员证件类型
        /// </summary>
        public string psn_cert_type { get; set; }

        /// <summary>
        /// 证件号码
        /// </summary>
        public string certno { get; set; }

        /// <summary>
        /// 人员姓名
        /// </summary>
        public string psn_name { get; set; }

    }

    /// <summary>
    /// 人员信息获取[1101]的返回结果
    /// </summary>
    public class PersonCardInfo
    {
        /// <summary>
        /// 基本信息
        /// </summary>
        [JsonProperty("baseinfo")]
        public BaseInfo baseInfo { get; set; }

        /// <summary>
        /// 参保信息列表
        /// </summary>
        [JsonProperty("insuinfo")]
        public InsuInfo[] insuInfo { get; set; }

        /// <summary>
        /// 身份信息列表
        /// </summary>
        [JsonProperty("idetinfo")]
        public IdetInfo[] idetInfo { get; set; }

        [JsonProperty("cardecinfo")]
        public CardInfo cardInfo { get; set; }

        /// <summary>
        /// 省平台订单号【扩展】
        /// </summary>
        public string platformOrderNo;

    }


    public class CardInfo
    {
        /// <summary>
        /// 人员证件类型
        /// </summary>
        public string psn_cert_type { get; set; }

        /// <summary>
        /// 证件号码
        /// </summary>
        public string certno { get; set; }

        /// <summary>
        /// 人员姓名
        /// </summary>
        public string psn_name { get; set; }

        /// <summary>
        /// 社保卡卡号
        /// 读卡时返回
        /// </summary>
        public string cardno { get; set; }

        /// <summary>
        /// 卡识别码
        /// 读卡时返回
        /// </summary>
        public string card_sn { get; set; }

        /// <summary>
        /// 令牌
        /// 读电子凭证使用
        /// </summary>
        public string ecToken { get; set; }
    }


    /// <summary>
    /// 基本信息
    /// </summary>
    public class BaseInfo
    {
        /// <summary>
        /// 人员编号
        /// </summary>
        public string psn_no { get; set; }

        /// <summary>
        /// 人员证件类型
        /// </summary>
        public string psn_cert_type { get; set; }

        /// <summary>
        /// 证件号码
        /// </summary>
        public string certno { get; set; }

        /// <summary>
        /// 人员姓名
        /// </summary
        public string psn_name { get; set; }

        /// <summary>
        /// 性别
        /// </summary>
        public string gend { get; set; }

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

        /// <summary>
        /// 出生日期
        /// </summary>
        public DateTime brdy { get; set; }

        /// <summary>
        /// 年龄
        /// </summary>
        public decimal age { get; set; }
    }

    /// <summary>
    /// 参保信息
    /// </summary>
    public class InsuInfo
    {
        /// <summary>
        /// 余额
        /// </summary>
        public double balc { get; set; }

        /// <summary>
        /// 险种类型
        /// </summary>
        public string insutype { get; set; }

        /// <summary>
        /// 人员类别
        /// </summary>
        public string psn_type { get; set; }

        /// <summary>
        /// 医疗类别
        /// </summary>
        public string med_type { get; set; }

        /// <summary>
        /// 人员参保状态
        /// </summary>
        public string psn_insu_stas { get; set; }

        /// <summary>
        /// 个人参保日期
        /// </summary>
        public DateTime psn_insu_date { get; set; }

        /// <summary>
        /// 暂停参保日期
        /// </summary>
        public DateTime paus_insu_date { get; set; }

        /// <summary>
        /// 公务员标志
        /// </summary>
        public string cvlserv_flag { get; set; }

        /// <summary>
        /// 参保地医保区划
        /// </summary>
        public string insuplc_admdvs { get; set; }


        /// <summary>
        /// 单位名称
        /// </summary>
        public string emp_name { get; set; }

        /// <summary>
        /// 社保机构编号
        /// </summary>
        public string insu_orgCode { set; get; }

        /// <summary>
        /// 参保机构名称
        /// </summary>
        public string insuplc_name { set; get; }
    }

    /// <summary>
    /// 身份信息
    /// </summary>
    public class IdetInfo
    {
        /// <summary>
        /// 人员身份类别
        /// </summary>
        public string psn_idet_type { get; set; }

        /// <summary>
        /// 人员类别等级
        /// </summary>
        public string psn_type_lv { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string memo { get; set; }

        /// <summary>
        /// 开始时间
        /// </summary>
        public DateTime begntime { get; set; }

        /// <summary>
        /// 结束时间
        /// </summary>
        public DateTime endtime { get; set; }
    }
}
