Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/app/matching/_components/ClientMatching.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import Mood from './Mood';
import Region from './Region';
import Type from './Type';
import { Tmatching, Tsession } from '@/types/TSession';
import Link from 'next/link';
import { useRouter } from 'next/navigation';

export type TClientMatchingProps = {
Expand Down
34 changes: 34 additions & 0 deletions typings/boardType.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import { MongoCommon } from './mongodb';

export type TBoardIcon = 'check' | 'heart' | 'good' | 'smile' | 'clap' | 'sad';

export interface IBlackBoard extends MongoCommon {
studyId: string;
writerId: string;
type: string;
title: string;
content: string;
image: string;
views: number;
icons: string[];
}

export interface IComments extends MongoCommon {
commentWriteId: string;
commentContent: string;
studyId: string;
}

export interface IBoardIcons extends MongoCommon {
iconName: TBoardIcon;
blackboardId: string;
}

export interface IBlackBoardComments extends MongoCommon {
blackboardId: string;
userId: string;
comment: string;
likes: string[];
}

//좋아요 등도 타입으로따로지정가능
7 changes: 7 additions & 0 deletions typings/bookmarkType.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { MongoCommon } from './mongodb';

export interface IBookmark extends MongoCommon {
targetId: string;
checked: boolean;
userId: string;
}
6 changes: 6 additions & 0 deletions typings/mongodb.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export interface MongoCommon {
_id: string;
createdAt?: string;
updatedAt?: string;
__v: number;
}
66 changes: 66 additions & 0 deletions typings/studyType.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
import { MongoCommon } from './mongodb';
import { Interest, Mood, StudyType } from './user';

export interface IStudyInfo extends MongoCommon {
leaderId: string;
studyImage: string;
studyName: string;
studyContent: string;
studyType: StudyType;
studyLevel: string;
studyMember: number;
studyJoinMember: number;
studyLecture: string;
studyCategory: Interest | '기타';
studyViews: number;
studyDeadline: string;
studyStart: string;
studyEnd: string;
studyPlace: string;
studyMeetings: string;
studyMood: Mood[];
}

//스터디수준 조금더 구체화 (스터디 작성폼만들기)
//studyLevel 이 user.ts 에 Level type 에서 재사용이 불가능
//why ? '신입(1~3년)' vs '신입'

export interface IStudyForm extends MongoCommon {
studyId: string;
userId: string;
studyFormTitle: string;
studyFormContent: string;
studyFormRead: boolean;
studyFormSure: boolean;
}

export interface IStudyMember extends MongoCommon {
studyId: string;
userId: string;
attendance: string[];
studyProgress: number;
}

export interface IStudyReview extends MongoCommon {
studyId: string;
userId: string;
studyReviewScore: number;
studyReviewContent: string;
evaluateduser: string;
}

export interface IStudySchedules extends MongoCommon {
title: string;
place: string;
date: string;
time: string;
studyId: string;
}

export interface IStudyTodo extends MongoCommon {
studyId: string;
userId: string;
todoContent: string;
todoCompleted: boolean;
date: string;
}
48 changes: 48 additions & 0 deletions typings/user.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import { MongoCommon } from './mongodb';
export type Interest =
| '디자인'
| '개발 테크'
| '마케팅'
| '비즈니스'
| '경제'
| '외국어'
| '자격증'
| '자기계발';
export type Level = '비기너' | '신입' | '주니어' | '시니어';
export type StudyType = '온라인' | '오프라인' | '상관없음';
export type Mood =
| '친근한'
| '전문적인'
| '진지한'
| '체계적인'
| '열정적인'
| '책임감있는'
| '학습중심적'
| '협력적인'
| '자기주도적'
| '자유로운';

export interface IUser extends MongoCommon {
name: string;
email: string;
nickname: string;
image: string;
matchingInfo?: string;
sturingPercent: number;
studyCount: number;
authProviderId: string;
}

export interface IMatching extends MongoCommon {
userid: string;
interest: Interest[];
level: {
[key in Interest]: Level;
};
studyType: StudyType;
preferRegion: string[];
preferMood: Mood[];
matchingInfo: string;
}

//level 과 preferRegion,Mood 같은경우는 string 보다 조금더 좁은 타입으로 좁힐수있을것같다.