chore: 类型同步
- 后端CMS为问题/文档添加类型字段,前端同步更改
This commit is contained in:
@ -1,3 +1,19 @@
|
||||
export interface AiPrompt {
|
||||
/** @primaryKey */
|
||||
id: string;
|
||||
sort?: number | null;
|
||||
date_created?: string | null;
|
||||
user_created?: DirectusUser | string | null;
|
||||
date_updated?: string | null;
|
||||
user_updated?: DirectusUser | string | null;
|
||||
/** @required */
|
||||
name: string;
|
||||
status?: 'published' | 'draft' | 'archived' | null;
|
||||
description?: string | null;
|
||||
system_prompt?: string | null;
|
||||
messages?: Array<{ role: 'user' | 'assistant'; text: string }> | null;
|
||||
}
|
||||
|
||||
export interface CompanyProfile {
|
||||
/** @primaryKey */
|
||||
id: number;
|
||||
@ -26,6 +42,20 @@ export interface ContactInfoTranslation {
|
||||
content?: string | null;
|
||||
}
|
||||
|
||||
export interface DocumentType {
|
||||
/** @primaryKey */
|
||||
id: number;
|
||||
translations?: DocumentTypesTranslation[] | null;
|
||||
}
|
||||
|
||||
export interface DocumentTypesTranslation {
|
||||
/** @primaryKey */
|
||||
id: number;
|
||||
document_types_id?: DocumentType | string | null;
|
||||
languages_code?: Language | string | null;
|
||||
name?: string | null;
|
||||
}
|
||||
|
||||
export interface Homepage {
|
||||
/** @primaryKey */
|
||||
id: number;
|
||||
@ -75,8 +105,9 @@ export interface ProductDocument {
|
||||
id: number;
|
||||
status?: 'published' | 'draft' | 'archived';
|
||||
file?: DirectusFile | string | null;
|
||||
products?: ProductsProductDocument[] | string[];
|
||||
type?: DocumentType | string | null;
|
||||
translations?: ProductDocumentsTranslation[] | null;
|
||||
products?: ProductsProductDocument[] | string[];
|
||||
}
|
||||
|
||||
export interface ProductDocumentsTranslation {
|
||||
@ -209,10 +240,25 @@ export interface ProductsTranslation {
|
||||
description?: string | null;
|
||||
}
|
||||
|
||||
export interface QuestionType {
|
||||
/** @primaryKey */
|
||||
id: number;
|
||||
translations?: QuestionTypesTranslation[] | null;
|
||||
}
|
||||
|
||||
export interface QuestionTypesTranslation {
|
||||
/** @primaryKey */
|
||||
id: number;
|
||||
question_types_id?: QuestionType | string | null;
|
||||
languages_code?: Language | string | null;
|
||||
name?: string | null;
|
||||
}
|
||||
|
||||
export interface Question {
|
||||
/** @primaryKey */
|
||||
id: number;
|
||||
status?: 'published' | 'draft' | 'archived';
|
||||
type?: QuestionType | string | null;
|
||||
/** @description i18n字段 */
|
||||
translations?: QuestionsTranslation[] | null;
|
||||
products?: ProductsQuestion[] | string[];
|
||||
@ -741,10 +787,13 @@ export interface DirectusExtension {
|
||||
}
|
||||
|
||||
export interface Schema {
|
||||
ai_prompts: AiPrompt[];
|
||||
company_profile: CompanyProfile;
|
||||
company_profile_translations: CompanyProfileTranslation[];
|
||||
contact_info: ContactInfo;
|
||||
contact_info_translations: ContactInfoTranslation[];
|
||||
document_types: DocumentType[];
|
||||
document_types_translations: DocumentTypesTranslation[];
|
||||
homepage: Homepage;
|
||||
homepage_files: HomepageFile[];
|
||||
languages: Language[];
|
||||
@ -765,6 +814,8 @@ export interface Schema {
|
||||
products_product_images: ProductsProductImage[];
|
||||
products_questions: ProductsQuestion[];
|
||||
products_translations: ProductsTranslation[];
|
||||
question_types: QuestionType[];
|
||||
question_types_translations: QuestionTypesTranslation[];
|
||||
questions: Question[];
|
||||
questions_translations: QuestionsTranslation[];
|
||||
solution_types: SolutionType[];
|
||||
@ -801,10 +852,13 @@ export interface Schema {
|
||||
}
|
||||
|
||||
export enum CollectionNames {
|
||||
ai_prompts = 'ai_prompts',
|
||||
company_profile = 'company_profile',
|
||||
company_profile_translations = 'company_profile_translations',
|
||||
contact_info = 'contact_info',
|
||||
contact_info_translations = 'contact_info_translations',
|
||||
document_types = 'document_types',
|
||||
document_types_translations = 'document_types_translations',
|
||||
homepage = 'homepage',
|
||||
homepage_files = 'homepage_files',
|
||||
languages = 'languages',
|
||||
@ -825,6 +879,8 @@ export enum CollectionNames {
|
||||
products_product_images = 'products_product_images',
|
||||
products_questions = 'products_questions',
|
||||
products_translations = 'products_translations',
|
||||
question_types = 'question_types',
|
||||
question_types_translations = 'question_types_translations',
|
||||
questions = 'questions',
|
||||
questions_translations = 'questions_translations',
|
||||
solution_types = 'solution_types',
|
||||
|
||||
Reference in New Issue
Block a user