diff --git a/src/app/matching/_components/ClientMatching.tsx b/src/app/matching/_components/ClientMatching.tsx index 94c729b..39ab603 100644 --- a/src/app/matching/_components/ClientMatching.tsx +++ b/src/app/matching/_components/ClientMatching.tsx @@ -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 = { diff --git a/typings/boardType.ts b/typings/boardType.ts new file mode 100644 index 0000000..9cfed3d --- /dev/null +++ b/typings/boardType.ts @@ -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[]; +} + +//좋아요 등도 타입으로따로지정가능 diff --git a/typings/bookmarkType.ts b/typings/bookmarkType.ts new file mode 100644 index 0000000..fe961e5 --- /dev/null +++ b/typings/bookmarkType.ts @@ -0,0 +1,7 @@ +import { MongoCommon } from './mongodb'; + +export interface IBookmark extends MongoCommon { + targetId: string; + checked: boolean; + userId: string; +} diff --git a/typings/mongodb.ts b/typings/mongodb.ts new file mode 100644 index 0000000..92aa406 --- /dev/null +++ b/typings/mongodb.ts @@ -0,0 +1,6 @@ +export interface MongoCommon { + _id: string; + createdAt?: string; + updatedAt?: string; + __v: number; +} diff --git a/typings/studyType.ts b/typings/studyType.ts new file mode 100644 index 0000000..0efb9f2 --- /dev/null +++ b/typings/studyType.ts @@ -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; +} diff --git a/typings/user.ts b/typings/user.ts new file mode 100644 index 0000000..bfaa8fb --- /dev/null +++ b/typings/user.ts @@ -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 보다 조금더 좁은 타입으로 좁힐수있을것같다.