package de.oaa.xxx.gruppe.entity;

import de.oaa.xxx.gruppe.AnfrageStatus;
import jakarta.persistence.*;
import lombok.Getter;
import lombok.Setter;

import java.time.LocalDateTime;
import java.util.UUID;

@Getter
@Setter
@Entity
@Table(name = "beitrittsanfrage")
public class BeitrittsanfrageEntity {

    @Id
    @Column
    private UUID anfrageId;

    @Column(nullable = false)
    private UUID gruppeId;

    @Column(nullable = false)
    private UUID userId;

    @Column(columnDefinition = "TEXT")
    private String nachricht;

    @Column(nullable = false)
    private LocalDateTime angefragtAt;

    @Enumerated(EnumType.STRING)
    @Column(nullable = false, length = 15)
    private AnfrageStatus status;
}
