fireship.io
fireship.io copied to clipboard
courses/react-next-firebase/ssr-data-model/
Data Model
How to model data relationships between users, posts, and hearts
https://fireship.io/courses/react-next-firebase/ssr-data-model/
For TypeScript:
type Post = {
title: string;
slug: string;
uid: string;
username: string;
published: boolean;
content: string;
createdAt: Timestamp | number;
heartCount: number;
updatedAt: Timestamp | number;
}