From 60777e176d444c9ef2e2a17b47c60f3e04b376d0 Mon Sep 17 00:00:00 2001 From: 5uhwann <106325839+5uhwann@users.noreply.github.com> Date: Sat, 7 Sep 2024 11:32:29 +0900 Subject: [PATCH] =?UTF-8?q?[DEV-000]=20Feed=20=EC=97=94=ED=8B=B0=ED=8B=B0?= =?UTF-8?q?=20=EC=BB=AC=EB=9F=BC=20=ED=83=80=EC=9E=85=20=EC=88=98=EC=A0=95?= =?UTF-8?q?=20(#107)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ddingdongBE/domain/feed/entity/Feed.java | 42 +++++++++---------- .../db/migration/V4__Create_feed.sql | 2 +- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/main/java/ddingdong/ddingdongBE/domain/feed/entity/Feed.java b/src/main/java/ddingdong/ddingdongBE/domain/feed/entity/Feed.java index a2950cba..864174a9 100644 --- a/src/main/java/ddingdong/ddingdongBE/domain/feed/entity/Feed.java +++ b/src/main/java/ddingdong/ddingdongBE/domain/feed/entity/Feed.java @@ -28,31 +28,31 @@ @Table(appliesTo = "feed") public class Feed extends BaseEntity { - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - private Long id; + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; - @Column(nullable = false) - private String activityContent; + @Column(nullable = false, length = 100) + private String activityContent; - @Column(nullable = false) - private String thumbnailUrl; + @Column(nullable = false) + private String thumbnailUrl; - @Column(nullable = false) - @Enumerated(EnumType.STRING) - private FeedType feedType; + @Column(nullable = false) + @Enumerated(EnumType.STRING) + private FeedType feedType; - @ManyToOne(fetch = FetchType.LAZY) - private Club club; + @ManyToOne(fetch = FetchType.LAZY) + private Club club; - @Column(name = "deleted_at") - private LocalDateTime deletedAt; + @Column(name = "deleted_at") + private LocalDateTime deletedAt; - @Builder - private Feed(String activityContent, String thumbnailUrl, Club club, FeedType feedType) { - this.activityContent = activityContent; - this.thumbnailUrl = thumbnailUrl; - this.club = club; - this.feedType = feedType; - } + @Builder + private Feed(String activityContent, String thumbnailUrl, Club club, FeedType feedType) { + this.activityContent = activityContent; + this.thumbnailUrl = thumbnailUrl; + this.club = club; + this.feedType = feedType; + } } diff --git a/src/main/resources/db/migration/V4__Create_feed.sql b/src/main/resources/db/migration/V4__Create_feed.sql index 1d1e792c..a0e50cf6 100644 --- a/src/main/resources/db/migration/V4__Create_feed.sql +++ b/src/main/resources/db/migration/V4__Create_feed.sql @@ -1,6 +1,6 @@ CREATE TABLE feed ( id BIGINT AUTO_INCREMENT PRIMARY KEY, - activity_content TEXT NOT NULL, + activity_content VARCHAR(100) NOT NULL, thumbnail_url VARCHAR(255) NOT NULL, feed_type VARCHAR(10) NOT NULL, deleted_at DATETIME,