Comments & Updated caching
This commit is contained in:
+17
-3
@@ -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)[]
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user