package com.slodon.b2b2c.starter.entity.cpcn;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

/**
 * 4601 商户开户、绑卡
 */
@Data
public class TxOpenAccountRequest implements Serializable {
    private static final long serialVersionUID = 8218999703039684092L;
    @ApiModelProperty(value = "机构编号", required = true)
    private String institutionId;
    @ApiModelProperty(value = "开户流水号", required = true)
    private String txSn;
    @ApiModelProperty(value = "用户id，上传店铺id", required = true)
    private String userId;
    @ApiModelProperty(value = "用户类型，11-个人用户，12-企业用户，13-个体工商用户", required = true)
    private String userType;
    @ApiModelProperty(value = "影印件采集交易流水号", required = true)
    private String imageCollectionTxSN;
    @ApiModelProperty(value = "业务类型，10-开户，20-开户并绑卡", required = true)
    private String businessType = "10";
    @ApiModelProperty(value = "个人开户选择域")
    private PersonalInfo personalInfo;
    @ApiModelProperty(value = "企业选择域")
    private EnterpriseInfo enterpriseInfo;
    @ApiModelProperty(value = "个体工商户择域")
    private IndividualInfo individualInfo;

    /**
     * 个人开户选择域
     */
    @Data
    public static class PersonalInfo implements Serializable {
        private static final long serialVersionUID = 1996591874426607619L;
        @ApiModelProperty(value = "开户手机号码", required = true)
        private String phoneNumber;
        @ApiModelProperty(value = "用户姓名", required = true)
        private String userName;
        @ApiModelProperty(value = "证件类型：0-身份证", required = true)
        private String credentialType = "0";
        @ApiModelProperty(value = "证件号码", required = true)
        private String credentialNumber;
        @ApiModelProperty(value = "身份证件有效期（起始）,yyyyMMdd", required = true)
        private String issDate;
        @ApiModelProperty(value = "身份证件有效期（到期）,当证件长期有效时为99991231", required = true)
        private String expiryDate;
        @ApiModelProperty(value = "联系地址", required = true)
        private String indAddress;
        @ApiModelProperty(value = "个人邮箱", required = true)
        private String indEmail;
    }

    /**
     * 企业选择域
     */
    @Data
    public static class EnterpriseInfo implements Serializable {
        private static final long serialVersionUID = -2116335829488703652L;
        @ApiModelProperty(value = "企业名称,工商登记企业名称", required = true)
        private String corporationName;
        @ApiModelProperty(value = "客户简称,自定义简称", required = true)
        private String corporationShort;
        @ApiModelProperty(value = "分类类别,营业执照企业类型为“合伙企业”时必填。详见附录")
        private String categoryType;
        @ApiModelProperty(value = "企业邮箱", required = true)
        private String corEmail;
        @ApiModelProperty(value = "企业地址", required = true)
        private String corAddress;
        @ApiModelProperty(value = "省份,详见附录", required = true)
        private String province;
        @ApiModelProperty(value = "城市,详见附录", required = true)
        private String city;
        @ApiModelProperty(value = "区/县,详见附录", required = true)
        private String district;
        @ApiModelProperty(value = "企业规模：01=大型;02=中型;03=小型;04=微型;98=其他", required = true)
        private String scale = "98";
        @ApiModelProperty(value = "企业银行账户", required = true)
        private String basicAcctNo;
        @ApiModelProperty(value = "基础存款账户编号", required = true)
        private String approvalNo;
        @ApiModelProperty(value = "统一社会信用代码", required = true)
        private String unifiedSocialCreditCode;
        @ApiModelProperty(value = "营业执照有效期（起始）,yyyyMMdd格式", required = true)
        private String allLicenceIssDate;
        @ApiModelProperty(value = "营业执照有效期（到期），格式：yyyyMMdd；证件长期有效时为 99991231", required = true)
        private String allLicenceExpiryDate;
        @ApiModelProperty(value = "法人姓名", required = true)
        private String legalPersonName;
        @ApiModelProperty(value = "法人证件类型：0-身份证;2-外国护照;5-港澳居民来往内地通行证;6-台湾居民来往大陆通行证", required = true)
        private String legalCredentialType = "0";
        @ApiModelProperty(value = "法人证件号码", required = true)
        private String legalCredentialNumber;
        @ApiModelProperty(value = "法人身份证件有效期（起始）,格式：yyyyMMdd", required = true)
        private String legalPersonIssDate;
        @ApiModelProperty(value = "法人身份证件有效期（到期）,当证件长期有效时为99991231", required = true)
        private String legalPersonExpiryDate;
        @ApiModelProperty(value = "法人联系电话", required = true)
        private String legalPersonContactNumber;
    }

    /**
     * 个体工商户择域
     */
    @Data
    public static class IndividualInfo implements Serializable {
        private static final long serialVersionUID = 3519754899974468482L;
        @ApiModelProperty(value = "经营者姓名", required = true)
        private String managerName;
        @ApiModelProperty(value = "经营者证件类型：0-身份证", required = true)
        private String managerCredentialType = "0";
        @ApiModelProperty(value = "经营者证件号码", required = true)
        private String managerCredentialNumber;
        @ApiModelProperty(value = "经营者身份证件有效期（起始）,格式：yyyyMMdd；", required = true)
        private String managerIssDate;
        @ApiModelProperty(value = "经营者身份证件有效期（到期）,格式：yyyyMMdd；证件长期有效时为 99991231", required = true)
        private String managerExpiryDate;
        @ApiModelProperty(value = "经营者手机号码", required = true)
        private String managerContactNumber;
        @ApiModelProperty(value = "经营者邮箱")
        private String managerEmail;
        @ApiModelProperty(value = "统一社会信用代码", required = true)
        private String retailerRegNumber;
        @ApiModelProperty(value = "个体工商字号,营业执照名称；如名称为空，填写经营者姓名", required = true)
        private String retailerName;
        @ApiModelProperty(value = "注册日期,格式：yyyyMMdd", required = true)
        private String retailerLicenseIssDate;
        @ApiModelProperty(value = "营业执照有效期,格式：yyyyMMdd；证件长期有效时为 99991231", required = true)
        private String retailerLicenseExpiryDate;
        @ApiModelProperty(value = "经营场所,请根据营业执照的经营场所或住所如实填写", required = true)
        private String retailerAddress;
        @ApiModelProperty(value = "省份,详见附录", required = true)
        private String retailerProvince;
        @ApiModelProperty(value = "城市,详见附录", required = true)
        private String retailerCity;
        @ApiModelProperty(value = "区/县,详见附录", required = true)
        private String retailerDistrict;
    }

}
