package org.dromara.system.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.dromara.common.mybatis.core.domain.BaseEntity;

import java.io.Serial;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 租户对象 sys_tenant
 *
 * @author Michelle.Chung
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("sys_tenant")
@Schema(description = "租户信息")
public class SysTenant extends BaseEntity {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "id")
    @TableId(value = "id")
    private Long id;

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

    @Schema(description = "所有父级id")
    private String parentIds;

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

    @Schema(description = "统一社会信用代码")
    private String licenseNumber;

    @Schema(description = "地址")
    private String address;

    @Schema(description = "域名")
    private String domain;

    @Schema(description = "企业简介")
    private String intro;

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

    @Schema(description = "用户数量（-1不限制）")
    private Long accountCount;

    @Schema(description = "租户状态（0正常 1停用）")
    private String status;

    @Schema(description = "删除标志（0代表存在 1代表删除）")
    @TableLogic
    private String delFlag;

    @Schema(description = "营业执照编号")
    private String businessLicense;

    @Schema(description = "入驻时间")
    private LocalDateTime joinTime;

    @Schema(description = "营业执照附件")
    private String attachment;

    @Schema(description = "推广附件")
    private String promoteList;

    @Schema(description = "营业执照有效期")
    private LocalDateTime expireTime;

    @Schema(description = "店铺名称")
    private String storeName;

    @Schema(description = "企业类型")
    private String companyType;

    @Schema(description = "经营类型")
    private String businessTypes;

    @Schema(description = "相关资质名称及附件")
    private String related;

    @Schema(description = "联系人")
    private String contactUserName;

    @Schema(description = "联系人手机号")
    private String contactPhone;

    /**
     * 是否承担手续费
     */
    private Integer bearFeeFlag;


    @Schema(description = "代理机构名称")
    private String agencyName;

    @Schema(description = "所属区县")
    @TableField(typeHandler = JacksonTypeHandler.class)
    private List<String> county;

    @Schema(description = "出生年月")
    private LocalDateTime birthday;

    @Schema(description = "代理人资质")
    private String qualification;

    @Schema(description = "类型(2->商家,3->代理,4->平台,5->达人)")
    private Integer type;

    @Schema(description = "所属代理商")
    private String agencyTenantId;

    @Schema(description = "所属推广人")
    private String promoterTenantId;


}
