User
Channel
Post
Like
Comment
Notification
Follow
Conversation (DM 목록)
Message (개별 DM방 채팅 목록)
{ "coverImage": String, // 커버 이미지 "image": String, // 프로필 이미지 "role": String, "emailVerified": Boolean, // 사용되지 않음 "banned": Boolean, // 사용되지 않음 "isOnline": Boolean, "posts": Post[], "likes": Like[], "comments": String[], "followers": [], "following": [ { "_id": "6169e91316cb2265df003c6d", "user": "6169e58216cb2265df003bf4", "follower": "6169e206aa57d952c6dc1edd", "createdAt": "2021-10-15T20:48:19.816Z", "updatedAt": "2021-10-15T20:48:19.816Z", "__v": 0 } ], "notifications": Notification[], "messages": Message[], "_id": String, "fullName": String, "email": String, "createdAt": String, "updatedAt": String }
{ "authRequired": Boolean, // 사용되지 않음 "posts": String[], "_id": String, "name": String, "description": String, "createdAt": String, "updatedAt": String }
{ "likes": Like[], "comments": Comment[], "_id": String, "image": Optional<String>, "imagePublicId": Optional<String>, "title": { type: 'review' | 'common' | 'mogak' | 'spot' title: string, // type별로 body 내부 속성이 바뀜 (Schema 바뀜) // 먼저 조건문으로 type검사를 해야 함 workingSpot: 'cafe' | 'home' | 'etc', // 일반 body: { text: string, }, // 모각코 body: { location: string, text: string, startTime: string, endTime: string, date: string, maxCount: number, }, // 리뷰 body: { text: string, location: string, form: { plugs?: number; crowded?: { day: number, // 요일은 일 ~ 토 : 0 ~ 6 value: number, }, quiet?: number, comfortable?: number, bathroom?: number, } }, // 스팟 body: { spot: 'cafe' | 'home' | 'etc', } }, "channel": Channel, "author": User, "createdAt": String, "updatedAt": String }
{ "_id": String, "user": String, // 사용자 id "post": String, // 포스트 id "createdAt": String, "updatedAt": String }
{ "_id": String, "comment": String, // "author": User, "post": String, // 포스트 id "createdAt": String, "updatedAt": String }
{ "seen": Boolean, "_id": String, "author": User, "user": User | String, "post": Nullable<String>, // 포스트 id "follow": Optional<String>, // 사용자 id "comment": Optional<Comment>, "message": Optional<String>, // 메시지 id "createdAt": String, "updatedAt": String }
{ "_id": String, "user": String, // 사용자 id "follower": String, // 사용자 id "createdAt": String, "updatedAt": String }
{ "_id": String[], "message": String, "sender": User, "receiver": User, "seen": Boolean, "createdAt": String }
{ "_id": String, "message": String, "sender": User, "receiver": User, "seen": Boolean, "createdAt": String, "updatedAt": String }