Files
core/packages/api-client/models/comment.ts
Innei 26b2b4f134 feat: reader for comment and like action (#2122)
* init

Signed-off-by: Innei <i@innei.in>

* update

Signed-off-by: Innei <i@innei.in>

* feat: reader like activity

Signed-off-by: Innei <i@innei.in>

* feat: add comment

Signed-off-by: Innei <i@innei.in>

* feat: comment reader

Signed-off-by: Innei <i@innei.in>

---------

Signed-off-by: Innei <i@innei.in>
2024-09-14 20:26:18 +08:00

45 lines
788 B
TypeScript

import type { BaseModel } from './base'
import type { CategoryModel } from './category'
import { CollectionRefTypes } from '@core/constants/db.constant'
export { CollectionRefTypes }
export interface CommentModel extends BaseModel {
refType: CollectionRefTypes
ref: string
state: number
commentsIndex: number
author: string
text: string
mail?: string
url?: string
ip?: string
agent?: string
key: string
pin?: boolean
avatar: string
parent?: CommentModel | string
children: CommentModel[]
isWhispers?: boolean
location?: string
source?: string
readerId?: string
}
export interface CommentRef {
id: string
categoryId?: string
slug: string
title: string
category?: CategoryModel
}
export enum CommentState {
Unread,
Read,
Junk,
}