Working data and basic demo pages
This commit is contained in:
+13
-7
@@ -1,21 +1,27 @@
|
||||
export type Result<T> = {[id: number]: T};
|
||||
|
||||
export type User = {
|
||||
name: string
|
||||
id: number,
|
||||
name: string,
|
||||
join_date: Date
|
||||
};
|
||||
|
||||
export type Rating = {
|
||||
likes: number,
|
||||
dislikes: number
|
||||
likes: BigInt,
|
||||
dislikes: BigInt
|
||||
}
|
||||
|
||||
export type Category = {
|
||||
id: number,
|
||||
name: string
|
||||
}
|
||||
|
||||
export type Post = {
|
||||
// author: User,
|
||||
id: number,
|
||||
author: User | null,
|
||||
name: string,
|
||||
// category: Category,
|
||||
category: Category,
|
||||
content: string,
|
||||
// post_date: Date,
|
||||
// rating: Rating
|
||||
post_date: Date,
|
||||
rating: Rating
|
||||
};
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
export type Error = {
|
||||
error: boolean,
|
||||
msg: string
|
||||
};
|
||||
Reference in New Issue
Block a user