package com.ruoyi.web.work.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import java.util.Date;
/**
 * @author lsw
 * @date 2024-06-05
 */
@Data
@TableName(value = "tb_enterprise")
@Accessors(chain = true)
public class Enterprise{
    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.INPUT)
    private Long id;

    @NotBlank(message = "公司名称不能为空")
    @ApiModelProperty(value = "公司名称")
    private String name;

    @NotBlank(message = "电话不能为空")
    @ApiModelProperty(value = "电话")
    private String phone;

    @NotBlank(message = "法定代表人不能为空")
    @ApiModelProperty(value = "法定代表人")
    private String legalPerson;

    @NotBlank(message = "邮箱不能为空")
    @ApiModelProperty(value = "邮箱")
    private String email;

    @NotBlank(message = "注册资本不能为空")
    @ApiModelProperty(value = "注册资本")
    private String capital;

    @ApiModelProperty(value = "地区ancestors")
    private String ancestors;

    @NotBlank(message = "地区不能为空")
    @ApiModelProperty(value = "地区")
    private String regionName;

    @NotBlank(message = "地址不能为空")
    @ApiModelProperty(value = "地址")
    private String address;

    @ApiModelProperty(value = "简介")
    private String contents;

    @NotBlank(message = "营业执照不能为空")
    @ApiModelProperty(value = "营业执照")
    private String p1;

    @ApiModelProperty(value = "认证不通过原因")
    private String msg;

    @ApiModelProperty(value = "是否推荐:0=否,1=是")
    private Integer recommend;

    @ApiModelProperty(value = "认证  0未认证 1已认证  2认证不通过")
    private Integer state;

    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @TableField(fill = FieldFill.UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    @ApiModelProperty(value = "企业logo")
    private String logo;

    @ApiModelProperty(value = "经度")
    private String longitude;

    @ApiModelProperty(value = "维度")
    private String latitude;

    @JsonIgnore
    @TableField(exist = false)
    @ApiModelProperty(value = "地区id")
    private Long regionId;

    @JsonIgnore
    @TableField(exist = false)
    private String orderBy = "id";

    @TableField(exist = false)
    @ApiModelProperty(value = "距离km")
    private String distance;

}
