package de.oaa.xxx.social.entity;

import jakarta.persistence.*;
import lombok.Getter;
import lombok.Setter;

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

@Getter
@Setter
@Entity
@Table(name = "kommentar")
public class KommentarEntity {

    /** targetType values: PINNWAND, IMAGE, KOMMENTAR */
    @Id
    @Column
    private UUID kommentarId;

    @Column(nullable = false)
    private UUID authorId;

    @Column(length = 20, nullable = false)
    private String targetType;

    @Column(nullable = false)
    private UUID targetId;

    @Column(columnDefinition = "TEXT", nullable = false)
    private String text;

    @Column(nullable = false)
    private LocalDateTime createdAt;
}
