feat!: 将项目有Strapi迁移至Directus #43
@ -1,5 +1,3 @@
|
||||
import type { JsonValue } from '../common';
|
||||
|
||||
export interface CompanyProfile {
|
||||
/** @primaryKey */
|
||||
id: number;
|
||||
@ -28,20 +26,9 @@ export interface ContactInfoTranslation {
|
||||
content?: 'json' | null;
|
||||
}
|
||||
|
||||
export interface Document {
|
||||
/** @primaryKey */
|
||||
id: number;
|
||||
status?: 'published' | 'draft' | 'archived';
|
||||
file?: DirectusFile | string | null;
|
||||
/** @description i18n字段 */
|
||||
translations?: DocumentsTranslation[] | null;
|
||||
products?: ProductsDocument[] | string[];
|
||||
}
|
||||
|
||||
export interface DocumentsTranslation {
|
||||
/** @primaryKey */
|
||||
id: number;
|
||||
documents_id?: Document | string | null;
|
||||
languages_code?: Language | string | null;
|
||||
title?: string | null;
|
||||
}
|
||||
@ -68,6 +55,22 @@ export interface Language {
|
||||
direction?: 'ltr' | 'rtl' | null;
|
||||
}
|
||||
|
||||
export interface ProductDocument {
|
||||
/** @primaryKey */
|
||||
id: number;
|
||||
status?: 'published' | 'draft' | 'archived';
|
||||
file?: DirectusFile | string | null;
|
||||
translations?: ProductDocumentsTranslation[] | null;
|
||||
}
|
||||
|
||||
export interface ProductDocumentsTranslation {
|
||||
/** @primaryKey */
|
||||
id: number;
|
||||
product_documents_id?: ProductDocument | string | null;
|
||||
languages_code?: Language | string | null;
|
||||
title?: string | null;
|
||||
}
|
||||
|
||||
export interface ProductImage {
|
||||
/** @primaryKey */
|
||||
id: number;
|
||||
@ -146,21 +149,20 @@ export interface Product {
|
||||
cover?: DirectusFile | string | null;
|
||||
homepage_recommend?: Homepage | string | null;
|
||||
recommend_sort?: number | null;
|
||||
faqs?: ProductsQuestion[] | string[];
|
||||
/** @description i18n字段 */
|
||||
translations?: ProductsTranslation[] | null;
|
||||
faqs?: ProductsQuestion[] | string[];
|
||||
/** @description 在产品详情页中展示 */
|
||||
images?: ProductsProductImage[] | string[];
|
||||
documents?: ProductsDocument[] | string[];
|
||||
specs?: ProductSpecGroup[] | string[];
|
||||
documents?: ProductsProductDocument[] | string[];
|
||||
}
|
||||
|
||||
export interface ProductsDocument {
|
||||
export interface ProductsProductDocument {
|
||||
/** @primaryKey */
|
||||
id: number;
|
||||
products_id?: Product | string | null;
|
||||
documents_id?: Document | string | null;
|
||||
sort?: number | null;
|
||||
product_documents_id?: ProductDocument | string | null;
|
||||
}
|
||||
|
||||
export interface ProductsProductImage {
|
||||
@ -187,7 +189,7 @@ export interface ProductsTranslation {
|
||||
/** @required */
|
||||
name: string;
|
||||
summary?: string | null;
|
||||
description?: JsonValue | null;
|
||||
description?: string | null;
|
||||
}
|
||||
|
||||
export interface Question {
|
||||
@ -206,7 +208,7 @@ export interface QuestionsTranslation {
|
||||
languages_code?: Language | string | null;
|
||||
/** @required */
|
||||
title: string;
|
||||
content?: 'json' | null;
|
||||
content?: string | null;
|
||||
}
|
||||
|
||||
export interface SolutionType {
|
||||
@ -723,11 +725,12 @@ export interface Schema {
|
||||
company_profile_translations: CompanyProfileTranslation[];
|
||||
contact_info: ContactInfo;
|
||||
contact_info_translations: ContactInfoTranslation[];
|
||||
documents: Document[];
|
||||
documents_translations: DocumentsTranslation[];
|
||||
homepage: Homepage;
|
||||
homepage_files: HomepageFile[];
|
||||
languages: Language[];
|
||||
product_documents: ProductDocument[];
|
||||
product_documents_translations: ProductDocumentsTranslation[];
|
||||
product_images: ProductImage[];
|
||||
product_images_translations: ProductImagesTranslation[];
|
||||
product_spec_groups: ProductSpecGroup[];
|
||||
@ -737,7 +740,7 @@ export interface Schema {
|
||||
product_types: ProductType[];
|
||||
product_types_translations: ProductTypesTranslation[];
|
||||
products: Product[];
|
||||
products_documents: ProductsDocument[];
|
||||
products_product_documents: ProductsProductDocument[];
|
||||
products_product_images: ProductsProductImage[];
|
||||
products_questions: ProductsQuestion[];
|
||||
products_translations: ProductsTranslation[];
|
||||
@ -781,11 +784,12 @@ export enum CollectionNames {
|
||||
company_profile_translations = 'company_profile_translations',
|
||||
contact_info = 'contact_info',
|
||||
contact_info_translations = 'contact_info_translations',
|
||||
documents = 'documents',
|
||||
documents_translations = 'documents_translations',
|
||||
homepage = 'homepage',
|
||||
homepage_files = 'homepage_files',
|
||||
languages = 'languages',
|
||||
product_documents = 'product_documents',
|
||||
product_documents_translations = 'product_documents_translations',
|
||||
product_images = 'product_images',
|
||||
product_images_translations = 'product_images_translations',
|
||||
product_spec_groups = 'product_spec_groups',
|
||||
@ -795,7 +799,7 @@ export enum CollectionNames {
|
||||
product_types = 'product_types',
|
||||
product_types_translations = 'product_types_translations',
|
||||
products = 'products',
|
||||
products_documents = 'products_documents',
|
||||
products_product_documents = 'products_product_documents',
|
||||
products_product_images = 'products_product_images',
|
||||
products_questions = 'products_questions',
|
||||
products_translations = 'products_translations',
|
||||
|
||||
Reference in New Issue
Block a user