style: 调整代码格式
- 根据ESLint文件规范格式化app文件夹中的代码
This commit is contained in:
@ -1,49 +1,53 @@
|
||||
export interface StrapiEntity {
|
||||
id: number;
|
||||
documentId: string;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
publishedAt: string;
|
||||
locale: string;
|
||||
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;
|
||||
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;
|
||||
url: string;
|
||||
width: number;
|
||||
height: number;
|
||||
size: number;
|
||||
}
|
||||
|
||||
export interface StrapiImage extends StrapiMedia {
|
||||
width: number;
|
||||
height: number;
|
||||
formats: {
|
||||
small: StrapiImageFormat;
|
||||
medium: StrapiImageFormat;
|
||||
thumbnail: StrapiImageFormat;
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
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;
|
||||
export type StrapiRelation<T, K extends keyof T = never> = Omit<
|
||||
T,
|
||||
K | keyof StrapiEntity
|
||||
> &
|
||||
StrapiEntity;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
export * from './common';
|
||||
export * from './production';
|
||||
export * from './singleTypes';
|
||||
export * from './solution';
|
||||
export * from './question';
|
||||
export * from "./common";
|
||||
export * from "./production";
|
||||
export * from "./singleTypes";
|
||||
export * from "./solution";
|
||||
export * from "./question";
|
||||
|
||||
@ -1,33 +1,41 @@
|
||||
import type { StrapiEntity, StrapiImage, StrapiMedia, StrapiRelation } from './common';
|
||||
import type {
|
||||
StrapiEntity,
|
||||
StrapiImage,
|
||||
StrapiMedia,
|
||||
StrapiRelation,
|
||||
} from "./common";
|
||||
|
||||
export interface ProductionType extends StrapiEntity {
|
||||
type: string;
|
||||
type: string;
|
||||
}
|
||||
|
||||
export interface ProductionSpecItem {
|
||||
label: string;
|
||||
value: string;
|
||||
label: string;
|
||||
value: string;
|
||||
}
|
||||
|
||||
export interface ProductionSpecGroup {
|
||||
title: string;
|
||||
items: ProductionSpecItem[];
|
||||
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;
|
||||
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'>[];
|
||||
}
|
||||
document: StrapiMedia;
|
||||
related_productions: StrapiRelation<Production, "production_documents">[];
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
export interface Question extends StrapiEntity {
|
||||
title: string;
|
||||
content: string;
|
||||
related_productions: StrapiRelation<Production, 'questions'>[];
|
||||
}
|
||||
title: string;
|
||||
content: string;
|
||||
related_productions: StrapiRelation<Production, "questions">[];
|
||||
}
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
export interface StrapiCompanyProfile extends StrapiEntity {
|
||||
content: string;
|
||||
content: string;
|
||||
}
|
||||
|
||||
export interface StrapiContactInfo extends StrapiEntity {
|
||||
content: string;
|
||||
content: string;
|
||||
}
|
||||
|
||||
export interface StrapiHomepage extends StrapiEntity {
|
||||
carousel: StrapiImage[];
|
||||
recommend_productions: StrapiRelation<Production>[];
|
||||
recommend_solutions: StrapiRelation<Solution>[];
|
||||
}
|
||||
carousel: StrapiImage[];
|
||||
recommend_productions: StrapiRelation<Production>[];
|
||||
recommend_solutions: StrapiRelation<Solution>[];
|
||||
}
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
import type { StrapiEntity, StrapiImage } from './common';
|
||||
import type { StrapiEntity, StrapiImage } from "./common";
|
||||
|
||||
export interface SolutionType extends StrapiEntity {
|
||||
type: string;
|
||||
type: string;
|
||||
}
|
||||
|
||||
export interface Solution extends StrapiEntity {
|
||||
title: string;
|
||||
summary: string;
|
||||
cover: StrapiImage;
|
||||
solution_type: SolutionType;
|
||||
content: string;
|
||||
}
|
||||
title: string;
|
||||
summary: string;
|
||||
cover: StrapiImage;
|
||||
solution_type: SolutionType;
|
||||
content: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user