package com.gxwebsoft.common.system.entity;

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

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 租户套餐
 *
 * @author WebSoft
 * @since 2025-12-12
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(name = "TenantPackage对象", description = "租户套餐")
@TableName("sys_tenant_package")
public class TenantPackage implements Serializable {
    private static final long serialVersionUID = 1L;

    @Schema(description = "套餐ID")
    @TableId(value = "package_id", type = IdType.AUTO)
    private Integer packageId;

    @Schema(description = "套餐名称")
    private String packageName;

    @Schema(description = "版本号 0试用 10基础 20专业 30企业 99私有")
    private Integer version;

    @Schema(description = "月付价格")
    private BigDecimal priceMonthly;

    @Schema(description = "年付价格")
    private BigDecimal priceYearly;

    @Schema(description = "季付价格")
    private BigDecimal priceQuarterly;

    @Schema(description = "最大用户数 0无限")
    private Integer maxUsers;

    @Schema(description = "最大订单数 0无限")
    private Integer maxOrders;

    @Schema(description = "存储空间限制(MB) 0无限")
    private Long storageLimit;

    @Schema(description = "API调用限制(次/天) 0无限")
    private Integer apiLimit;

    @Schema(description = "试用天数")
    private Integer trialDays;

    @Schema(description = "功能列表JSON")
    private String features;

    @Schema(description = "状态 0下架 1上架")
    private Integer status;

    @Schema(description = "排序号")
    private Integer sortNumber;

    @Schema(description = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    @Schema(description = "修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;
}
