Almost finish implementing client side
This commit is contained in:
7
Client/app/types/PaginatedResponse.tsx
Normal file
7
Client/app/types/PaginatedResponse.tsx
Normal file
@@ -0,0 +1,7 @@
|
||||
export type PaginatedResponse<T> = {
|
||||
items: T[];
|
||||
pageSize: number;
|
||||
totalPages: number;
|
||||
totalCount: number;
|
||||
currentPage: number;
|
||||
}
|
||||
7
Client/app/types/comment.tsx
Normal file
7
Client/app/types/comment.tsx
Normal file
@@ -0,0 +1,7 @@
|
||||
import type { SlimUser } from "./user"
|
||||
|
||||
export type Comment = {
|
||||
id: number
|
||||
text: string
|
||||
author: SlimUser
|
||||
}
|
||||
12
Client/app/types/post.tsx
Normal file
12
Client/app/types/post.tsx
Normal file
@@ -0,0 +1,12 @@
|
||||
import type { Tag } from "./tag"
|
||||
import type { SlimUser } from "./user"
|
||||
|
||||
export type Post = {
|
||||
id: number
|
||||
title: string
|
||||
description: string
|
||||
author: SlimUser
|
||||
fileUrl: string
|
||||
tags: Tag[]
|
||||
createdAt: string
|
||||
}
|
||||
9
Client/app/types/tag.tsx
Normal file
9
Client/app/types/tag.tsx
Normal file
@@ -0,0 +1,9 @@
|
||||
export enum TagType {
|
||||
General = "General",
|
||||
Copyright = "Copyright"
|
||||
}
|
||||
|
||||
export type Tag = {
|
||||
name: string
|
||||
type: TagType
|
||||
}
|
||||
4
Client/app/types/user.tsx
Normal file
4
Client/app/types/user.tsx
Normal file
@@ -0,0 +1,4 @@
|
||||
export type SlimUser = {
|
||||
userId: string
|
||||
userName: string
|
||||
}
|
||||
Reference in New Issue
Block a user