package com.starry.admin.modules.withdraw.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.starry.admin.modules.withdraw.enums.EarningsType;
import com.starry.common.domain.BaseEntity;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

@Data
@EqualsAndHashCode(callSuper = false)
@TableName("play_earnings_line")
public class EarningsLineEntity extends BaseEntity<EarningsLineEntity> {
    private String id;
    private String tenantId;
    private String clerkId;
    private String orderId;
    private BigDecimal amount;
    private EarningsType earningType;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime unlockTime;

    /**
     * frozen / available / withdrawing / withdrawn / reversed
     */
    private String status;

    private String withdrawalId;
}
