This commit is contained in:
Janis
2023-01-29 20:01:56 +01:00
parent d3e5295832
commit bc29de3255
119 changed files with 26881 additions and 0 deletions

40
types/api.ts Normal file
View File

@@ -0,0 +1,40 @@
import { IContentTableEntry } from "./contentTable";
import { Prisma } from '@prisma/client';
export interface CreateArticle {
title: string;
markdown: string;
introduction: string;
categoryId: number;
contentTable: Prisma.JsonArray
imageId?: number;
}
export interface UpdateArticle {
id: string;
title?: string;
markdown?: string;
introduction?: string;
categoryId?: number;
contentTable?: Prisma.JsonArray
imageId?: number;
}
export interface CreateCategory {
title: string;
svg: {
path: string;
viewbox: string;
}
color: string;
}
export interface UpdateCategory {
id: string;
title?: string;
svg?: {
path?: string;
viewbox?: string;
}
color?: string;
}