Comments & Updated caching

This commit is contained in:
2024-05-10 09:44:20 +03:00
parent 9983720bd1
commit 2781724f8f
11 changed files with 244 additions and 84 deletions
+17 -3
View File
@@ -1,9 +1,9 @@
export type Result<T> = {[id: number]: T};
export type Result<T> = Map<number, T>;
export type User = {
id: number,
name: string,
join_date: Date
joinDate: Date
};
export type Rating = {
@@ -22,6 +22,20 @@ export type Post = {
name: string,
category: Category,
content: string,
post_date: Date,
postDate: Date,
rating: Rating
};
export type Comment = {
id: number,
author: User | null,
content: string,
commentDate: Date,
rating: Rating,
parentCommentId: number
};
export type CommentTreeNode = {
parent: Comment,
children: (CommentTreeNode | number)[]
};