package de.oaa.xxx.location.entity;

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

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

@Getter
@Setter
@Entity
@Table(name = "location")
public class LocationEntity {

    @Id
    @Column
    private UUID locationId;

    @Column(nullable = false)
    private UUID ownerId;

    @Column(nullable = false, length = 200)
    private String name;

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

    /** LQ-Profilbild (klein, für Listenansicht) – base64 */
    @Column(columnDefinition = "TEXT")
    private String profilePictureLq;

    /** HQ-Profilbild (max 1024×1024) – base64 */
    @Column(columnDefinition = "MEDIUMTEXT")
    private String profilePictureHq;

    @Column
    private Double lat;

    @Column
    private Double lon;

    @Column(length = 200)
    private String street;

    @Column(length = 200)
    private String city;

    /** Eigentümerschaft wurde vom Anleger bestätigt */
    @Column(nullable = false, columnDefinition = "TINYINT(1) DEFAULT 0")
    private boolean ownershipConfirmed = false;

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