reactredux/webapi/ClientApp/src/models/index.ts

109 lines
1.7 KiB
TypeScript

import { PersonModel, PostItemModel } from "./abstractions"
export interface PaginationModel<T> {
totalPages: number,
currentPage: number,
items: T []
}
export interface AuthorModel extends PersonModel {
nickName: string
}
export interface BlogItemModel extends PostItemModel {
readTime?: number,
likes?: number
}
export interface CategoryModel {
id: string,
text: string
}
export interface CommentModel {
author: AuthorModel,
comment: string,
responses?: CommentModel []
}
export interface FeatureModel {
icon: string,
title: string,
text: string
}
export interface FormItemModel {
title?: string,
optional?: string,
placeHolder?: string,
}
export interface ImageModel {
src: string,
alt: string
}
export interface LinkModel {
target: string,
anchorText: string
}
export interface LocalizationModel {
timeZone: string,
locale: string,
dateFormat: string,
timeFormat: string,
currency: string,
currencySymbol: string
}
export interface MenuItemModel {
icon?: string,
title?: string,
target?: string
childItems?: MenuItemModel []
}
export interface ReviewerModel extends PersonModel {
fullName: string,
position: string
}
export interface RouteModel {
target: string
component?: string
childRoutes?: RouteModel []
}
export interface ShopItemModel extends PostItemModel {
images?: ImageModel [],
sku: string,
brandName: string,
rating?: number,
price: number,
newPrice?: number,
quantity?: number
}
export interface TestimonialModel {
text: string,
reviewer: ReviewerModel
}
export interface HeaderLink {
[key: string]: string
}
export interface Meta {
[key: string]: string
}
export interface HeaderModel {
title: string,
link: HeaderLink,
meta: Meta
}