package com.sonic.lion.domain.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.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 * @author: code
 * @date: 2025/07/15
 * @Description: iOS上传的票据
 * @version: 1.0.0
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName(value = "iap_upload_receipt", autoResultMap = true)
public class IapUploadReceipt {

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

    /**
     * 本单收据所包含苹果交易号所对应的系统内部交易号，格式:{transactionId:tradeNo}
     */
    private String transactionsJsonStr;

    /**
     * 加密的收据
     */
    private String receipt;

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

    /**
     * 交易号
     */
    private String tradeNo;

    /**
     * 是否已处理 0:否 1:是
     */
    @TableField("is_processed")
    private Boolean processed;

    /**
     * 创建时间
     */
    private LocalDateTime createTime;

    /**
     * 编辑时间
     */
    private LocalDateTime editTime;
}