package de.szut.casino.deposit;

import de.szut.casino.user.UserEntity;
import jakarta.persistence.*;
import lombok.Getter;
import lombok.Setter;

import java.util.Date;

@Setter
@Getter
@Entity
public class TransactionEntity {
    @Id
    @GeneratedValue
    private Long id;

    @ManyToOne
    @JoinColumn(name = "user_id", nullable = false)
    private UserEntity user;

    @Column(unique = true)
    private String sessionId = null;

    private double amount = 0;

    @Enumerated(EnumType.STRING)
    private TransactionStatus status = TransactionStatus.PROCESSING;

    @Column(name = "created_at")
    private Date createdAt = new Date();
}
