74 lines
1.2 KiB
TypeScript
74 lines
1.2 KiB
TypeScript
export interface IImageModel {
|
|
src: string,
|
|
alt: string
|
|
}
|
|
|
|
export interface IAuthorModel {
|
|
id: string,
|
|
image?: IImageModel,
|
|
nickName: string
|
|
}
|
|
|
|
|
|
interface IPostItemModel {
|
|
id: string,
|
|
slug: string,
|
|
badge?: string,
|
|
image?: IImageModel,
|
|
title: string,
|
|
shortText: string,
|
|
text: string,
|
|
author: IAuthorModel,
|
|
created: string,
|
|
tags: string[]
|
|
}
|
|
|
|
export interface IBlogItemModel extends IPostItemModel {
|
|
readTime?: number,
|
|
likes?: number
|
|
}
|
|
|
|
export interface IShopItemModel extends IPostItemModel {
|
|
images?: IImageModel [],
|
|
sku: string,
|
|
rating?: number,
|
|
price: number,
|
|
newPrice?: number,
|
|
quantity?: number
|
|
}
|
|
|
|
|
|
interface IPostPaginationModel {
|
|
currentPage: number,
|
|
totalPages: number
|
|
}
|
|
|
|
export interface IBlogItemsPaginationModel extends IPostPaginationModel {
|
|
items: IBlogItemModel []
|
|
}
|
|
|
|
export interface IShopItemsPaginationModel extends IPostPaginationModel {
|
|
items: IShopItemModel []
|
|
}
|
|
|
|
export interface ICategoryModel {
|
|
id: string,
|
|
text: string
|
|
}
|
|
|
|
export interface IRouteModel {
|
|
target: string
|
|
component?: string
|
|
childRoutes?: IRouteModel []
|
|
}
|
|
|
|
export interface IMenuItemModel {
|
|
icon?: string,
|
|
title?: string,
|
|
target?: string
|
|
childItems?: IMenuItemModel []
|
|
}
|
|
|
|
export interface IPageModel {
|
|
id: string
|
|
} |