From 733c46c4f962bc5fde5f1f6f03f1b06fe7453145 Mon Sep 17 00:00:00 2001 From: elyudwo Date: Mon, 22 Jan 2024 19:25:19 +0900 Subject: [PATCH 1/2] =?UTF-8?q?[Feat]=20:=20StudyEntity=20=EC=83=9D?= =?UTF-8?q?=EC=84=B1=20=EB=82=A0=EC=A7=9C,=20=EC=88=98=EC=A0=95=20?= =?UTF-8?q?=EB=82=A0=EC=A7=9C=20=EC=A0=80=EC=9E=A5=20=EA=B8=B0=EB=8A=A5=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../studyhubinu/studyhubserver/study/domain/StudyEntity.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/kr/co/studyhubinu/studyhubserver/study/domain/StudyEntity.java b/src/main/java/kr/co/studyhubinu/studyhubserver/study/domain/StudyEntity.java index 777eebf4..5ffbcbd1 100644 --- a/src/main/java/kr/co/studyhubinu/studyhubserver/study/domain/StudyEntity.java +++ b/src/main/java/kr/co/studyhubinu/studyhubserver/study/domain/StudyEntity.java @@ -1,17 +1,16 @@ package kr.co.studyhubinu.studyhubserver.study.domain; -import kr.co.studyhubinu.studyhubserver.apply.domain.ApplyEntity; +import kr.co.studyhubinu.studyhubserver.common.domain.BaseTimeEntity; import lombok.*; import javax.persistence.*; import java.time.LocalDate; -import java.util.List; @Entity @Getter @NoArgsConstructor(access = AccessLevel.PROTECTED) @Table(name = "study") -public class StudyEntity { +public class StudyEntity extends BaseTimeEntity { @Id @Column(name = "study_id") From ee66c5ec2331dc9916e4889675cc20aafe3e0252 Mon Sep 17 00:00:00 2001 From: elyudwo Date: Mon, 22 Jan 2024 19:26:02 +0900 Subject: [PATCH 2/2] =?UTF-8?q?[Feat]=20:=20=EB=82=B4=EA=B0=80=20=EC=9E=91?= =?UTF-8?q?=EC=84=B1=ED=95=9C=20=EA=B2=8C=EC=8B=9C=EA=B8=80=20=EC=A1=B0?= =?UTF-8?q?=ED=9A=8C=20=EC=8B=9C=20studyId=20=EC=B6=94=EA=B0=80=20?= =?UTF-8?q?=EB=B0=98=ED=99=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../studypost/dto/data/PostDataByUserId.java | 16 +++++++++------- .../repository/StudyPostRepositoryImpl.java | 3 ++- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/main/java/kr/co/studyhubinu/studyhubserver/studypost/dto/data/PostDataByUserId.java b/src/main/java/kr/co/studyhubinu/studyhubserver/studypost/dto/data/PostDataByUserId.java index bb523aaf..72cfcd42 100644 --- a/src/main/java/kr/co/studyhubinu/studyhubserver/studypost/dto/data/PostDataByUserId.java +++ b/src/main/java/kr/co/studyhubinu/studyhubserver/studypost/dto/data/PostDataByUserId.java @@ -8,20 +8,22 @@ @Getter public class PostDataByUserId { - private Long postId; - private MajorType major; - private String title; - private String content; - private Integer remainingSeat; - private boolean close; + private final Long postId; + private final MajorType major; + private final String title; + private final String content; + private final Integer remainingSeat; + private final boolean close; + private final Long studyId; @Builder - public PostDataByUserId(Long postId, MajorType major, String title, String content, Integer remainingSeat, boolean close) { + public PostDataByUserId(Long postId, MajorType major, String title, String content, Integer remainingSeat, boolean close, Long studyId) { this.postId = postId; this.major = major; this.title = title; this.content = content; this.remainingSeat = remainingSeat; this.close = close; + this.studyId = studyId; } } diff --git a/src/main/java/kr/co/studyhubinu/studyhubserver/studypost/repository/StudyPostRepositoryImpl.java b/src/main/java/kr/co/studyhubinu/studyhubserver/studypost/repository/StudyPostRepositoryImpl.java index 4c4d3a5b..98fdcac1 100644 --- a/src/main/java/kr/co/studyhubinu/studyhubserver/studypost/repository/StudyPostRepositoryImpl.java +++ b/src/main/java/kr/co/studyhubinu/studyhubserver/studypost/repository/StudyPostRepositoryImpl.java @@ -90,7 +90,8 @@ public List findByPostedUserId(final Long userId, final Pageab post.title, post.content, post.remainingSeat, - post.close + post.close, + post.studyId ) ) .from(post)