/**
 * BladeX Commercial License Agreement
 * Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
 * <p>
 * Use of this software is governed by the Commercial License Agreement
 * obtained after purchasing a license from BladeX.
 * <p>
 * 1. This software is for development use only under a valid license
 * from BladeX.
 * <p>
 * 2. Redistribution of this software's source code to any third party
 * without a commercial license is strictly prohibited.
 * <p>
 * 3. Licensees may copyright their own code but cannot use segments
 * from this software for such purposes. Copyright of this software
 * remains with BladeX.
 * <p>
 * Using this software signifies agreement to this License, and the software
 * must not be used for illegal purposes.
 * <p>
 * Author: Chill Zhuang (bladejava@qq.com)
 */
package org.springblade.transport.pojo.entity;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;

import java.io.Serial;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 客商档案实体类
 *
 * @author Chill
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("blade_customer_archive")
@Schema(description = "客商档案")
public class CustomerArchive extends TenantEntity {

	@Serial
	private static final long serialVersionUID = 1L;

	@Schema(description = "客商编号")
	private String customerCode;

	@Schema(description = "客商简称")
	private String shortName;

	@Schema(description = "客商全称")
	private String fullName;

	@Schema(description = "客商性质")
	private String customerNature;

	@Schema(description = "统一社会信用代码")
	private String unifiedCreditCode;

	@Schema(description = "客商类型")
	private String customerType;

	@Schema(description = "所属项目")
	private String projectName;

	@Schema(description = "注册/实际经营地址")
	private String registeredAddress;

	@Schema(description = "注册地址行政区划")
	private String registeredRegionName;

	@Schema(description = "注册地址详细地址")
	private String registeredDetailAddress;

	@Schema(description = "法人/负责人")
	private String legalPerson;

	@Schema(description = "联系电话")
	private String contactPhone;

	@Schema(description = "所属组织ID")
	private Long deptId;

	@Schema(description = "所属组织ID集合")
	private String deptIds;

	@Schema(description = "所属组织")
	private String deptName;

	@Schema(description = "开票税点")
	@TableField(updateStrategy = FieldStrategy.ALWAYS)
	private BigDecimal invoiceTaxRate;

	@Schema(description = "经营范围")
	private String businessScope;

	@Schema(description = "营业期限类型")
	private String businessTermType;

	@Schema(description = "营业期限截止日")
	@TableField(updateStrategy = FieldStrategy.ALWAYS)
	private LocalDate businessEndDate;

	@Schema(description = "注册资金(万元)")
	@TableField(updateStrategy = FieldStrategy.ALWAYS)
	private BigDecimal registeredCapital;

	@Schema(description = "客商负责人")
	private String principal;

	@Schema(description = "助记码")
	private String mnemonicCode;

	@Schema(description = "客户等级")
	private String customerLevel;

	@Schema(description = "最大资金使用额度(万元)")
	private BigDecimal maxCreditLimit;

	@Schema(description = "申请总资金使用额度(万元)")
	private BigDecimal applyCreditLimit;

	@Schema(description = "备注")
	private String remark;

	@Schema(description = "客商材料JSON")
	private String qualificationAttachments;

	@Schema(description = "准入类型：temporary/formal")
	private String accessType;

	@Schema(description = "审批状态：draft/reviewing/approved/rejected")
	private String approvalStatus;

	@Schema(description = "当前节点")
	private String currentNode;

	@Schema(description = "当前处理人")
	private String currentProcessor;

	@Schema(description = "审核通过时间")
	private LocalDateTime approvedTime;

}
