package com.seer.teach.user.entity;

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

import java.time.LocalDateTime;

/**
 * <p>
 * 租户表
 * </p>
 *
 * @author Wang
 * @since 2025-08-01 19:20:17
 */
@Getter
@Setter
@TableName("sys_tenant")
@Schema(name = "TenantEntity对象", description = "租户表")
public class TenantEntity {

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @Schema(description = "租户编号")
    @TableField("tenant_id")
    private String tenantId;

    @Schema(description = "租户名")
    @TableField("`name`")
    private String name;

    @Schema(description = "租户管理员用户ID")
    @TableField("admin_user_id")
    private Long adminUserId;

    @Schema(description = "管理员手机号码")
    @TableField("admin_phone")
    private String adminPhone;

    @Schema(description = "管理员银行卡号(加密存储)")
    @TableField("admin_bank_card")
    private String adminBankCard;

    @Schema(description = "营业执照文件")
    @TableField("businessLicense_file")
    private String businessLicenseFile;

    @Schema(description = "营业执照编码")
    @TableField("businessLicense_file")
    private String businessLicenseCode;

    @Schema(description = "过期时间")
    @TableField("expire_time")
    private LocalDateTime expireTime;

    @Schema(description = "账号数量限制")
    @TableField("account_limit")
    private Integer accountLimit;

    @Schema(description = "租户套餐编号")
    @TableField("package_id")
    private String packageId;

    @Schema(description = "状态(0-禁用,1-正常,2-过期)")
    @TableField("`status`")
    private Integer status;


    /**
     * 是否删除,0-正常，1-删除
     */
    @TableField("deleted")
    @TableLogic
    private Integer deleted=0;

    /**
     * 更新时间
     */
    @Schema(description = "更新时间")
    @TableField(value = "update_time", fill = FieldFill.UPDATE)
    private LocalDateTime updateTime;

    /**
     * 创建人
     */
    @TableField(value = "create_by", fill = FieldFill.INSERT)
    private String createBy;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 修改人
     */
    @TableField(value = "update_by", fill = FieldFill.UPDATE)
    private String updateBy;
}