package com.bizzan.bitrade.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 体验金提现申请表
 */
@Entity
@Data
@Table(name = "experience_gift_withdraw")
public class ExperienceGiftWithdraw {

    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Id
    private Long id;

    /** 申请用户ID */
    @Column(name = "member_id")
    private Long memberId;

    /** 申请提现金额（USDT） */
    private BigDecimal amount;

    /**
     * 状态
     */
    @Enumerated(EnumType.ORDINAL)
    private ExperienceGiftWithdrawStatus status = ExperienceGiftWithdrawStatus.PENDING;

    @Column(name = "apply_at")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date applyAt;

    @Column(name = "reviewed_at")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date reviewedAt;

    /** 审核管理员ID */
    @Column(name = "reviewed_by")
    private Long reviewedBy;

    /** 审核备注（驳回原因） */
    @Column(name = "review_remark")
    private String reviewRemark;

    @Column(name = "settled_at")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date settledAt;

    @Column(name = "created_at")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createdAt;

    @Column(name = "updated_at")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updatedAt;
}
