package com.ai.da.mapper.primary.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@TableName("t_referral")
public class Referral extends BaseEntity{

    // 佣金
    private BigDecimal commission;

    private Long affiliateId;

    // affiliate的accountId
    private Long affiliateAccountId;

    // 产生当前订单的受邀者accountId
    private Long inviteeAccountId;

    // 当前订单的总金额（订阅金额）
    private BigDecimal amount;

    // 产生该笔佣金时的佣金百分比
    private Float commissionPercent;

    // 产生该笔佣金的订单(payment_info id)
    private Long paymentInfoId;

    // 状态 Pending || Accept || Rejected || Paid || Unpaid
    private String status;

    private Integer isDeleted = 0;

    private LocalDateTime paymentTime;
}
