package com.gxwebsoft.common.system.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.List;

/**
 * 租户
 *
 * @author 科技小王子
 * @since 2023-07-17 17:49:53
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(name = "Tenant对象", description = "租户")
@TableName("sys_tenant")
public class Tenant implements Serializable {
  private static final long serialVersionUID = 1L;

  @Schema(description = "租户id")
  @TableId(value = "tenant_id", type = IdType.AUTO)
  private Integer tenantId;

  @Schema(description = "租户名称")
  private String tenantName;

  @Schema(description = "租户编号")
  private String tenantCode;

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

  @Schema(description = "状态")
  private Integer status;

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

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

  @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 = "logo")
  @TableField(exist = false)
  private String logo;

  @Schema(description = "游客")
  @TableField(exist = false)
  private String username;

  @Schema(description = "游客身份")
  @TableField(exist = false)
  private String token;

  @Schema(description = "当前登录用户")
  @TableField(exist = false)
  private User loginUser;

  @Schema(description = "菜单信息")
  @TableField(exist = false)
  private List<Menu> menu;

}
