Skip to content

Commit

Permalink
Merge pull request #75 from study-hub-inu/feat/SH-287-post
Browse files Browse the repository at this point in the history
Feat/sh 287 post
  • Loading branch information
elyudwo authored Jan 22, 2024
2 parents 2f388ec + ee66c5e commit 4d7d6bc
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ public List<PostDataByUserId> findByPostedUserId(final Long userId, final Pageab
post.title,
post.content,
post.remainingSeat,
post.close
post.close,
post.studyId
)
)
.from(post)
Expand Down

0 comments on commit 4d7d6bc

Please sign in to comment.