package com.izouma.nineth.domain;

import com.izouma.nineth.enums.OrderStatus;
import com.izouma.nineth.enums.PayMethod;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

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

@Data
@Entity
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class RechargeOrder extends BaseEntityNoID {

    @Id
    private Long id;

    private Long userId;

    @Column(precision = 10, scale = 2)
    private BigDecimal amount;

    @Enumerated(EnumType.STRING)
    @Column(length = 20)
    private PayMethod payMethod;

    private String transactionId;

    @Enumerated(EnumType.STRING)
    @Column(length = 20)
    private OrderStatus status;
}
