From ce4487b60a18aa77bbedcfaa9e3e94cc604426df Mon Sep 17 00:00:00 2001 From: Kacper Jarocki Date: Sat, 21 Oct 2023 20:12:19 +0200 Subject: [PATCH] updated models --- .../main/java/server/model/SpaceAccesses.java | 21 ++++++++++++++++ server/src/main/java/server/model/Spaces.java | 25 +++++++++++++++++++ .../main/java/server/model/UrlAddresses.java | 17 +++++++++++++ 3 files changed, 63 insertions(+) create mode 100644 server/src/main/java/server/model/SpaceAccesses.java create mode 100644 server/src/main/java/server/model/Spaces.java create mode 100644 server/src/main/java/server/model/UrlAddresses.java diff --git a/server/src/main/java/server/model/SpaceAccesses.java b/server/src/main/java/server/model/SpaceAccesses.java new file mode 100644 index 0000000..728f6d9 --- /dev/null +++ b/server/src/main/java/server/model/SpaceAccesses.java @@ -0,0 +1,21 @@ +package server.model; + +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import lombok.Getter; +import lombok.Setter; + +@Entity +@Getter +@Setter +public class SpaceAccesses { + @Id + private int accessId; + @Column(name = "space_id") + private int spaceId; + @Column(name = "account_id") + private int accountId; + private Boolean read; + private Boolean write; +} diff --git a/server/src/main/java/server/model/Spaces.java b/server/src/main/java/server/model/Spaces.java new file mode 100644 index 0000000..1a76498 --- /dev/null +++ b/server/src/main/java/server/model/Spaces.java @@ -0,0 +1,25 @@ +package server.model; + +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import lombok.Getter; +import lombok.Setter; + +import java.time.LocalDateTime; + +@Entity +@Getter +@Setter +public class Spaces { + @Id + @Column(name = "space_id") + private int spaceId; + @Column(name = "space_creator_id") + private int spaceCreatorId; + private String title; + @Column(name = "modification_date") + private LocalDateTime modificationDate; + @Column(name = "url_address_id") + private int urlAddressId; +} diff --git a/server/src/main/java/server/model/UrlAddresses.java b/server/src/main/java/server/model/UrlAddresses.java new file mode 100644 index 0000000..e2a0fea --- /dev/null +++ b/server/src/main/java/server/model/UrlAddresses.java @@ -0,0 +1,17 @@ +package server.model; + +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import lombok.Getter; +import lombok.Setter; + +@Entity +@Getter +@Setter +public class UrlAddresses { + @Id + @Column(name = "url_id") + private int urlId; + private String urlAddress; +}