package com.gxwebsoft.enterprise.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.gxwebsoft.common.core.web.BaseParam;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 企业信息
 * @author GIIT-YC
 */
@Data
@TableName("enterprise")
@EqualsAndHashCode(callSuper = false)
@Schema(name = "Enterprise对象", description = "企业信息表")
public class Enterprise extends BaseParam implements Serializable {
    private static final long serialVersionUID = 1L;

    @Schema(description = "ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @Schema(description = "企业名称")
    private String name;

    @Schema(description = "统一代码")
    private String creditCode;

    @Schema(description = "企业性质（国企、行政事业单位、民间非营利组织）")
    private String enterpriseType;

    @Schema(description = "所属行业（使用插件）")
    private String industry;

    @Schema(description = "知识库ID")
    private String kbId;

    @Schema(description = "客户ID")
    private Integer userId;

    @Schema(description = "租户ID")
    private Integer tenantId;

    @Schema(description = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @Schema(description = "修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    @Schema(description = "状态, 0正常, 1冻结")
    private Integer status;

    @Schema(description = "是否删除, 0否, 1是")
    @TableLogic
    private Integer deleted;
}