chore: 删除Strapi类型标注
This commit is contained in:
@ -1,53 +0,0 @@
|
|||||||
export interface StrapiEntity {
|
|
||||||
id: number;
|
|
||||||
documentId: string;
|
|
||||||
createdAt: string;
|
|
||||||
updatedAt: string;
|
|
||||||
publishedAt: string;
|
|
||||||
locale: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface StrapiMedia {
|
|
||||||
id: number;
|
|
||||||
url: string;
|
|
||||||
ext: string;
|
|
||||||
name: string;
|
|
||||||
size: number;
|
|
||||||
alternativeText: string;
|
|
||||||
caption: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface StrapiImageFormat {
|
|
||||||
url: string;
|
|
||||||
width: number;
|
|
||||||
height: number;
|
|
||||||
size: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface StrapiImage extends StrapiMedia {
|
|
||||||
width: number;
|
|
||||||
height: number;
|
|
||||||
formats: {
|
|
||||||
small: StrapiImageFormat;
|
|
||||||
medium: StrapiImageFormat;
|
|
||||||
thumbnail: StrapiImageFormat;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface StrapiResponse<T> {
|
|
||||||
data: T;
|
|
||||||
meta: {
|
|
||||||
pagination: {
|
|
||||||
page: number;
|
|
||||||
pageSize: number;
|
|
||||||
pageCount: number;
|
|
||||||
total: number;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export type StrapiRelation<T, K extends keyof T = never> = Omit<
|
|
||||||
T,
|
|
||||||
K | keyof StrapiEntity
|
|
||||||
> &
|
|
||||||
StrapiEntity;
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
export * from './common';
|
|
||||||
export * from './production';
|
|
||||||
export * from './singleTypes';
|
|
||||||
export * from './solution';
|
|
||||||
export * from './question';
|
|
||||||
@ -1,41 +0,0 @@
|
|||||||
import type {
|
|
||||||
StrapiEntity,
|
|
||||||
StrapiImage,
|
|
||||||
StrapiMedia,
|
|
||||||
StrapiRelation,
|
|
||||||
} from './common';
|
|
||||||
|
|
||||||
export interface ProductionType extends StrapiEntity {
|
|
||||||
type: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ProductionSpecItem {
|
|
||||||
label: string;
|
|
||||||
value: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ProductionSpecGroup {
|
|
||||||
title: string;
|
|
||||||
items: ProductionSpecItem[];
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface Production extends StrapiEntity {
|
|
||||||
title: string;
|
|
||||||
summary: string;
|
|
||||||
production_type: ProductionType;
|
|
||||||
cover: StrapiImage;
|
|
||||||
production_images: StrapiImage[];
|
|
||||||
production_details: string;
|
|
||||||
production_specs: ProductionSpecGroup[];
|
|
||||||
production_documents: StrapiRelation<
|
|
||||||
ProductionDocument,
|
|
||||||
'related_productions'
|
|
||||||
>[];
|
|
||||||
questions: StrapiRelation<Question, 'related_productions'>[];
|
|
||||||
show_in_production_list: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ProductionDocument extends StrapiEntity {
|
|
||||||
document: StrapiMedia;
|
|
||||||
related_productions: StrapiRelation<Production, 'production_documents'>[];
|
|
||||||
}
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
export interface Question extends StrapiEntity {
|
|
||||||
title: string;
|
|
||||||
content: string;
|
|
||||||
related_productions: StrapiRelation<Production, 'questions'>[];
|
|
||||||
}
|
|
||||||
@ -1,13 +0,0 @@
|
|||||||
export interface StrapiCompanyProfile extends StrapiEntity {
|
|
||||||
content: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface StrapiContactInfo extends StrapiEntity {
|
|
||||||
content: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface StrapiHomepage extends StrapiEntity {
|
|
||||||
carousel: StrapiImage[];
|
|
||||||
recommend_productions: StrapiRelation<Production>[];
|
|
||||||
recommend_solutions: StrapiRelation<Solution>[];
|
|
||||||
}
|
|
||||||
@ -1,13 +0,0 @@
|
|||||||
import type { StrapiEntity, StrapiImage } from './common';
|
|
||||||
|
|
||||||
export interface SolutionType extends StrapiEntity {
|
|
||||||
type: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface Solution extends StrapiEntity {
|
|
||||||
title: string;
|
|
||||||
summary: string;
|
|
||||||
cover: StrapiImage;
|
|
||||||
solution_type: SolutionType;
|
|
||||||
content: string;
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user