package com.sonic.lion.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.sonic.lion.enums.MemberType;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "user_subscribe_log", autoResultMap = true)
@Data
public class UserSubscribeLog {

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

    private Long userId;

    /**
     * 原来的用户ID【场景：先登录A用户订阅，然后切换登录到B用户来进行订阅】
     */
    private Long orgUserId;

    private String platform;

    private String subscriptionId;

    /**
     * 订阅套餐类型
     */
    private MemberType memberType;

    private AppStoreProduct.PERIOD period;

    /**
     * 内购商品项id
     */
    private String productId;

    /**
     * 得到的Buff
     */
    private Long buff;

    /**
     * 支付金额
     */
    private Long payAmount;

    /**
     * 平台抽成
     */
    private Long appStoreAmount;


    private LocalDateTime createTime;
}
