<aside> 🍎 염두에 둘 내용
</aside>
type CategoryList = "STUDY" | "PROJECT"; => Post 내에서 type 담당
type CategoryStatus = "READY" | "PROGRESS" | "PROGRESS_END" | "DONE"; => Post 내에서 status 담당
메인페이지
type MainPostInfo = {
postId: number;
type: 'STUDY' | 'PROJECT'; <= CategoryList 타입으로 변경
recruitEndAt: string; // YYYY-MM-DD 23:59:59
isScraped: boolean;
progressWay: string; // 온라인/오프라인
title: string;
position => positions: string[];
stack => stacks: string[];
memberNickname: string;
memberProfileImg: string;
postViews => viewCount: number;
postCommentsNum => commentCount: number;
}
{
result: {
newStudyList: MainPostInfo[]; //4개씩 표시
hotStudyList: MainPostInfo[];
newProjectList: MainPostInfo[];
hotProjectList: MainPostInfo[];
}
}
스터디 목록
스터디 목록
type PostInfo = {
postid: number;
type: 'STUDY' | 'PROJECT'; <= CategoryList 타입으로 변경
recruitEndAt: Date; => string; // YYYY-MM-DD 23:59:59
isScraped: boolean;
progressWay: string; // 온라인/오프라인
title: string;
position => positions: string[];
stack => stacks: string[];
memberNickname: string;
memberProfileImg: string;
postViews => viewCount : number;
postCommentsNum => commentCount: number;
}
{
result: {
postList: PostInfo[];
}
}
나의 스터디
type OnGoingPost= {
postId: number;
type: "STUDY" | "PROJECT"; <= CategoryList 타입으로 변경
status: "READY" | "PROGRESS" | "PROGRESS_END" | "DONE"; <= CategoryStatus 타입으로 변경
recruitEndAt: string; // YYYY-MM-DD 23:59:59
isScraped: boolean;
progressWay: string;
title: string;
position => positions : string[];
stack => stacks : string[];
memberNickname: string;
memberProfileImg: string;
postViews => viewCount : number;
postCommentsNum => commentCount: number;
}
{
result: {
onGoingPostList : OnGoingPost[];
}
}
마이페이지 스크랩 목록
type GetScrapResponse = {
postId: number;
type: "STUDY" | "PROJECT"; <= CategoryList 타입으로 변경
recruitEndAt?: string; // YYYY-MM-DD 23:59:59
isScrapped?: boolean;
progressWay?: string;
title?: string;
position? => positions: string[];
stack? => stacks: string[];
memberNickname?: string;
memberProfileImg?: string;
viewCount?: number;
commentCount?: number;
}
{
result: {
data: GetScrapResponse[];
meta: PageMeta
}
}
스터디 모집 request
body:{
type: 'STUDY' | 'PROJECT'; <= CategoryList 타입으로 변경
recruitEndAt: Date => string; // YYYY-MM-DD 23:59:59
progressPeriod: string => string | null;
capacity: number => number | null;
contactWay: string => string | null; //연락 방법
progressWay:string => string | null; //진행 방식 (온라인 / 오프라인)
stacks: string[];
positions: string[];
link?: string = > string | null; //nullable
title: string = > string | null;
content: string = > string | null;
}
스터디 수정 request
body:{
type: 'STUDY' | 'PROJECT' <= CategoryList 타입으로 변경
recruitEndAt: Date => string; // YYYY-MM-DD 23:59:59
progressPeriod:string => string | null;
capacity: number => number | null;
contactWay: string => string | null; //연락 방법
progressWay: string => string | null; //진행 방식 (온라인 / 오프라인)
stacks: string[];
positions: string[];
link?: string = > string | null; //nullable
title: string = > string | null;
content: string = > string | null;
}
스터디 상세
result: {
type: 'STUDY' | 'PROJECT'; <= CategoryList 타입으로 변경 //스터디 종류
recruitEndAt: Date; => string; // 모집 마감
isScraped : boolean; //스크랩 되어있는지 아닌지
progressPeriod: ; //진행 기간 => enum 타입으로 넣을 예정
capacity: number; ****//모집 인원 ==> 테이블에 추가 예정
contactWay: string; //연락 방법
progressWay: string; //진행 방법 (온라인/오프라인)
stacks: string[]; //스택
positions: string[]; //포지션
link: string; //연락 방법 링크
postTitle: string; //제목
postContent: string; //내용
userNickname => memberNickname : string; //작성자 닉네임
userProfileImg => memberProfileImg: string; //작성자 프로필이미지
viewCount: number; //조회수
commentCount: number; //댓글 수
scrapCount: number; //스크랩수
createdAt: string; //생성 시간 YYYY-MM-DD HH:MM:SS
postApplyStatus: PostApplyStatus;
}
(답변 부탁드려요!)
<aside> ❓ 각 옵션을 아예 선택안하면 어떤식으로 응답이 오나요?
</aside>
null로 오는지 빈 string 배열으로오는지✔️ 일단 배열 타입은 빈 배열으로 처리했습니다.
<aside>
❓ progressPeriod에서 enum 타입으로 넣을 예정이라 하셨는데, 정의가 되었나요?
</aside>
✔️ ENUM타입으로 딱히 정하진 않을 것 같고, 프론트에서 정해주고 바로 DB에 넣는 방식으로 진행할 것 같습니다!
<aside>
❓ recruitEndAt에서 시간을 23:59:59로 보내려하는데 괜찮으신가요?
</aside>
✔️ 상관 없습니다!
<aside>
❓ memberId 를 userId로 변경하는 것에 대해 어떻게 생각하시나요?
TeamMemberId와 memberId가 조금 헷갈려서 명칭에 대해 명확하게 구분하고 넘어가면 어떨까하여 제안 드립니다.
</aside>
✔️ 어려울 것 같습니다. 바꾸면 아마 teamUserId와 userId가 될 겁니다.
type PageMeta = {
page: number;
take: number; // 가져올 갯수
totalCount: number; // 전체 갯수
pageCount: number: // 페이지 갯수
hasPreviousPage: boolean; // 이전 페이지가 있는지
hasNextPage: boolean: // 다음 페이지가 있는지
}
유저 정보 요약
{
result: {
nickname: string;
profileImageUrl: string;
}
}
댓글
type CommentInfo: {
commentId: number;
commentProfileImg: string;
commentNickname: string;
commentCreatedAt: string;
commentContent: string;
isMine: boolean; //자신이 쓴 댓글인지 판단
}
{
result: {
data: commentInfo[]; //댓글 정보
meta: PageMeta;
}
}
마이 페이지 유저 정보
{
result: {
nickname: string;
profileImageUrl: string;
position: string;
career: number;
introduce: string;
stack => stacks: string[];
link: string;
=> gauge?: number;
}
}
마이 페이지 유저 정보 수정
{
cookie: {
connect.sid: string;
},
body: {
nickname: string;
profileImageUrl: string;
position: string;
career: number;
introduce: string;
stack => stacks: string[];
link: string;
=> gauge?: number;
}
}