2022-08-06 20:39:52 +00:00
|
|
|
import type { JSONContent } from '@tiptap/core'
|
|
|
|
|
2022-01-10 21:07:57 +00:00
|
|
|
// Currently, comments are created after the bet, not atomically with the bet.
|
|
|
|
// They're uniquely identified by the pair contractId/betId.
|
|
|
|
export type Comment = {
|
2022-02-04 03:04:56 +00:00
|
|
|
id: string
|
2022-06-22 16:35:50 +00:00
|
|
|
contractId?: string
|
|
|
|
groupId?: string
|
2022-04-21 17:09:06 +00:00
|
|
|
betId?: string
|
2022-05-03 20:38:40 +00:00
|
|
|
answerOutcome?: string
|
2022-05-11 21:11:46 +00:00
|
|
|
replyToCommentId?: string
|
2022-02-04 03:04:56 +00:00
|
|
|
userId: string
|
|
|
|
|
2022-08-06 20:39:52 +00:00
|
|
|
/** @deprecated - content now stored as JSON in content*/
|
|
|
|
text?: string
|
|
|
|
content: JSONContent
|
2022-01-10 23:52:03 +00:00
|
|
|
createdTime: number
|
2022-02-04 03:04:56 +00:00
|
|
|
|
2022-01-10 21:07:57 +00:00
|
|
|
// Denormalized, for rendering comments
|
2022-03-14 20:29:32 +00:00
|
|
|
userName: string
|
|
|
|
userUsername: string
|
2022-05-06 18:29:15 +00:00
|
|
|
userAvatarUrl?: string
|
2022-01-10 23:52:03 +00:00
|
|
|
}
|