Feature: 添加Content类型
This commit is contained in:
@ -0,0 +1,27 @@
|
||||
{
|
||||
"kind": "singleType",
|
||||
"collectionName": "company_profiles",
|
||||
"info": {
|
||||
"singularName": "company-profile",
|
||||
"pluralName": "company-profiles",
|
||||
"displayName": "CompanyProfile"
|
||||
},
|
||||
"options": {
|
||||
"draftAndPublish": true
|
||||
},
|
||||
"pluginOptions": {
|
||||
"i18n": {
|
||||
"localized": true
|
||||
}
|
||||
},
|
||||
"attributes": {
|
||||
"content": {
|
||||
"type": "richtext",
|
||||
"pluginOptions": {
|
||||
"i18n": {
|
||||
"localized": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
7
src/api/company-profile/controllers/company-profile.ts
Normal file
7
src/api/company-profile/controllers/company-profile.ts
Normal file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* company-profile controller
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi'
|
||||
|
||||
export default factories.createCoreController('api::company-profile.company-profile');
|
||||
7
src/api/company-profile/routes/company-profile.ts
Normal file
7
src/api/company-profile/routes/company-profile.ts
Normal file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* company-profile router
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreRouter('api::company-profile.company-profile');
|
||||
7
src/api/company-profile/services/company-profile.ts
Normal file
7
src/api/company-profile/services/company-profile.ts
Normal file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* company-profile service
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreService('api::company-profile.company-profile');
|
||||
27
src/api/contact-info/content-types/contact-info/schema.json
Normal file
27
src/api/contact-info/content-types/contact-info/schema.json
Normal file
@ -0,0 +1,27 @@
|
||||
{
|
||||
"kind": "singleType",
|
||||
"collectionName": "contact_infos",
|
||||
"info": {
|
||||
"singularName": "contact-info",
|
||||
"pluralName": "contact-infos",
|
||||
"displayName": "ContactInfo"
|
||||
},
|
||||
"options": {
|
||||
"draftAndPublish": true
|
||||
},
|
||||
"pluginOptions": {
|
||||
"i18n": {
|
||||
"localized": true
|
||||
}
|
||||
},
|
||||
"attributes": {
|
||||
"content": {
|
||||
"type": "richtext",
|
||||
"pluginOptions": {
|
||||
"i18n": {
|
||||
"localized": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
7
src/api/contact-info/controllers/contact-info.ts
Normal file
7
src/api/contact-info/controllers/contact-info.ts
Normal file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* contact-info controller
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi'
|
||||
|
||||
export default factories.createCoreController('api::contact-info.contact-info');
|
||||
7
src/api/contact-info/routes/contact-info.ts
Normal file
7
src/api/contact-info/routes/contact-info.ts
Normal file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* contact-info router
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreRouter('api::contact-info.contact-info');
|
||||
7
src/api/contact-info/services/contact-info.ts
Normal file
7
src/api/contact-info/services/contact-info.ts
Normal file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* contact-info service
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreService('api::contact-info.contact-info');
|
||||
@ -0,0 +1,28 @@
|
||||
{
|
||||
"kind": "collectionType",
|
||||
"collectionName": "production_types",
|
||||
"info": {
|
||||
"singularName": "production-type",
|
||||
"pluralName": "production-types",
|
||||
"displayName": "Production Type"
|
||||
},
|
||||
"options": {
|
||||
"draftAndPublish": true
|
||||
},
|
||||
"pluginOptions": {
|
||||
"i18n": {
|
||||
"localized": true
|
||||
}
|
||||
},
|
||||
"attributes": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"pluginOptions": {
|
||||
"i18n": {
|
||||
"localized": true
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
}
|
||||
}
|
||||
}
|
||||
7
src/api/production-type/controllers/production-type.ts
Normal file
7
src/api/production-type/controllers/production-type.ts
Normal file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* production-type controller
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi'
|
||||
|
||||
export default factories.createCoreController('api::production-type.production-type');
|
||||
7
src/api/production-type/routes/production-type.ts
Normal file
7
src/api/production-type/routes/production-type.ts
Normal file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* production-type router
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreRouter('api::production-type.production-type');
|
||||
7
src/api/production-type/services/production-type.ts
Normal file
7
src/api/production-type/services/production-type.ts
Normal file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* production-type service
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreService('api::production-type.production-type');
|
||||
108
src/api/production/content-types/production/schema.json
Normal file
108
src/api/production/content-types/production/schema.json
Normal file
@ -0,0 +1,108 @@
|
||||
{
|
||||
"kind": "collectionType",
|
||||
"collectionName": "productions",
|
||||
"info": {
|
||||
"singularName": "production",
|
||||
"pluralName": "productions",
|
||||
"displayName": "Production"
|
||||
},
|
||||
"options": {
|
||||
"draftAndPublish": true
|
||||
},
|
||||
"pluginOptions": {
|
||||
"i18n": {
|
||||
"localized": true
|
||||
}
|
||||
},
|
||||
"attributes": {
|
||||
"title": {
|
||||
"type": "string",
|
||||
"pluginOptions": {
|
||||
"i18n": {
|
||||
"localized": true
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"summary": {
|
||||
"type": "string",
|
||||
"pluginOptions": {
|
||||
"i18n": {
|
||||
"localized": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"production_type": {
|
||||
"type": "relation",
|
||||
"relation": "oneToOne",
|
||||
"target": "api::production-type.production-type"
|
||||
},
|
||||
"cover": {
|
||||
"type": "media",
|
||||
"pluginOptions": {
|
||||
"i18n": {
|
||||
"localized": true
|
||||
}
|
||||
},
|
||||
"multiple": false,
|
||||
"allowedTypes": [
|
||||
"images"
|
||||
]
|
||||
},
|
||||
"production_images": {
|
||||
"type": "media",
|
||||
"pluginOptions": {
|
||||
"i18n": {
|
||||
"localized": true
|
||||
}
|
||||
},
|
||||
"multiple": true,
|
||||
"allowedTypes": [
|
||||
"images"
|
||||
]
|
||||
},
|
||||
"production_details": {
|
||||
"type": "richtext",
|
||||
"pluginOptions": {
|
||||
"i18n": {
|
||||
"localized": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"production_specs": {
|
||||
"type": "dynamiczone",
|
||||
"pluginOptions": {
|
||||
"i18n": {
|
||||
"localized": true
|
||||
}
|
||||
},
|
||||
"components": [
|
||||
"production.spec-group"
|
||||
]
|
||||
},
|
||||
"documents": {
|
||||
"type": "media",
|
||||
"pluginOptions": {
|
||||
"i18n": {
|
||||
"localized": true
|
||||
}
|
||||
},
|
||||
"multiple": true,
|
||||
"allowedTypes": [
|
||||
"images",
|
||||
"files",
|
||||
"videos",
|
||||
"audios"
|
||||
]
|
||||
},
|
||||
"show_in_production_list": {
|
||||
"type": "boolean",
|
||||
"pluginOptions": {
|
||||
"i18n": {
|
||||
"localized": true
|
||||
}
|
||||
},
|
||||
"default": true
|
||||
}
|
||||
}
|
||||
}
|
||||
7
src/api/production/controllers/production.ts
Normal file
7
src/api/production/controllers/production.ts
Normal file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* production controller
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi'
|
||||
|
||||
export default factories.createCoreController('api::production.production');
|
||||
7
src/api/production/routes/production.ts
Normal file
7
src/api/production/routes/production.ts
Normal file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* production router
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreRouter('api::production.production');
|
||||
7
src/api/production/services/production.ts
Normal file
7
src/api/production/services/production.ts
Normal file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* production service
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreService('api::production.production');
|
||||
@ -0,0 +1,28 @@
|
||||
{
|
||||
"kind": "collectionType",
|
||||
"collectionName": "solution_types",
|
||||
"info": {
|
||||
"singularName": "solution-type",
|
||||
"pluralName": "solution-types",
|
||||
"displayName": "Solution Type"
|
||||
},
|
||||
"options": {
|
||||
"draftAndPublish": true
|
||||
},
|
||||
"pluginOptions": {
|
||||
"i18n": {
|
||||
"localized": true
|
||||
}
|
||||
},
|
||||
"attributes": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"pluginOptions": {
|
||||
"i18n": {
|
||||
"localized": true
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
}
|
||||
}
|
||||
}
|
||||
7
src/api/solution-type/controllers/solution-type.ts
Normal file
7
src/api/solution-type/controllers/solution-type.ts
Normal file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* solution-type controller
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi'
|
||||
|
||||
export default factories.createCoreController('api::solution-type.solution-type');
|
||||
7
src/api/solution-type/routes/solution-type.ts
Normal file
7
src/api/solution-type/routes/solution-type.ts
Normal file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* solution-type router
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreRouter('api::solution-type.solution-type');
|
||||
7
src/api/solution-type/services/solution-type.ts
Normal file
7
src/api/solution-type/services/solution-type.ts
Normal file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* solution-type service
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreService('api::solution-type.solution-type');
|
||||
61
src/api/solution/content-types/solution/schema.json
Normal file
61
src/api/solution/content-types/solution/schema.json
Normal file
@ -0,0 +1,61 @@
|
||||
{
|
||||
"kind": "collectionType",
|
||||
"collectionName": "solutions",
|
||||
"info": {
|
||||
"singularName": "solution",
|
||||
"pluralName": "solutions",
|
||||
"displayName": "Solution"
|
||||
},
|
||||
"options": {
|
||||
"draftAndPublish": true
|
||||
},
|
||||
"pluginOptions": {
|
||||
"i18n": {
|
||||
"localized": true
|
||||
}
|
||||
},
|
||||
"attributes": {
|
||||
"title": {
|
||||
"type": "string",
|
||||
"pluginOptions": {
|
||||
"i18n": {
|
||||
"localized": true
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"summary": {
|
||||
"type": "string",
|
||||
"pluginOptions": {
|
||||
"i18n": {
|
||||
"localized": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"cover": {
|
||||
"type": "media",
|
||||
"pluginOptions": {
|
||||
"i18n": {
|
||||
"localized": true
|
||||
}
|
||||
},
|
||||
"multiple": false,
|
||||
"allowedTypes": [
|
||||
"images"
|
||||
]
|
||||
},
|
||||
"solution_type": {
|
||||
"type": "relation",
|
||||
"relation": "oneToOne",
|
||||
"target": "api::solution-type.solution-type"
|
||||
},
|
||||
"content": {
|
||||
"type": "richtext",
|
||||
"pluginOptions": {
|
||||
"i18n": {
|
||||
"localized": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
7
src/api/solution/controllers/solution.ts
Normal file
7
src/api/solution/controllers/solution.ts
Normal file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* solution controller
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi'
|
||||
|
||||
export default factories.createCoreController('api::solution.solution');
|
||||
7
src/api/solution/routes/solution.ts
Normal file
7
src/api/solution/routes/solution.ts
Normal file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* solution router
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreRouter('api::solution.solution');
|
||||
7
src/api/solution/services/solution.ts
Normal file
7
src/api/solution/services/solution.ts
Normal file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* solution service
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreService('api::solution.solution');
|
||||
19
src/components/production/spec-group.json
Normal file
19
src/components/production/spec-group.json
Normal file
@ -0,0 +1,19 @@
|
||||
{
|
||||
"collectionName": "components_production_spec_groups",
|
||||
"info": {
|
||||
"displayName": "Spec Group"
|
||||
},
|
||||
"options": {},
|
||||
"attributes": {
|
||||
"title": {
|
||||
"type": "string",
|
||||
"required": true
|
||||
},
|
||||
"items": {
|
||||
"type": "component",
|
||||
"component": "production.spec-item",
|
||||
"repeatable": true
|
||||
}
|
||||
},
|
||||
"config": {}
|
||||
}
|
||||
17
src/components/production/spec-item.json
Normal file
17
src/components/production/spec-item.json
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"collectionName": "components_production_spec_items",
|
||||
"info": {
|
||||
"displayName": "Spec Item"
|
||||
},
|
||||
"options": {},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"type": "string",
|
||||
"required": true
|
||||
},
|
||||
"value": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"config": {}
|
||||
}
|
||||
32
types/generated/components.d.ts
vendored
Normal file
32
types/generated/components.d.ts
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
import type { Schema, Struct } from '@strapi/strapi';
|
||||
|
||||
export interface ProductionSpecGroup extends Struct.ComponentSchema {
|
||||
collectionName: 'components_production_spec_groups';
|
||||
info: {
|
||||
displayName: 'Spec Group';
|
||||
};
|
||||
attributes: {
|
||||
items: Schema.Attribute.Component<'production.spec-item', true>;
|
||||
title: Schema.Attribute.String & Schema.Attribute.Required;
|
||||
};
|
||||
}
|
||||
|
||||
export interface ProductionSpecItem extends Struct.ComponentSchema {
|
||||
collectionName: 'components_production_spec_items';
|
||||
info: {
|
||||
displayName: 'Spec Item';
|
||||
};
|
||||
attributes: {
|
||||
label: Schema.Attribute.String & Schema.Attribute.Required;
|
||||
value: Schema.Attribute.String;
|
||||
};
|
||||
}
|
||||
|
||||
declare module '@strapi/strapi' {
|
||||
export module Public {
|
||||
export interface ComponentSchemas {
|
||||
'production.spec-group': ProductionSpecGroup;
|
||||
'production.spec-item': ProductionSpecItem;
|
||||
}
|
||||
}
|
||||
}
|
||||
1204
types/generated/contentTypes.d.ts
vendored
Normal file
1204
types/generated/contentTypes.d.ts
vendored
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user