fireship.io icon indicating copy to clipboard operation
fireship.io copied to clipboard

courses/react-next-firebase/ssr-data-model/

Open utterances-bot opened this issue 2 years ago • 1 comments

Data Model

How to model data relationships between users, posts, and hearts

https://fireship.io/courses/react-next-firebase/ssr-data-model/

utterances-bot avatar Sep 20 '22 03:09 utterances-bot

For TypeScript:

type Post = {
  title: string;
  slug: string;
  uid: string;
  username: string;
  published: boolean;
  content: string;
  createdAt: Timestamp | number;
  heartCount: number;
  updatedAt: Timestamp | number;
}

dylhack avatar Sep 20 '22 03:09 dylhack