package com.gxwebsoft.shop.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.TableLogic;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 礼品卡
 *
 * @author 科技小王子
 * @since 2025-08-11 18:07:31
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(name = "ShopGift对象", description = "礼品卡")
public class ShopGift implements Serializable {
    private static final long serialVersionUID = 1L;

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

    @Schema(description = "礼品卡名称")
    private String name;

    @Schema(description = "秘钥")
    private String code;

    @Schema(description = "商品ID")
    private Integer goodsId;

    @Schema(description = "商品名称")
    @TableField(exist = false)
    private String goodsName;

    @Schema(description = "商品图片")
    @TableField(exist = false)
    private String goodsImage;

    @Schema(description = "面值")
    @TableField(exist = false)
    private BigDecimal faceValue;

    @Schema(description = "使用地点")
    private String useLocation;

    @Schema(description = "领取时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime takeTime;

    @Schema(description = "核销时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime verificationTime;

    @Schema(description = "操作人ID")
    private Integer operatorUserId;

    @Schema(description = "操作人")
    @TableField(exist = false)
    private String operatorUserName;

    @Schema(description = "操作备注")
    private String operatorRemarks;

    @Schema(description = "是否展示")
    private Boolean isShow;

    @Schema(description = "状态, 0上架 1待上架 2待审核 3审核不通过")
    private Integer status;

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

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

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

    @Schema(description = "昵称")
    @TableField(exist = false)
    private String nickName;

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

    @Schema(description = "租户id")
    private Integer tenantId;

    @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;

    @TableField(exist = false)
    private Integer num;

    @TableField(exist = false)
    private ShopGoods goods;
}
