Fix: 调整Strapi类型
This commit is contained in:
@ -7,18 +7,13 @@ export interface StrapiEntity {
|
||||
locale?: string;
|
||||
}
|
||||
|
||||
export interface StrapiImage {
|
||||
export interface StrapiMedia {
|
||||
id: number;
|
||||
url: string;
|
||||
ext?: string;
|
||||
name?: string;
|
||||
alternativeText?: string;
|
||||
caption?: string;
|
||||
width?: number;
|
||||
height?: number;
|
||||
formats?: {
|
||||
small?: StrapiImageFormat;
|
||||
medium?: StrapiImageFormat;
|
||||
thumbnail?: StrapiImageFormat;
|
||||
}
|
||||
}
|
||||
|
||||
export interface StrapiImageFormat {
|
||||
@ -28,6 +23,16 @@ export interface StrapiImageFormat {
|
||||
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?: {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import type { StrapiEntity, StrapiImage } from './common';
|
||||
import type { StrapiEntity, StrapiImage, StrapiMedia } from './common';
|
||||
|
||||
export interface ProductionType extends StrapiEntity {
|
||||
type: string;
|
||||
@ -11,4 +11,5 @@ export interface Production extends StrapiEntity {
|
||||
production_image?: StrapiImage;
|
||||
production_details?: string;
|
||||
production_specs?: string | object;
|
||||
documents?: StrapiMedia[];
|
||||
}
|
||||
Reference in New Issue
Block a user