package com.sonic.lion.domain.entity;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.*;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * account_buff_awaiting
 * @author 
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName(value = "account_buff_awaiting", autoResultMap = true)
public class AccountBuffAwaiting implements Serializable {

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

    /**
     * 流水id account_buff_bill 主键id
     */
    private Long billId;

    /**
     * account_buff.id
     */
    private Long accountId;

    private String tradeNo;

    private Long buff;

    /**
     * 转入可提现收入时间
     */
    private LocalDateTime toWithdrawableIncomeTime;

    private Status status;

    private FronzenStatus fronzenStatus;

    private LocalDateTime createTime;

    private LocalDateTime editTime;


    private static final long serialVersionUID = 1L;

    public enum FronzenStatus {
        UN_FRONZEN , FRONZEN
    }

    @Getter
    public enum Status {

        /**
         * 待入账
         */
        PENDING(0, "PENDING"),

        /**
         * 已入账
         */
        CREDITED(1, "CREDITED"),

        /**
         * 已退款
         */
        REFUNDED(2, "REFUNDED"),
        ;

        private final int value;

        private final String desc;

        Status(int value, String desc) {
            this.value = value;
            this.desc = desc;
        }
    }
}