HomeAboutMeBlogGuest
© 2025 Sejin Cha. All rights reserved.
Built with Next.js, deployed on Vercel
♥️
2기 최종 프로젝트 팀별 공간
/
📚
[팀06] Books
/
🔗
데이터 타입
🔗

데이터 타입

Created
Aug 8, 2022 06:56 AM
Tags
Tags 2
  • property? 는 생략 가능한 property라는 뜻
 
Book { id?: number, createdAt?: string, image: string, // 책 이미지 url title: string, author: string, publisher: string, pubdate: string, isbn: string, description: string, }
notion image
request, response 둘 다 위와 같은 데이터 ( 필드이름..등등) 이면 좋을 것 같다
Book 은 thumbnailUrl 이 아니라 “image”
  • request , createdAt → response 때만 존재하는 필드

스터디

Study { id: string, name: string, thumbnail: string, // 스터디 썸네일 url currentParticipant: number, maxParticipant: number, gatherStartDate: string, // 'YYYY/MM/DD' gatherEndDate: string, studyStartDate: string, studyEndDate: string, } StudyDetail { study: Study, // Study 객체 통째로 members: User[], // User 객체를 배열에 담앙서 book: Book, // Book 객체 통째로 description: string, status: string // 'recruiting' || 'inProgress' || 'finished' }
notion image
notion image
 
아직 status 계산 로직이 구현되지 않았다면, 디폴트값 넣어서 보내주셔도 됩니다.
 

유저

User { id: string, name: string, email: string, image: string, // 유저 프로필 이미지 url temperature: number }
notion image
 

게시글

Post { id: number, title: string, content: string, category: string, // ? | ? | ? studyId: number, writer: string, writerImage: string, // writer profiel image url commentCount: number, createdAt: string, updatedAt: string, }
 

댓글

Comment { id: number, userId: number, postId: number, content: string, createdAt: string, updatedAt: string, }
 
 

열거형

@@@@@게시글 카테고리@@@@@ NOTICE GENERAL
@@@@@스터디 상태@@@@@ recruiting recruitingFinished inProgress finished
@@@@@스터디멤버 상태 @@@@@ ACCEPTED DENIED OWNED