27 lines
437 B
TypeScript
27 lines
437 B
TypeScript
export interface ICategory {
|
|
id: number;
|
|
title: string;
|
|
}
|
|
|
|
export type IStatus = "published" | "draft" | "rejected";
|
|
|
|
export interface IPost {
|
|
id: number;
|
|
title: string;
|
|
content: string;
|
|
status: IStatus;
|
|
category: ICategory;
|
|
}
|
|
|
|
export type IType = "published" | "draft" | "rejected";
|
|
|
|
export interface IAccount {
|
|
id: number;
|
|
name: string;
|
|
type: IType;
|
|
}
|
|
|
|
export type Nullable<T> = {
|
|
[P in keyof T]: T[P] | null;
|
|
};
|