package com.ningdatech.carapi.sys.entity;

import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;

import java.time.LocalDateTime;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ningdatech.carapi.common.base.BaseEntity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

/**
 * <p>
 * 实体类
 * 企业
 * </p>
 *
 * @author PoffyZhang
 * @since 2022-10-09
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("nd_company_info")
@ApiModel(value = "Company", description = "企业")
@AllArgsConstructor
@Builder
public class Company extends BaseEntity {

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

    private static final long serialVersionUID = 1L;

    /**
     * 企业名称
     */
    @ApiModelProperty(value = "企业名称")
    @NotEmpty(message = "企业名称不能为空")
    @Size(max = 30, message = "企业名称长度不能超过30")
    @TableField(value = "name", condition = LIKE)
    private String name;

    /**
     * 车辆数
     */
    @ApiModelProperty(value = "车辆数")
    @TableField("vehicle_num")
    private Long vehicleNum;

    /**
     * 地区ID
     */
    @ApiModelProperty(value = "地区id")
    @TableField("region_id")
    private Long regionId;

    /**
     * 地区名
     */
    @ApiModelProperty(value = "地区名")
    @TableField("region_name")
    private String regionName;

    /**
     * 运营商ID
     */
    @ApiModelProperty(value = "运营商ID")
    @TableField("operator_id")
    private Long operatorId;

    /**
     * 传真
     */
    @ApiModelProperty(value = "传真")
    @Size(max = 50, message = "传真长度不能超过50")
    @TableField(value = "fax")
    private String fax;

    /**
     * email
     */
    @ApiModelProperty(value = "email")
    @TableField(value = "email")
    private String email;

    /**
     * 地址
     */
    @ApiModelProperty(value = "地址")
    @Size(max = 200, message = "地址长度不能超过200")
    @TableField(value = "address", condition = LIKE)
    private String address;

    /**
     * 联系人
     */
    @ApiModelProperty(value = "联系人")
    @Size(max = 200, message = "联系人长度不能超过200")
    @TableField(value = "contact_person", condition = LIKE)
    private String contactPerson;

    /**
     * 联系方式
     */
    @ApiModelProperty(value = "联系方式")
    @Size(max = 50, message = "联系方式长度不能超过50")
    @TableField(value = "contact_phone", condition = LIKE)
    private String contactPhone;

    /**
     * 法人
     */
    @ApiModelProperty(value = "法人")
    @Size(max = 200, message = "法人长度不能超过200")
    @TableField(value = "legal_person", condition = LIKE)
    private String legalPerson;

    /**
     * 法人联系电话
     */
    @ApiModelProperty(value = "法人联系电话")
    @Size(max = 50, message = "法人联系电话长度不能超过50")
    @TableField(value = "legal_person_phone", condition = LIKE)
    private String legalPersonPhone;

    /**
     * 公司类型
     */
    @ApiModelProperty(value = "公司类型")
    @TableField("company_type")
    private Integer companyType;

    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    @Size(max = 200, message = "备注不能超过200")
    @TableField(value = "remark", condition = LIKE)
    private String remark;

    @ApiModelProperty(value = "营业执照编号")
    @TableField(value = "business_license", condition = LIKE)
    private String businessLicense;

    @ApiModelProperty(value = "企业简称")
    @TableField(value = "sort_name", condition = LIKE)
    private String sortName;

    @ApiModelProperty(value = "员工数量")
    @TableField("employees_num")
    private Long employeesNum;

    @ApiModelProperty(value = "开户银行")
    @TableField(value = "bank_name", condition = LIKE)
    private String bankName;

    @ApiModelProperty(value = "税号")
    @TableField(value = "duty_paragraph", condition = LIKE)
    private String dutyParagraph;

    @ApiModelProperty(value = "银行账户")
    @TableField(value = "bank_card_no", condition = LIKE)
    private String bankCardNo;

    @ApiModelProperty(value = "法人邮箱")
    @TableField(value = "legal_person_email", condition = LIKE)
    private String legalPersonEmail;

    @ApiModelProperty(value = "企业状态")
    @TableField(value = "company_status")
    private Integer companyStatus;

    @ApiModelProperty(value = "注册资金")
    @TableField(value = "registered_capital", condition = LIKE)
    private String registeredCapital;

    @ApiModelProperty(value = "车辆企业类型")
    @TableField(value = "car_company_type", condition = LIKE)
    private String carCompanyType;

    @ApiModelProperty(value = "失信情况")
    @TableField(value = "black_list")
    private Boolean blackList;

    @ApiModelProperty(value = "经度")
    @TableField(value = "longitude", condition = LIKE)
    private String longitude;

    @ApiModelProperty(value = "纬度")
    @TableField(value = "latitude", condition = LIKE)
    private String latitude;

    @ApiModelProperty(value = "原始数据公司id 导数据使用，项目中无使用场景")
    @TableField(value = "firm_id")
    private Long firmId;

    @ApiModelProperty(value = "在线车辆数")
    @TableField(value = "online_vehicle_num")
    private Long onlineVehicleNum;

    @ApiModelProperty(value = "离线车辆数")
    @TableField(value = "offline_vehicle_num")
    private Long offlineVehicleNum;

    @ApiModelProperty(value = "异常车辆数")
    @TableField(value = "exception_vehicle_num")
    private Long exceptionVehicleNum;

    @ApiModelProperty(value = "区县管理员审核状态")
    @TableField(value = "region_audit_status")
    private Integer regionAuditStatus;

    @ApiModelProperty(value = "市管理员审核状态")
    @TableField(value = "city_audit_status")
    private Integer cityAuditStatus;

    @ApiModelProperty(value = "区县审核人")
    @TableField(value = "region_audit_by")
    private Long regionAuditBy;

    @ApiModelProperty(value = "市散办审核人")
    @TableField(value = "city_audit_by")
    private Long cityAuditBy;

    @ApiModelProperty(value = "区县审核意见")
    @TableField(value = "region_audit_mind")
    private String regionAuditMind;

    @ApiModelProperty(value = "市散办审核意见")
    @TableField(value = "city_audit_mind")
    private String cityAuditMind;

    @ApiModelProperty(value = "区县审核时间")
    @TableField(value = "region_audit_time")
    private LocalDateTime regionAuditTime;

    @ApiModelProperty(value = "市散办审核时间")
    @TableField(value = "city_audit_time")
    private LocalDateTime cityAuditTime;
}
