package com.datacenter.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 lombok.Data;

import java.util.Date;

/**
 * 体验金直邀发放去重日志
 * UNIQUE KEY (position_id, product_id) 保证每个仓位对每个产品只触发一次发放
 */
@Data
@TableName("experience_gift_invite_grant_log")
public class ExperienceGiftInviteGrantLog {

    @TableId(type = IdType.AUTO)
    private Long id;

    /** 触发发放的合约仓位ID */
    @TableField("position_id")
    private Long positionId;

    /** 体验金产品ID */
    @TableField("product_id")
    private Long productId;

    /** 被发放体验金的邀请人ID */
    @TableField("inviter_id")
    private Long inviterId;

    @TableField("created_at")
    private Date createdAt;
}
