From 4545c953c30d3d2aa3193f17119ee5308936ef52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aron=20Sch=C3=BCler?= Date: Fri, 26 Jan 2024 15:57:54 +0100 Subject: [PATCH] fix: correct types of firestore --- src/types.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/types.ts b/src/types.ts index e91b295..b7add34 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,12 +1,12 @@ // User Type -export interface UserType { +export type User = { userId: string; username: string; email: string; password: string; // hashed profilePicture?: string; bio?: string; -} +}; // Project Type export type Project = { @@ -18,23 +18,23 @@ export type Project = { images: string[]; // store links or references textContent: string; upvotesCount: number; - comments: CommentType[]; + comments: Comment[]; createdAt: Date; updatedAt?: Date; }; // Comment Type -export interface CommentType { +export type Comment = { commentId: string; userId: string; // author's user ID projectId: string; // associated project ID textContent: string; timestamp: Date; -} +}; // Database Collections export interface DatabaseCollections { - users: Record; - projects: Record; - comments: Record; + users: Record; + projects: Record; + comments: Record; }