package shop.alien.entity.store;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

/**
 * 福利表
 *
 * @author ssk
 * @since 2025-12-18
 */
@Data
@JsonInclude
@TableName("store_platform_benefits")
@ApiModel(value = "StorePlatformBenefits对象", description = "福利表")
public class StorePlatformBenefits {

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

    @ApiModelProperty(value = "类型：1=优惠券，2=U币")
    @TableField("type")
    private Integer type;

    @ApiModelProperty(value = "优惠券类型（如\"全场通用优惠券\"）")
    @TableField("business_id")
    private String businessId;

    @ApiModelProperty(value = "优惠券使用条件（如\"满100可用\"）")
    @TableField("usage_conditions")
    private String usageConditions;

    @ApiModelProperty(value = "状态：0待审核/1审核拒绝/2审核通过")
    @TableField("status")
    private Integer status;

    @ApiModelProperty(value = "删除标记, 0:未删除, 1:已删除")
    @TableField("delete_flag")
    @TableLogic
    private Integer deleteFlag;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "created_time", fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createdTime;

    @ApiModelProperty(value = "创建人ID")
    @TableField("created_user_id")
    private Integer createdUserId;

    @ApiModelProperty(value = "修改时间")
    @TableField(value = "updated_time", fill = FieldFill.UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updatedTime;

    @ApiModelProperty(value = "修改人ID")
    @TableField("updated_user_id")
    private Integer updatedUserId;

    @ApiModelProperty(value = "优惠券/U币名称")
    @TableField(exist = false)
    private String name;

    @ApiModelProperty(value = "U币Id")
    @TableField(exist = false)
    private Integer virtualCurrencyId;

    @ApiModelProperty(value = "UB数量")
    @TableField(exist = false)
    private Integer virtualCurrencyAmount;
}

