summaryrefslogtreecommitdiff
path: root/microservices/03-resource-server/src/main/java/com/example/resourceserver/post/Post.java
diff options
context:
space:
mode:
Diffstat (limited to 'microservices/03-resource-server/src/main/java/com/example/resourceserver/post/Post.java')
-rw-r--r--microservices/03-resource-server/src/main/java/com/example/resourceserver/post/Post.java56
1 files changed, 56 insertions, 0 deletions
diff --git a/microservices/03-resource-server/src/main/java/com/example/resourceserver/post/Post.java b/microservices/03-resource-server/src/main/java/com/example/resourceserver/post/Post.java
new file mode 100644
index 0000000..c66ce1b
--- /dev/null
+++ b/microservices/03-resource-server/src/main/java/com/example/resourceserver/post/Post.java
@@ -0,0 +1,56 @@
+package com.example.resourceserver.post;
+
+import jakarta.persistence.Entity;
+import jakarta.persistence.GeneratedValue;
+import jakarta.persistence.GenerationType;
+import jakarta.persistence.Id;
+import jakarta.persistence.Lob;
+
+@Entity
+public class Post {
+
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ private Long id;
+
+ private String title;
+
+ private String author;
+
+ @Lob
+ private String description;
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getTitle() {
+ return title;
+ }
+
+ public void setTitle(String title) {
+ this.title = title;
+ }
+
+ public String getAuthor() {
+ return author;
+ }
+
+ public void setAuthor(String author) {
+ this.author = author;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+
+}