From 35a1463516569292000acf1278b99b771204fc26 Mon Sep 17 00:00:00 2001 From: Jihwan Jung Date: Sun, 5 May 2024 17:59:00 +0900 Subject: [PATCH] =?UTF-8?q?#13=20refactor:=20=EB=AA=A8=EC=9E=84=20?= =?UTF-8?q?=EC=9D=91=EB=8B=B5=EC=8B=9C=20=EB=A9=A4=EB=B2=84=EB=A6=AC?= =?UTF-8?q?=EC=8B=9C=ED=8A=B8=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/.gitignore | 1 + .../project/capstone/book/domain/Book.java | 1 + .../club/controller/dto/ClubResponse.java | 20 +++- .../project/capstone/club/domain/Club.java | 1 + .../capstone/comment/domain/Comment.java | 1 + .../capstone/content/domain/Content.java | 1 + .../controller/dto/SimpleMemberResponse.java | 16 +++ .../capstone/member/domain/Member.java | 1 + .../memberclub/domain/MemberClub.java | 1 + .../capstone/mybook/domain/MyBook.java | 1 + .../project/capstone/post/domain/Post.java | 1 + .../project/capstone/quiz/domain/Quiz.java | 1 + backend/src/main/resources/data.sql | 107 ++++++++++++++++-- 13 files changed, 138 insertions(+), 15 deletions(-) create mode 100644 backend/src/main/java/com/project/capstone/member/controller/dto/SimpleMemberResponse.java diff --git a/backend/.gitignore b/backend/.gitignore index e48b6be674..32e5478201 100644 --- a/backend/.gitignore +++ b/backend/.gitignore @@ -18,6 +18,7 @@ bin/ !**/src/test/**/bin/ ### IntelliJ IDEA ### +/src/main/resources/data.sql .idea *.iws *.iml diff --git a/backend/src/main/java/com/project/capstone/book/domain/Book.java b/backend/src/main/java/com/project/capstone/book/domain/Book.java index a55e49f2a5..a48d0344f6 100644 --- a/backend/src/main/java/com/project/capstone/book/domain/Book.java +++ b/backend/src/main/java/com/project/capstone/book/domain/Book.java @@ -20,6 +20,7 @@ @AllArgsConstructor @Getter @Builder +@Table(name = "book") public class Book { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) diff --git a/backend/src/main/java/com/project/capstone/club/controller/dto/ClubResponse.java b/backend/src/main/java/com/project/capstone/club/controller/dto/ClubResponse.java index da9a934fac..8e16c4a0cd 100644 --- a/backend/src/main/java/com/project/capstone/club/controller/dto/ClubResponse.java +++ b/backend/src/main/java/com/project/capstone/club/controller/dto/ClubResponse.java @@ -5,27 +5,33 @@ import com.project.capstone.book.domain.Book; import com.project.capstone.club.domain.Club; import com.project.capstone.club.domain.PublicStatus; +import com.project.capstone.member.controller.dto.SimpleMemberResponse; +import com.project.capstone.memberclub.domain.MemberClub; import com.project.capstone.post.controller.dto.PostResponse; import com.project.capstone.post.domain.Post; import java.time.LocalDateTime; import java.util.ArrayList; import java.util.List; +import java.util.UUID; public record ClubResponse ( Long id, BookResponse book, + UUID managerId, String topic, String name, LocalDateTime createdAt, int maximum, + int memberCnt, PublicStatus publicstatus, - List posts + List posts, + List memberList ) { public ClubResponse(Club club) { - this(club.getId(), club.getBook() == null ? null : createBookResponse(club.getBook()), club.getTopic(), club.getName(), club.getCreatedAt(), club.getMaximum(), - club.getPublicStatus(), createPostResponseList(club.getPosts())); + this(club.getId(), club.getBook() == null ? null : createBookResponse(club.getBook()), club.getManagerId(), club.getTopic(), club.getName(), club.getCreatedAt(), club.getMaximum(), + club.getMembers().size(), club.getPublicStatus(), createPostResponseList(club.getPosts()), createSimpleMemberResponse(club.getMembers())); } private static List createPostResponseList(List postList) { @@ -36,6 +42,14 @@ private static List createPostResponseList(List postList) { return postResponseList; } + private static List createSimpleMemberResponse(List memberClubList) { + List simpleMemberResponseList = new ArrayList<>(); + for (MemberClub memberClub : memberClubList) { + simpleMemberResponseList.add(new SimpleMemberResponse(memberClub)); + } + return simpleMemberResponseList; + } + private static BookResponse createBookResponse(Book book) { return new BookResponse(book); } diff --git a/backend/src/main/java/com/project/capstone/club/domain/Club.java b/backend/src/main/java/com/project/capstone/club/domain/Club.java index b374ef6ab3..a22f63aadf 100644 --- a/backend/src/main/java/com/project/capstone/club/domain/Club.java +++ b/backend/src/main/java/com/project/capstone/club/domain/Club.java @@ -26,6 +26,7 @@ @Setter @Builder @ToString +@Table(name = "club") public class Club { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) diff --git a/backend/src/main/java/com/project/capstone/comment/domain/Comment.java b/backend/src/main/java/com/project/capstone/comment/domain/Comment.java index 0ccb661e8c..8c853b9bff 100644 --- a/backend/src/main/java/com/project/capstone/comment/domain/Comment.java +++ b/backend/src/main/java/com/project/capstone/comment/domain/Comment.java @@ -19,6 +19,7 @@ @NoArgsConstructor @AllArgsConstructor @Builder +@Table(name = "comment") public class Comment { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) diff --git a/backend/src/main/java/com/project/capstone/content/domain/Content.java b/backend/src/main/java/com/project/capstone/content/domain/Content.java index b70bf829d9..887c4c9376 100644 --- a/backend/src/main/java/com/project/capstone/content/domain/Content.java +++ b/backend/src/main/java/com/project/capstone/content/domain/Content.java @@ -17,6 +17,7 @@ @AllArgsConstructor @NoArgsConstructor @Builder +@Table(name = "content") public class Content { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) diff --git a/backend/src/main/java/com/project/capstone/member/controller/dto/SimpleMemberResponse.java b/backend/src/main/java/com/project/capstone/member/controller/dto/SimpleMemberResponse.java new file mode 100644 index 0000000000..855b1d3e1a --- /dev/null +++ b/backend/src/main/java/com/project/capstone/member/controller/dto/SimpleMemberResponse.java @@ -0,0 +1,16 @@ +package com.project.capstone.member.controller.dto; + +import com.project.capstone.member.domain.Gender; +import com.project.capstone.memberclub.domain.MemberClub; + +import java.util.UUID; + +public record SimpleMemberResponse( + UUID id, + String name, + Gender gender +) { + public SimpleMemberResponse(MemberClub memberClub) { + this(memberClub.getMember().getId(), memberClub.getMember().getName(), memberClub.getMember().getGender()); + } +} diff --git a/backend/src/main/java/com/project/capstone/member/domain/Member.java b/backend/src/main/java/com/project/capstone/member/domain/Member.java index bdd7e2b2a8..2a508c4e6e 100644 --- a/backend/src/main/java/com/project/capstone/member/domain/Member.java +++ b/backend/src/main/java/com/project/capstone/member/domain/Member.java @@ -28,6 +28,7 @@ @AllArgsConstructor @NoArgsConstructor @Builder +@Table(name = "member") public class Member { @Id diff --git a/backend/src/main/java/com/project/capstone/memberclub/domain/MemberClub.java b/backend/src/main/java/com/project/capstone/memberclub/domain/MemberClub.java index 2e78b7dd3a..1cf88ea99b 100644 --- a/backend/src/main/java/com/project/capstone/memberclub/domain/MemberClub.java +++ b/backend/src/main/java/com/project/capstone/memberclub/domain/MemberClub.java @@ -12,6 +12,7 @@ @AllArgsConstructor @NoArgsConstructor @Getter +@Table(name = "member_club") public class MemberClub { @Id diff --git a/backend/src/main/java/com/project/capstone/mybook/domain/MyBook.java b/backend/src/main/java/com/project/capstone/mybook/domain/MyBook.java index c0e7a75c66..4a46e39125 100644 --- a/backend/src/main/java/com/project/capstone/mybook/domain/MyBook.java +++ b/backend/src/main/java/com/project/capstone/mybook/domain/MyBook.java @@ -12,6 +12,7 @@ @AllArgsConstructor @NoArgsConstructor @Getter +@Table(name = "my_book") public class MyBook { @Id diff --git a/backend/src/main/java/com/project/capstone/post/domain/Post.java b/backend/src/main/java/com/project/capstone/post/domain/Post.java index fcc0728c27..423e987e61 100644 --- a/backend/src/main/java/com/project/capstone/post/domain/Post.java +++ b/backend/src/main/java/com/project/capstone/post/domain/Post.java @@ -23,6 +23,7 @@ @AllArgsConstructor @NoArgsConstructor @Builder +@Table(name = "post") public class Post { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) diff --git a/backend/src/main/java/com/project/capstone/quiz/domain/Quiz.java b/backend/src/main/java/com/project/capstone/quiz/domain/Quiz.java index 876b649eff..58f2611cd2 100644 --- a/backend/src/main/java/com/project/capstone/quiz/domain/Quiz.java +++ b/backend/src/main/java/com/project/capstone/quiz/domain/Quiz.java @@ -17,6 +17,7 @@ @AllArgsConstructor @NoArgsConstructor @Getter +@Table(name = "quiz") public class Quiz { @Id diff --git a/backend/src/main/resources/data.sql b/backend/src/main/resources/data.sql index d0984d6140..26f5853175 100644 --- a/backend/src/main/resources/data.sql +++ b/backend/src/main/resources/data.sql @@ -1,15 +1,44 @@ insert into member (id, email, name, age, gender, created_at) values (UNHEX(REPLACE("3f06af63-a93c-11e4-9797-00505690773f", "-","")), 'example1@gmail.com', '홍길동1', 17, 'MALE', '2023-05-16 15:48:57.450179'); insert into member (id, email, name, age, gender, created_at) values -(UNHEX(REPLACE("8fbcec61-e527-15ee-bd3d-0242ac120002", "-","")), 'example2@gmail.com', '홍길동2', 17, 'MALE', '2023-05-26 15:48:57.450179'); +(UNHEX(REPLACE("8fbcec61-e527-12ee-bd3d-0242ac120002", "-","")), 'example2@gmail.com', '홍길동2', 17, 'MALE', '2023-05-26 15:48:57.450179'); insert into member (id, email, name, age, gender, created_at) values -(UNHEX(REPLACE("8fbcec62-e527-14ee-bd3d-0242ac120002", "-","")), 'example3@gmail.com', '홍길동3', 17, 'MALE', '2023-05-26 15:48:57.450179'); +(UNHEX(REPLACE("8fbcec62-e527-12ee-bd3d-0242ac120002", "-","")), 'example3@gmail.com', '홍길동3', 17, 'MALE', '2023-05-26 15:48:57.450179'); insert into member (id, email, name, age, gender, created_at) values -(UNHEX(REPLACE("8fbcec63-e527-10ee-bd3d-0242ac120002", "-","")), 'example4@gmail.com', '홍길동4', 17, 'MALE', '2023-05-26 15:48:57.450179'); +(UNHEX(REPLACE("8fbcec63-e527-12ee-bd3d-0242ac120002", "-","")), 'example4@gmail.com', '홍길동4', 17, 'MALE', '2023-05-26 15:48:57.450179'); insert into member (id, email, name, age, gender, created_at) values -(UNHEX(REPLACE("8fbcec64-e527-11ee-bd3d-0242ac120002", "-","")), 'example5@gmail.com', '홍길동5', 17, 'MALE', '2023-05-26 15:48:57.450179'); +(UNHEX(REPLACE("8fbcec64-e527-12ee-bd3d-0242ac120002", "-","")), 'example5@gmail.com', '홍길동5', 17, 'MALE', '2023-05-26 15:48:57.450179'); insert into member (id, email, name, age, gender, created_at) values (UNHEX(REPLACE("8fbcec65-e527-12ee-bd3d-0242ac120002", "-","")), 'example6@gmail.com', '홍길동6', 17, 'MALE', '2023-05-26 15:48:57.450179'); +insert into member (id, email, name, age, gender, created_at) values + (UNHEX(REPLACE("8fbcec66-e527-12ee-bd3d-0242ac120002", "-","")), 'example7@gmail.com', '홍길동7', 17, 'MALE', '2023-05-26 15:48:57.450179'); +insert into member (id, email, name, age, gender, created_at) values + (UNHEX(REPLACE("8fbcec67-e527-12ee-bd3d-0242ac120002", "-","")), 'example8@gmail.com', '홍길동8', 17, 'MALE', '2023-05-26 15:48:57.450179'); +insert into member (id, email, name, age, gender, created_at) values + (UNHEX(REPLACE("8fbcec68-e527-12ee-bd3d-0242ac120002", "-","")), 'example9@gmail.com', '홍길동9', 17, 'MALE', '2023-05-26 15:48:57.450179'); +insert into member (id, email, name, age, gender, created_at) values + (UNHEX(REPLACE("8fbcec69-e527-12ee-bd3d-0242ac120002", "-","")), 'example10@gmail.com', '홍길동10', 17, 'MALE', '2023-05-26 15:48:57.450179'); +insert into member (id, email, name, age, gender, created_at) values + (UNHEX(REPLACE("8fbcec70-e527-12ee-bd3d-0242ac120002", "-","")), 'example11@gmail.com', '홍길동11', 17, 'MALE', '2023-05-26 15:48:57.450179'); +insert into member (id, email, name, age, gender, created_at) values + (UNHEX(REPLACE("8fbcec71-e527-12ee-bd3d-0242ac120002", "-","")), 'example12@gmail.com', '홍길동12', 17, 'MALE', '2023-05-26 15:48:57.450179'); +insert into member (id, email, name, age, gender, created_at) values + (UNHEX(REPLACE("8fbcec72-e527-12ee-bd3d-0242ac120002", "-","")), 'example13@gmail.com', '홍길동13', 17, 'MALE', '2023-05-26 15:48:57.450179'); +insert into member (id, email, name, age, gender, created_at) values + (UNHEX(REPLACE("8fbcec73-e527-12ee-bd3d-0242ac120002", "-","")), 'example14@gmail.com', '홍길동14', 17, 'MALE', '2023-05-26 15:48:57.450179'); +insert into member (id, email, name, age, gender, created_at) values + (UNHEX(REPLACE("8fbcec74-e527-12ee-bd3d-0242ac120002", "-","")), 'example15@gmail.com', '홍길동15', 17, 'MALE', '2023-05-26 15:48:57.450179'); +insert into member (id, email, name, age, gender, created_at) values + (UNHEX(REPLACE("8fbcec75-e527-12ee-bd3d-0242ac120002", "-","")), 'example16@gmail.com', '홍길동16', 17, 'MALE', '2023-05-26 15:48:57.450179'); +insert into member (id, email, name, age, gender, created_at) values + (UNHEX(REPLACE("8fbcec76-e527-12ee-bd3d-0242ac120002", "-","")), 'example17@gmail.com', '홍길동17', 17, 'MALE', '2023-05-26 15:48:57.450179'); +insert into member (id, email, name, age, gender, created_at) values + (UNHEX(REPLACE("8fbcec77-e527-12ee-bd3d-0242ac120002", "-","")), 'example18@gmail.com', '홍길동18', 17, 'MALE', '2023-05-26 15:48:57.450179'); +insert into member (id, email, name, age, gender, created_at) values + (UNHEX(REPLACE("8fbcec78-e527-12ee-bd3d-0242ac120002", "-","")), 'example19@gmail.com', '홍길동19', 17, 'MALE', '2023-05-26 15:48:57.450179'); +insert into member (id, email, name, age, gender, created_at) values + (UNHEX(REPLACE("8fbcec79-e527-12ee-bd3d-0242ac120002", "-","")), 'example20@gmail.com', '홍길동20', 17, 'MALE', '2023-05-26 15:48:57.450179'); + insert into book (id, title, category_1d, category_2d, category_3d, author, publisher, publish_date) values (1, '제목1', '카테고리1', '카테고리2', '카테고리3', '저자1', '출판사1', '2022-04-10'); @@ -24,25 +53,79 @@ insert into book (id, title, category_1d, category_2d, category_3d, author, publ insert into club (id, manager_id, topic, name, created_at, maximum, public_status, password, book_id) values -(1, UNHEX(REPLACE("3f06af63-a93c-11e4-9797-00505690773f", "-","")), '역사', '길동1의 모임', '2023-05-26 15:48:57.450179', 10, 'PUBLIC', null, 1); +(1, UNHEX(REPLACE("3f06af63-a93c-11e4-9797-00505690773f", "-","")), '역사', '길동1의 모임', '2023-05-26 15:48:57.450179', 10, 'PUBLIC', null, null); insert into club (id, manager_id, topic, name, created_at, maximum, public_status, password, book_id) values -(2, UNHEX(REPLACE("8fbcec61-e527-15ee-bd3d-0242ac120002", "-","")), '경제', '길동2의 모임', '2023-05-26 15:48:57.450179', 10, 'PUBLIC', null, null); +(2, UNHEX(REPLACE("8fbcec61-e527-12ee-bd3d-0242ac120002", "-","")), '경제', '길동2의 모임', '2023-05-26 15:48:57.450179', 10, 'PUBLIC', null, null); insert into club (id, manager_id, topic, name, created_at, maximum, public_status, password, book_id) values -(3, UNHEX(REPLACE("8fbcec62-e527-14ee-bd3d-0242ac120002", "-","")), '종교', '길동3의 모임', '2023-05-26 15:48:57.450179', 10, 'PUBLIC', null, 2); +(3, UNHEX(REPLACE("8fbcec62-e527-12ee-bd3d-0242ac120002", "-","")), '종교', '길동3의 모임', '2023-05-26 15:48:57.450179', 10, 'PUBLIC', null, null); insert into club (id, manager_id, topic, name, created_at, maximum, public_status, password, book_id) values -(4, UNHEX(REPLACE("8fbcec63-e527-10ee-bd3d-0242ac120002", "-","")), '사회', '길동4의 모임', '2023-05-26 15:48:57.450179', 10, 'PUBLIC', null, 3); +(4, UNHEX(REPLACE("8fbcec63-e527-12ee-bd3d-0242ac120002", "-","")), '사회', '길동4의 모임', '2023-05-26 15:48:57.450179', 10, 'PUBLIC', null, null); insert into club (id, manager_id, topic, name, created_at, maximum, public_status, password, book_id) values -(5, UNHEX(REPLACE("3f06af63-a93c-11e4-9797-00505690773f", "-","")), '역사', '길동1의 모임', '2023-05-26 15:48:57.450179', 10, 'PUBLIC', null, 1); +(5, UNHEX(REPLACE("3f06af63-a93c-11e4-9797-00505690773f", "-","")), '역사', '길동1의 모임', '2023-05-26 15:48:57.450179', 10, 'PUBLIC', null, null); insert into club (id, manager_id, topic, name, created_at, maximum, public_status, password, book_id) values -(6, UNHEX(REPLACE("8fbcec61-e527-15ee-bd3d-0242ac120002", "-","")), '경제', '길동2의 모임', '2023-05-26 15:48:57.450179', 10, 'PUBLIC', null, null); +(6, UNHEX(REPLACE("8fbcec61-e527-12ee-bd3d-0242ac120002", "-","")), '경제', '길동2의 모임', '2023-05-26 15:48:57.450179', 10, 'PUBLIC', null, null); insert into club (id, manager_id, topic, name, created_at, maximum, public_status, password, book_id) values -(7, UNHEX(REPLACE("8fbcec62-e527-14ee-bd3d-0242ac120002", "-","")), '종교', '길동3의 모임', '2023-05-26 15:48:57.450179', 10, 'PUBLIC', null, 2); +(7, UNHEX(REPLACE("8fbcec62-e527-12ee-bd3d-0242ac120002", "-","")), '종교', '길동3의 모임', '2023-05-26 15:48:57.450179', 10, 'PUBLIC', null, null); insert into club (id, manager_id, topic, name, created_at, maximum, public_status, password, book_id) values -(8, UNHEX(REPLACE("8fbcec63-e527-10ee-bd3d-0242ac120002", "-","")), '사회', '길동4의 모임', '2023-05-26 15:48:57.450179', 10, 'PUBLIC', null, 3); +(8, UNHEX(REPLACE("8fbcec63-e527-12ee-bd3d-0242ac120002", "-","")), '사회', '길동4의 모임', '2023-05-26 15:48:57.450179', 10, 'PUBLIC', null, null); insert into member_club (id, member_id, club_id) values (1, UNHEX(REPLACE("3f06af63-a93c-11e4-9797-00505690773f", "-","")), 1); +insert into member_club (id, member_id, club_id) values + (2, UNHEX(REPLACE("8fbcec61-e527-12ee-bd3d-0242ac120002", "-","")), 2); +insert into member_club (id, member_id, club_id) values + (3, UNHEX(REPLACE("8fbcec62-e527-12ee-bd3d-0242ac120002", "-","")), 3); +insert into member_club (id, member_id, club_id) values + (4, UNHEX(REPLACE("8fbcec63-e527-12ee-bd3d-0242ac120002", "-","")), 4); + +insert into member_club (id, member_id, club_id) values + (5, UNHEX(REPLACE("3f06af63-a93c-11e4-9797-00505690773f", "-","")), 5); +insert into member_club (id, member_id, club_id) values + (6, UNHEX(REPLACE("8fbcec61-e527-12ee-bd3d-0242ac120002", "-","")), 6); +insert into member_club (id, member_id, club_id) values + (7, UNHEX(REPLACE("8fbcec62-e527-12ee-bd3d-0242ac120002", "-","")), 7); +insert into member_club (id, member_id, club_id) values + (8, UNHEX(REPLACE("8fbcec63-e527-12ee-bd3d-0242ac120002", "-","")), 8); + + +insert into member_club (id, member_id, club_id) values + (9, UNHEX(REPLACE("8fbcec64-e527-12ee-bd3d-0242ac120002", "-","")), 1); +insert into member_club (id, member_id, club_id) values + (10, UNHEX(REPLACE("8fbcec65-e527-12ee-bd3d-0242ac120002", "-","")), 1); +insert into member_club (id, member_id, club_id) values + (11, UNHEX(REPLACE("8fbcec66-e527-12ee-bd3d-0242ac120002", "-","")), 1); +insert into member_club (id, member_id, club_id) values + (12, UNHEX(REPLACE("8fbcec67-e527-12ee-bd3d-0242ac120002", "-","")), 1); + +insert into member_club (id, member_id, club_id) values + (13, UNHEX(REPLACE("8fbcec68-e527-12ee-bd3d-0242ac120002", "-","")), 2); +insert into member_club (id, member_id, club_id) values + (14, UNHEX(REPLACE("8fbcec69-e527-12ee-bd3d-0242ac120002", "-","")), 2); +insert into member_club (id, member_id, club_id) values + (15, UNHEX(REPLACE("8fbcec70-e527-12ee-bd3d-0242ac120002", "-","")), 2); +insert into member_club (id, member_id, club_id) values + (16, UNHEX(REPLACE("8fbcec71-e527-12ee-bd3d-0242ac120002", "-","")), 2); + +insert into member_club (id, member_id, club_id) values + (17, UNHEX(REPLACE("8fbcec72-e527-12ee-bd3d-0242ac120002", "-","")), 3); +insert into member_club (id, member_id, club_id) values + (18, UNHEX(REPLACE("8fbcec73-e527-12ee-bd3d-0242ac120002", "-","")), 3); +insert into member_club (id, member_id, club_id) values + (19, UNHEX(REPLACE("8fbcec74-e527-12ee-bd3d-0242ac120002", "-","")), 3); +insert into member_club (id, member_id, club_id) values + (20, UNHEX(REPLACE("8fbcec75-e527-12ee-bd3d-0242ac120002", "-","")), 3); + + +insert into member_club (id, member_id, club_id) values + (21, UNHEX(REPLACE("8fbcec76-e527-12ee-bd3d-0242ac120002", "-","")), 4); +insert into member_club (id, member_id, club_id) values + (22, UNHEX(REPLACE("8fbcec77-e527-12ee-bd3d-0242ac120002", "-","")), 4); +insert into member_club (id, member_id, club_id) values + (23, UNHEX(REPLACE("8fbcec78-e527-12ee-bd3d-0242ac120002", "-","")), 4); +insert into member_club (id, member_id, club_id) values + (24, UNHEX(REPLACE("8fbcec79-e527-12ee-bd3d-0242ac120002", "-","")), 4); + insert into post (id, club_id, member_id, title, body, created_at, is_sticky) values (1, 1, UNHEX(REPLACE("3f06af63-a93c-11e4-9797-00505690773f", "-","")), '게시글 제목 1', '게시글 내용 1', '2023-05-26 15:48:57.450179', true);