An den Verantaltungen und Locations gearbeitet
Some checks failed
Host-Based Deploy (Java 21 Fix) / build-and-run (push) Has been cancelled
Some checks failed
Host-Based Deploy (Java 21 Fix) / build-and-run (push) Has been cancelled
This commit is contained in:
55
src/main/java/de/oaa/xxx/location/entity/LocationEntity.java
Normal file
55
src/main/java/de/oaa/xxx/location/entity/LocationEntity.java
Normal file
@@ -0,0 +1,55 @@
|
||||
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;
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
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_event_attendee",
|
||||
uniqueConstraints = @UniqueConstraint(columnNames = {"event_id", "user_id"}))
|
||||
public class LocationEventAttendeeEntity {
|
||||
|
||||
@Id
|
||||
@Column
|
||||
private UUID attendeeId;
|
||||
|
||||
@Column(nullable = false, name = "event_id")
|
||||
private UUID eventId;
|
||||
|
||||
@Column(nullable = false, name = "user_id")
|
||||
private UUID userId;
|
||||
|
||||
@Column(nullable = false)
|
||||
private LocalDateTime registeredAt;
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
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_event")
|
||||
public class LocationEventEntity {
|
||||
|
||||
@Id
|
||||
@Column
|
||||
private UUID eventId;
|
||||
|
||||
@Column(nullable = false)
|
||||
private UUID locationId;
|
||||
|
||||
@Column(nullable = false, length = 200)
|
||||
private String title;
|
||||
|
||||
@Column(columnDefinition = "TEXT")
|
||||
private String description;
|
||||
|
||||
/** base64-Profilbild der Veranstaltung, max 1024px */
|
||||
@Column(columnDefinition = "MEDIUMTEXT")
|
||||
private String imageData;
|
||||
|
||||
@Column(nullable = false)
|
||||
private LocalDateTime startAt;
|
||||
|
||||
@Column(nullable = false)
|
||||
private LocalDateTime createdAt;
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package de.oaa.xxx.location.entity;
|
||||
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.Table;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.UUID;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@Entity
|
||||
@Table(name = "location_follow")
|
||||
public class LocationFollowEntity {
|
||||
|
||||
@Id
|
||||
@Column
|
||||
private UUID followId;
|
||||
|
||||
@Column(nullable = false)
|
||||
private UUID locationId;
|
||||
|
||||
@Column(nullable = false)
|
||||
private UUID userId;
|
||||
|
||||
@Column(nullable = false)
|
||||
private LocalDateTime followedAt;
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
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_image")
|
||||
public class LocationImageEntity {
|
||||
|
||||
@Id
|
||||
@Column
|
||||
private UUID imageId;
|
||||
|
||||
@Column(nullable = false)
|
||||
private UUID locationId;
|
||||
|
||||
/** base64-kodiertes Bild, max 1024px */
|
||||
@Column(nullable = false, columnDefinition = "MEDIUMTEXT")
|
||||
private String imageData;
|
||||
|
||||
@Column(nullable = false)
|
||||
private LocalDateTime uploadedAt;
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package de.oaa.xxx.location.entity;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@Entity
|
||||
@Table(name = "location_opening_hours",
|
||||
uniqueConstraints = @UniqueConstraint(columnNames = {"location_id", "day_of_week"}))
|
||||
public class LocationOpeningHoursEntity {
|
||||
|
||||
@Id
|
||||
@Column
|
||||
private UUID hoursId;
|
||||
|
||||
@Column(nullable = false, name = "location_id")
|
||||
private UUID locationId;
|
||||
|
||||
/**
|
||||
* Wochentag: 1 = Montag, 2 = Dienstag, ..., 7 = Sonntag
|
||||
*/
|
||||
@Column(nullable = false, name = "day_of_week")
|
||||
private int dayOfWeek;
|
||||
|
||||
/** Öffnungszeit als "HH:mm"-String, null = kein Eintrag */
|
||||
@Column(length = 5)
|
||||
private String openTime;
|
||||
|
||||
/** Schließzeit als "HH:mm"-String, null = kein Eintrag */
|
||||
@Column(length = 5)
|
||||
private String closeTime;
|
||||
|
||||
/** true = an diesem Tag geschlossen */
|
||||
@Column(nullable = false, columnDefinition = "TINYINT(1) DEFAULT 0")
|
||||
private boolean closed = false;
|
||||
}
|
||||
Reference in New Issue
Block a user