package com.ycwl.basic.pricing.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ycwl.basic.pricing.enums.CouponStatus;
import lombok.Data;

import java.util.Date;

/**
 * 优惠券领用记录实体
 */
@Data
@TableName("price_coupon_claim_record")
public class PriceCouponClaimRecord {
    
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    
    /**
     * 优惠券ID
     */
    private Long couponId;
    
    /**
     * 用户ID
     */
    private Long userId;
    
    /**
     * 领取时间
     */
    private Date claimTime;

    /**
     * 过期时间（根据领取时间+领取后有效期计算）
     */
    @TableField("expire_time")
    private Date expireTime;

    /**
     * 使用时间
     */
    private Date useTime;
    
    /**
     * 订单ID
     */
    private String orderId;
    
    /**
     * 状态
     */
    private CouponStatus status;
    
    /**
     * 景区ID - 记录优惠券在哪个景区被领取/使用
     */
    private String scenicId;
    
    @TableField("create_time")
    private Date createTime;
    
    @TableField("update_time")
    private Date updateTime;
    
    private Integer deleted;
    
    private Date deletedAt;
}