package com.trade.service.enterprise.customer.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.trade.common.core.dto.BaseDTO;
import com.trade.common.core.dto.BaseI18nDto;
import com.trade.common.validate.ValidatorGroup;
import com.trade.service.filestorage.dto.FileAbstractDto;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 企业信息
 *
 * @author hlb
 * @since 2024-05-29 15:07:42
 */
public class EnterpriseDto extends BaseI18nDto {

    /**
     * ID
     */
    private Long id;
    /**
     * 客户编号
     */
    private String customerIdentifierNo;
    /**
     * 客户id
     */
    private Long customerId;
    /**
     * 企业类型，枚举：enterprise_type
     */
    @NotBlank(message = "企业类型不能为空", groups = {
            ValidatorGroup.Submit.class
    })
    private String enterpriseType;
    /**
     * 注册国家/地区，枚举：country_code
     */
    private String countryCode;
    /**
     * 企业名称
     */
    @NotBlank(message = "企业名称不能为空", groups = {
            ValidatorGroup.Submit.class
    })
    private String name;
    /**
     * 统一社会信用编码
     */
    @NotBlank(message = "统一社会信用编码不能为空", groups = {
            ValidatorGroup.Submit.class
    })
    private String certNo;
    /**
     * 注册号，HK企业必填
     */
    private String registrationNumber;
    /**
     * 海关企业代码
     */
    @NotNull(message = "海关企业代码不能为空", groups = {
            ValidatorGroup.Submit.class
    })
    private String customsEnterpriseCode;
    /**
     * 纳税人识别号
     */
    @NotNull(message = "纳税人识别号不能为空", groups = {
            ValidatorGroup.Submit.class
    })
    private String taxNo;
    /**
     * 小图企业uuid
     */
    private String xtEid;
    /**
     * 成立时间 yyyy-MM-dd
     */
    @NotNull(message = "成立时间不能为空", groups = {
            ValidatorGroup.Submit.class
    })
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date establishDate;
    /**
     * 注册资本
     */
    @NotNull(message = "注册资本不能为空", groups = {
            ValidatorGroup.Submit.class
    })
    private BigDecimal registerCapital;
    /**
     * 注册地址
     */
    @NotBlank(message = "注册地址不能为空", groups = {
            ValidatorGroup.Submit.class
    })
    private String registerAddress;
    /**
     * 注册地址是否实际经营地址，枚举：sys_yes_no
     */
    @NotBlank(message = "注册地址是否是实际经营地址不能为空", groups = {
            ValidatorGroup.Submit.class
    })
    private String sameRegisterAndBusinessAddress;
    /**
     * 经营地址
     */
    private String businessAddress;
    /**
     * 企业认证状态，枚举：certification_status
     */
    private String certificationStatus;
    /**
     * 出口类型，枚举：export_type
     */
    @NotBlank(message = "出口类型不能为空", groups = {
            ValidatorGroup.Submit.class
    })
    private String exportType;
    /**
     * 代理公司所属地区，枚举类型district_code
     */
    private String proxyDistrictCode;
    /**
     * 匹配业务产品，枚举：business_product
     */
    private String businessProduct;
    /**
     * 营业执照扫描件文件id
     */
    @NotNull(message = "营业执照扫描件文件不能为空", groups = {
            ValidatorGroup.Submit.class
    })
    private FileAbstractDto businessLicense;
    /**
     * 法人信息
     */
    @NotNull(message = "法人信息不能为空", groups = {
            ValidatorGroup.Submit.class
    })
    private EnterpriseRelatedPersonDto legalPerson;
    /**
     * 实控人信息
     */
    private EnterpriseRelatedPersonDto controlPerson;
    /**
     * 企业联系人（授权代理人）信息
     */
    @NotNull(message = "企业联系人信息不能为空", groups = {
            ValidatorGroup.Submit.class
    })
    private EnterpriseRelatedPersonDto contactPerson;
    /**
     * 企业变更记录id
     */
    private Long changeRecordId;
    /**
     * 备注信息
     */
    private String remark;
    /**
     * 创建者
     */
    private String createBy;
    /**
     * 更新者
     */
    private String updateBy;
    /**
     * 创建时间 yyyy-MM-dd HH:mm:ss
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date gmtCreate;
    /**
     * 更新时间 yyyy-MM-dd HH:mm:ss
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date gmtModified;
    /**
     * 邮箱验证码
     */
    private String emailAuthCode;
    /**
     * 主管税务机关，枚举：tax_authority_area
     */
    private String taxAuthorityArea;
    /**
     * 退税服务协议签署状态，枚举：sys_sign_status
     */
    private String taxRebateAgreementSignStatus;
    /**
     * 退税服务协议id
     */
    private FileAbstractDto taxRebateAgreement;
    /**
     * 退税服务协议签署日期 yyyy-MM-dd HH:mm:ss
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date taxRebateAgreementSignDate;
    /**
     * 退税服务协议生效时间（含）
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date taxRebateEffectiveStart;
    /**
     * 退税服务协议失效时间（含）
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date taxRebateEffectiveEnd;
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getCustomerId() {
        return customerId;
    }

    public void setCustomerId(Long customerId) {
        this.customerId = customerId;
    }

    public String getCustomerIdentifierNo() {
        return customerIdentifierNo;
    }

    public void setCustomerIdentifierNo(String customerIdentifierNo) {
        this.customerIdentifierNo = customerIdentifierNo;
    }

    public String getEnterpriseType() {
        return enterpriseType;
    }

    public void setEnterpriseType(String enterpriseType) {
        this.enterpriseType = enterpriseType;
    }

    public String getCountryCode() {
        return countryCode;
    }

    public void setCountryCode(String countryCode) {
        this.countryCode = countryCode;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCertNo() {
        return certNo;
    }

    public void setCertNo(String certNo) {
        this.certNo = certNo;
    }

    public String getRegistrationNumber() {
        return registrationNumber;
    }

    public void setRegistrationNumber(String registrationNumber) {
        this.registrationNumber = registrationNumber;
    }

    public String getCustomsEnterpriseCode() {
        return customsEnterpriseCode;
    }

    public void setCustomsEnterpriseCode(String customsEnterpriseCode) {
        this.customsEnterpriseCode = customsEnterpriseCode;
    }

    public String getTaxNo() {
        return taxNo;
    }

    public void setTaxNo(String taxNo) {
        this.taxNo = taxNo;
    }

    public String getXtEid() {
        return xtEid;
    }

    public void setXtEid(String xtEid) {
        this.xtEid = xtEid;
    }

    public Date getEstablishDate() {
        return establishDate;
    }

    public void setEstablishDate(Date establishDate) {
        this.establishDate = establishDate;
    }

    public BigDecimal getRegisterCapital() {
        return registerCapital;
    }

    public void setRegisterCapital(BigDecimal registerCapital) {
        this.registerCapital = registerCapital;
    }

    public String getRegisterAddress() {
        return registerAddress;
    }

    public void setRegisterAddress(String registerAddress) {
        this.registerAddress = registerAddress;
    }

    public String getSameRegisterAndBusinessAddress() {
        return sameRegisterAndBusinessAddress;
    }

    public void setSameRegisterAndBusinessAddress(String sameRegisterAndBusinessAddress) {
        this.sameRegisterAndBusinessAddress = sameRegisterAndBusinessAddress;
    }

    public String getBusinessAddress() {
        return businessAddress;
    }

    public void setBusinessAddress(String businessAddress) {
        this.businessAddress = businessAddress;
    }

    public String getCertificationStatus() {
        return certificationStatus;
    }

    public void setCertificationStatus(String certificationStatus) {
        this.certificationStatus = certificationStatus;
    }

    public String getExportType() {
        return exportType;
    }

    public void setExportType(String exportType) {
        this.exportType = exportType;
    }

    public String getProxyDistrictCode() {
        return proxyDistrictCode;
    }

    public void setProxyDistrictCode(String proxyDistrictCode) {
        this.proxyDistrictCode = proxyDistrictCode;
    }

    public String getBusinessProduct() {
        return businessProduct;
    }

    public void setBusinessProduct(String businessProduct) {
        this.businessProduct = businessProduct;
    }

    public FileAbstractDto getBusinessLicense() {
        return businessLicense;
    }

    public void setBusinessLicense(FileAbstractDto businessLicense) {
        this.businessLicense = businessLicense;
    }

    public EnterpriseRelatedPersonDto getLegalPerson() {
        return legalPerson;
    }

    public void setLegalPerson(EnterpriseRelatedPersonDto legalPerson) {
        this.legalPerson = legalPerson;
    }

    public EnterpriseRelatedPersonDto getControlPerson() {
        return controlPerson;
    }

    public void setControlPerson(EnterpriseRelatedPersonDto controlPerson) {
        this.controlPerson = controlPerson;
    }

    public EnterpriseRelatedPersonDto getContactPerson() {
        return contactPerson;
    }

    public void setContactPerson(EnterpriseRelatedPersonDto contactPerson) {
        this.contactPerson = contactPerson;
    }

    public Long getChangeRecordId() {
        return changeRecordId;
    }

    public void setChangeRecordId(Long changeRecordId) {
        this.changeRecordId = changeRecordId;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    public String getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy;
    }

    public Date getGmtCreate() {
        return gmtCreate;
    }

    public void setGmtCreate(Date gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    public Date getGmtModified() {
        return gmtModified;
    }

    public void setGmtModified(Date gmtModified) {
        this.gmtModified = gmtModified;
    }

    public String getEmailAuthCode() {
        return emailAuthCode;
    }

    public void setEmailAuthCode(String emailAuthCode) {
        this.emailAuthCode = emailAuthCode;
    }

    public String getTaxAuthorityArea() {
        return taxAuthorityArea;
    }

    public void setTaxAuthorityArea(String taxAuthorityArea) {
        this.taxAuthorityArea = taxAuthorityArea;
    }

    public String getTaxRebateAgreementSignStatus() {
        return taxRebateAgreementSignStatus;
    }

    public void setTaxRebateAgreementSignStatus(String taxRebateAgreementSignStatus) {
        this.taxRebateAgreementSignStatus = taxRebateAgreementSignStatus;
    }

    public FileAbstractDto getTaxRebateAgreement() {
        return taxRebateAgreement;
    }

    public void setTaxRebateAgreement(FileAbstractDto taxRebateAgreement) {
        this.taxRebateAgreement = taxRebateAgreement;
    }

    public Date getTaxRebateAgreementSignDate() {
        return taxRebateAgreementSignDate;
    }

    public void setTaxRebateAgreementSignDate(Date taxRebateAgreementSignDate) {
        this.taxRebateAgreementSignDate = taxRebateAgreementSignDate;
    }

    public String getNameEn() {
        return getI18nValue("name", "en");
    }

    public String getRegisterAddressEn() {
        return getI18nValue("registerAddress", "en");
    }

    public String getBusinessAddressEn() {
        return getI18nValue("businessAddress", "en");
    }

    public Date getTaxRebateEffectiveStart() {
        return taxRebateEffectiveStart;
    }

    public void setTaxRebateEffectiveStart(Date taxRebateEffectiveStart) {
        this.taxRebateEffectiveStart = taxRebateEffectiveStart;
    }

    public Date getTaxRebateEffectiveEnd() {
        return taxRebateEffectiveEnd;
    }

    public void setTaxRebateEffectiveEnd(Date taxRebateEffectiveEnd) {
        this.taxRebateEffectiveEnd = taxRebateEffectiveEnd;
    }
}
