From 4e88fd9bfb79c97c4910017d771c4c2d76fb451a Mon Sep 17 00:00:00 2001 From: R2m1liA <15258427350@163.com> Date: Fri, 24 Oct 2025 16:18:40 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E5=88=A0=E9=99=A4Strapi=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E6=A0=87=E6=B3=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/types/strapi/common.ts | 53 --------------------------------- app/types/strapi/index.ts | 5 ---- app/types/strapi/production.ts | 41 ------------------------- app/types/strapi/question.ts | 5 ---- app/types/strapi/singleTypes.ts | 13 -------- app/types/strapi/solution.ts | 13 -------- 6 files changed, 130 deletions(-) delete mode 100644 app/types/strapi/common.ts delete mode 100644 app/types/strapi/index.ts delete mode 100644 app/types/strapi/production.ts delete mode 100644 app/types/strapi/question.ts delete mode 100644 app/types/strapi/singleTypes.ts delete mode 100644 app/types/strapi/solution.ts diff --git a/app/types/strapi/common.ts b/app/types/strapi/common.ts deleted file mode 100644 index 78f30c0..0000000 --- a/app/types/strapi/common.ts +++ /dev/null @@ -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 { - data: T; - meta: { - pagination: { - page: number; - pageSize: number; - pageCount: number; - total: number; - }; - }; -} - -export type StrapiRelation = Omit< - T, - K | keyof StrapiEntity -> & - StrapiEntity; diff --git a/app/types/strapi/index.ts b/app/types/strapi/index.ts deleted file mode 100644 index cbbf316..0000000 --- a/app/types/strapi/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * from './common'; -export * from './production'; -export * from './singleTypes'; -export * from './solution'; -export * from './question'; diff --git a/app/types/strapi/production.ts b/app/types/strapi/production.ts deleted file mode 100644 index b14afb3..0000000 --- a/app/types/strapi/production.ts +++ /dev/null @@ -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[]; - show_in_production_list: boolean; -} - -export interface ProductionDocument extends StrapiEntity { - document: StrapiMedia; - related_productions: StrapiRelation[]; -} diff --git a/app/types/strapi/question.ts b/app/types/strapi/question.ts deleted file mode 100644 index 1014eeb..0000000 --- a/app/types/strapi/question.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface Question extends StrapiEntity { - title: string; - content: string; - related_productions: StrapiRelation[]; -} diff --git a/app/types/strapi/singleTypes.ts b/app/types/strapi/singleTypes.ts deleted file mode 100644 index a7441be..0000000 --- a/app/types/strapi/singleTypes.ts +++ /dev/null @@ -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[]; - recommend_solutions: StrapiRelation[]; -} diff --git a/app/types/strapi/solution.ts b/app/types/strapi/solution.ts deleted file mode 100644 index b03f10a..0000000 --- a/app/types/strapi/solution.ts +++ /dev/null @@ -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; -}