Skip to content

Commit

Permalink
[#88] env: [Spring] 패키지간 import 문제 해결
Browse files Browse the repository at this point in the history
  • Loading branch information
rdd9223 committed Dec 2, 2023
1 parent 1b1c8da commit 0934c28
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import lombok.*;
import java.util.List;
import org.sopt.makers.crew.main.entity.like.Like;
import org.sopt.makers.crew.main.entity.like.Report;
import org.sopt.makers.crew.main.entity.report.Report;
import org.sopt.makers.crew.main.entity.post.Post;
import org.sopt.makers.crew.main.entity.user.User;
import org.springframework.data.annotation.CreatedDate;
Expand Down Expand Up @@ -138,8 +138,8 @@ public class Comment {

@Builder
public Comment(String contents, int depth, int order,
User user, int userId, Post post, int postId, int likeCount, Comment parent,
int parentId, List<Comment> children, List<Report> reports) {
User user, int userId, Post post, int postId, int likeCount, Comment parent,
int parentId, List<Comment> children, List<Report> reports) {
this.contents = contents;
this.depth = depth;
this.order = order;
Expand All @@ -153,14 +153,14 @@ public Comment(String contents, int depth, int order,
}

public void addLike(Like like) {
likes.add(like);
this.likes.add(like);
}

public void addChildrenComment(Comment comment) {
children.add(comment);
this.children.add(comment);
}

public void addReport(Report report) {
reports.add(report);
this.reports.add(report);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,16 @@
import jakarta.persistence.ManyToOne;
import jakarta.persistence.OneToMany;
import jakarta.persistence.Table;
import jakarta.persistence.Temporal;
import jakarta.persistence.TemporalType;
import java.time.LocalDateTime;
import java.util.ArrayList;
import lombok.*;
import org.hibernate.annotations.JdbcTypeCode;


import java.util.List;
import org.hibernate.type.SqlTypes;
import org.sopt.makers.crew.main.entity.comment.Comment;
import org.sopt.makers.crew.main.entity.like.Like;
import org.sopt.makers.crew.main.entity.like.Report;
import org.sopt.makers.crew.main.entity.report.Report;
import org.sopt.makers.crew.main.entity.meeting.Meeting;
import org.sopt.makers.crew.main.entity.user.User;
import org.springframework.data.annotation.CreatedDate;
Expand Down Expand Up @@ -142,7 +139,7 @@ public class Post {

@Builder
public Post(String title, String contents,
String[] images, User user, int userId, Meeting meeting, int meetingId) {
String[] images, User user, int userId, Meeting meeting, int meetingId) {
this.title = title;
this.contents = contents;
this.viewCount = 0;
Expand All @@ -156,14 +153,14 @@ public Post(String title, String contents,
}

public void addLike(Like like) {
likes.add(like);
this.likes.add(like);
}

public void addComment(Comment comment) {
comments.add(comment);
this.comments.add(comment);
}

public void addReport(Report report) {
reports.add(report);
this.reports.add(report);
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.sopt.makers.crew.main.entity.like;
package org.sopt.makers.crew.main.entity.report;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
Expand All @@ -10,8 +10,6 @@
import jakarta.persistence.JoinColumn;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.Table;
import jakarta.persistence.Temporal;
import jakarta.persistence.TemporalType;
import java.time.LocalDateTime;
import lombok.AccessLevel;
import lombok.Builder;
Expand Down Expand Up @@ -84,7 +82,7 @@ public class Report {

@Builder
public Report(User user, int userId, Post post, int postId, Comment comment,
int commentId) {
int commentId) {
this.user = user;
this.userId = userId;
this.post = post;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import org.hibernate.type.SqlTypes;
import org.sopt.makers.crew.main.entity.apply.Apply;
import org.sopt.makers.crew.main.entity.like.Like;
import org.sopt.makers.crew.main.entity.like.Report;
import org.sopt.makers.crew.main.entity.report.Report;
import org.sopt.makers.crew.main.entity.meeting.Meeting;
import org.sopt.makers.crew.main.entity.post.Post;
import org.sopt.makers.crew.main.entity.user.vo.UserActivityVO;
Expand Down Expand Up @@ -106,18 +106,18 @@ public User(String name, int orgId, UserActivityVO[] activities, String profileI
}

public void addMeeting(Meeting meeting) {
meetings.add(meeting);
this.meetings.add(meeting);
}

public void addApply(Apply apply) {
applies.add(apply);
this.applies.add(apply);
}

public void addLike(Like like) {
likes.add(like);
this.likes.add(like);
}

public void addReport(Report report) {
reports.add(report);
this.reports.add(report);
}
}

0 comments on commit 0934c28

Please sign in to comment.