package com.czg.market.entity;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import java.io.Serializable;
import java.time.LocalDateTime;

import java.io.Serial;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * 兑换码明细 实体类。
 *
 * @author zs
 * @since 2025-10-22
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table("mk_redemption_code")
@Accessors(chain = true)
public class MkRedemptionCode implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Id(keyType = KeyType.Auto)
    private Long id;

    /**
     * 兑换配置id
     */
    private Long redemptionId;

    /**
     * 主店id
     */
    private Long mainShopId;

    /**
     * 兑换时间
     */
    private LocalDateTime redemptionTime;

    /**
     * 0未兑换 1已兑换
     */
    private Integer status;

    /**
     * 店铺用户id
     */
    private Long shopUserId;

    /**
     * 用户id
     */
    private Long userId;

    /**
     * 创建时间
     */
    @Column(onInsertValue = "now()")
    private LocalDateTime createTime;

    /**
     * 修改时间
     */
    @Column(onInsertValue = "now()", onUpdateValue = "now()")
    private LocalDateTime updateTime;

    private String code;

}
