2022-08-29 15:06:17 +00:00
|
|
|
import { JSONContent } from '@tiptap/core'
|
|
|
|
|
|
|
|
export type Post = {
|
|
|
|
id: string
|
|
|
|
title: string
|
2022-10-05 10:37:23 +00:00
|
|
|
subtitle: string
|
2022-08-29 15:06:17 +00:00
|
|
|
content: JSONContent
|
|
|
|
creatorId: string // User id
|
|
|
|
createdTime: number
|
|
|
|
slug: string
|
2022-10-12 15:42:28 +00:00
|
|
|
|
|
|
|
// denormalized user fields
|
|
|
|
creatorName: string
|
|
|
|
creatorUsername: string
|
2022-10-12 16:31:00 +00:00
|
|
|
creatorAvatarUrl?: string
|
2022-10-14 12:05:07 +00:00
|
|
|
|
|
|
|
likedByUserIds?: string[]
|
|
|
|
likedByUserCount?: number
|
2022-08-29 15:06:17 +00:00
|
|
|
}
|
|
|
|
|
2022-09-27 22:30:07 +00:00
|
|
|
export type DateDoc = Post & {
|
|
|
|
bounty: number
|
|
|
|
birthday: number
|
|
|
|
type: 'date-doc'
|
|
|
|
contractSlug: string
|
|
|
|
}
|
|
|
|
|
2022-08-29 15:06:17 +00:00
|
|
|
export const MAX_POST_TITLE_LENGTH = 480
|
2022-10-05 10:37:23 +00:00
|
|
|
export const MAX_POST_SUBTITLE_LENGTH = 480
|