package com.zksy.system.basicData.domain;

import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.zksy.common.annotation.Excel;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.zksy.common.utils.file.ExcelExport;
import com.zksy.common.utils.file.ExcelImport;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.math.BigDecimal;
import java.util.Date;
import java.util.regex.Pattern;

/**
 * 营业执照信息对象 crm_business_license_information
 *
 * @author sy
 * @date 2024-05-08
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("crm_business_license_information")
@ApiModel(value = "营业执照信息")
public class CrmBusinessLicenseInformation extends Model<CrmBusinessLicenseInformation> {

private static final long serialVersionUID=1L;

@ApiModelProperty(value = "主键")
    /** 主键 */
        @TableId(type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "注册号")
    /** 注册号 */
    @ExcelImport(value = "注册号")
    @ExcelExport(value = "注册号")
    private String registerNumber;

@ApiModelProperty(value = "企业名称")
    /** 企业名称 */
                @ExcelImport(value = "企业名称")
                @ExcelExport(value = "企业名称")
    private String enterpriseName;

    @ApiModelProperty(value = "统一社会信用代码")
    /** 统一社会信用代码 */
    @ExcelImport(value = "统一社会信用代码")
    @ExcelExport(value = "统一社会信用代码")
    private String unifiedSocialCreditCode;

@ApiModelProperty(value = "登记类别")
    /** 登记类别 */
                @ExcelImport(value = "登记类别")
                @ExcelExport(value = "登记类别")
    private String registrationCategory;

@ApiModelProperty(value = "企业类型")
    /** 企业类型 */
                @ExcelImport(value = "企业类型")
                @ExcelExport(value = "企业类型")
    private String enterpriseType;

@ApiModelProperty(value = "法定代表人/负责人姓名")
    /** 法定代表人/负责人姓名 */
                @ExcelImport(value = "法定代表人/负责人姓名")
                @ExcelExport(value = "法定代表人/负责人姓名")
    private String legalRepresentative;

@ApiModelProperty(value = "法定代表人/负责人证件号码")
    /** 法定代表人/负责人证件号码 */
                @ExcelImport(value = "法定代表人/负责人证件号码")
                @ExcelExport(value = "法定代表人/负责人证件号码")
    private String legalRepresentativeId;

@ApiModelProperty(value = "联络员姓名")
    /** 联络员姓名 */
                @ExcelImport(value = "联络员姓名")
                @ExcelExport(value = "联络员姓名")
    private String contactName;

@ApiModelProperty(value = "联络员联系电话")
    /** 联络员联系电话 */
                @ExcelImport(value = "联络员联系电话")
                @ExcelExport(value = "联络员联系电话")
    private String contactPhone;

@ApiModelProperty(value = "注册资本(万元)")
    /** 注册资本(万元) */
                @ExcelImport(value = "注册资本(万元)")
                @ExcelExport(value = "注册资本(万元)")
    private String registeredCapital;

@ApiModelProperty(value = "实收资本(万元)")
    /** 实收资本(万元) */
                @ExcelImport(value = "实收资本(万元)")
                @ExcelExport(value = "实收资本(万元)")
    private String paidInCapital;

@ApiModelProperty(value = "企业联系电话")
    /** 企业联系电话 */
                @ExcelImport(value = "企业联系电话")
                @ExcelExport(value = "企业联系电话")
    private String enterprisePhone;

@ApiModelProperty(value = "经营范围")
    /** 经营范围 */
                @ExcelImport(value = "经营范围")
                @ExcelExport(value = "经营范围")
    private String businessScope;

@ApiModelProperty(value = "成立日期")
    /** 成立日期 */
                @ExcelImport(value = "成立日期")
                @ExcelExport(value = "成立日期")
    private String establishmentDate;

@ApiModelProperty(value = "营业期限")
    /** 营业期限 */
                @ExcelImport(value = "营业期限")
                @ExcelExport(value = "营业期限")
    private String businessPeriod;

@ApiModelProperty(value = "登记机关")
    /** 登记机关 */
                @ExcelImport(value = "登记机关")
                @ExcelExport(value = "登记机关")
    private String registrationAuthority;

@ApiModelProperty(value = "邮政编号")
    /** 邮政编号 */
                @ExcelImport(value = "邮政编号")
                @ExcelExport(value = "邮政编号")
    private String postalCode;

@ApiModelProperty(value = "住所")
    /** 住所 */
                @ExcelImport(value = "住所")
                @ExcelExport(value = "住所")
    private String address;

@ApiModelProperty(value = "监管单位")
    /** 监管单位 */
                @ExcelImport(value = "监管单位")
                @ExcelExport(value = "监管单位")
    private String supervisoryAuthority;

@ApiModelProperty(value = "状态")
    /** 状态 */
                @ExcelImport(value = "状态")
                @ExcelExport(value = "状态")
    private String status;

@ApiModelProperty(value = "行业代码")
    /** 行业代码 */
                @ExcelImport(value = "行业代码")
                @ExcelExport(value = "行业代码")
    private String industryCode;

@ApiModelProperty(value = "核准时间")
    /** 核准时间 */
                @ExcelImport(value = "核准时间")
                @ExcelExport(value = "核准时间")
    private String approvalTime;

@ApiModelProperty(value = "注销时间")
    /** 注销时间 */
                @ExcelImport(value = "注销时间")
                @ExcelExport(value = "注销时间")
    private String cancellationTime;

    // 姓名脱敏：只保留姓氏，名字部分用*代替
    public String getLegalRepresentative() {
        if (this.legalRepresentative == null || this.legalRepresentative.length() <= 1) {
            return this.legalRepresentative;
        }
        return this.legalRepresentative.substring(0, 1) + "*";
    }

        }
