package com.trade.service.enterprise.companyrelated.domain;

import java.time.LocalDate;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;

import com.trade.common.core.domain.BizBaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.*;

/**
 * <p>
 * 关系企业信息
 * </p>
 *
 * @author baomidou
 * @since 2024-05-28
 */
@Getter
@Setter
@TableName("biz_entity_related")
@ApiModel(value = "BizEntityRelated对象", description = "关系企业信息")
public class BizEntityRelated extends BizBaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("用户id")
    @TableField("user_id")
    @NotNull(message = "user_id不能为null")
    private Long userId;

    @ApiModelProperty("关系类型")
    @TableField("relate_type")
    @NotBlank(message = "关系类型不能为空")
    private String relateType;

    @ApiModelProperty("国家")
    @TableField("country")
    @NotBlank(message = "国家不能为空")
    private String country;

    @ApiModelProperty("状态 0待生效/1生效")
    @TableField("`status`")
    @NotNull(message = "状态不能为空")
    private Integer status;

    @ApiModelProperty("企业类型")
    @TableField("entity_type")
    @NotBlank(message = "企业类型不能为空")
    private String entityType;

    @ApiModelProperty("企业名称")
    @TableField("entity_name")
    @NotBlank(message = "企业名称不能为空")
    private String entityName;

    @ApiModelProperty("企业证件类型")
    @TableField("cert_type")
    private String certType;

    @ApiModelProperty("企业证件号")
    @TableField("cert_no")
    @NotBlank(message = "企业证件号不能为空")
    private String certNo;

    @ApiModelProperty("成立日期")
    @TableField("establish_date")
    private LocalDate establishDate;

    @ApiModelProperty("注册资本")
    @TableField("registered_capital")
    private String registeredCapital;

    @ApiModelProperty("所属行业")
    @TableField("industry")
    private String industry;

    @ApiModelProperty("注册地址")
    @TableField("registered_address")
    private String registeredAddress;

    @ApiModelProperty("经营地址")
    @TableField("business_address")
    private String businessAddress;

    @ApiModelProperty("经营品类")
    @TableField("business_category")
    private String businessCategory;

    @ApiModelProperty("合作起始日")
    @TableField("cooperate_from")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDate cooperateFrom;

    @ApiModelProperty("合作时长")
    @TableField("cooperate_length")
    @Min(value = 1, message = "合作时长不能小于1")
    @Max(value = 1000, message = "合作时长超出范围")
    private Integer cooperateLength;

    @ApiModelProperty("合作时长单位M/Y")
    @TableField("cooperate_unit")
    private String cooperateUnit;

    @ApiModelProperty("企业联系人姓名")
    @TableField("contact_name")
    @NotBlank(message = "企业联系人姓名不能为空")
    private String contactName;

    @ApiModelProperty("企业联系人身份证号(大陆企业需要)")
    @TableField("contact_id_no")
    private String contactIdNo;

    @ApiModelProperty("企业联系人手机号")
    @TableField("contact_mobile")
    @NotBlank(message = "企业联系人手机号不能为空")
    private String contactMobile;

    @ApiModelProperty("企业联系人邮箱")
    @TableField("contact_email")
    @NotBlank(message = "企业联系人邮箱不能为空")
    @Email(message = "邮箱格式不正确")
    private String contactEmail;
}
