Skip to content

Commit

Permalink
✨ feat: workspace related type definition #17
Browse files Browse the repository at this point in the history
  • Loading branch information
yondo123 committed Jun 13, 2023
1 parent b5691cc commit 78f9366
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions src/workspace/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import type { DocumentReference } from 'firebase/firestore';
import type { UserProfile } from '@auth/types';
import type { ChallengeFormStates } from '@challenge/types';

type PostCommentRef = {
post: DocumentReference;
comments: DocumentReference;
};

export interface Turns {
turns?: PostCommentRef[];
turn1?: PostCommentRef[];
turn2?: PostCommentRef[];
turn3?: PostCommentRef[];
turn4?: PostCommentRef[];
turn5?: PostCommentRef[];
[turn: string]: PostCommentRef[] | undefined;
}

export interface Workspace {
challenge: DocumentReference;
notice: string;
}

export interface WorkspaceChallenge extends ChallengeFormStates {
members: DocumentReference[];
}

export interface WorkpspaceStates {
members: UserProfile[];
challengeInfo: WorkspaceChallenge;
}

0 comments on commit 78f9366

Please sign in to comment.