add type 'service'
This commit is contained in:
parent
b30e9e46fb
commit
554fa6adc0
@ -26,7 +26,7 @@
|
||||
"price": {
|
||||
"type": "integer"
|
||||
},
|
||||
"service": {
|
||||
"service_description": {
|
||||
"type": "text"
|
||||
},
|
||||
"client": {
|
||||
@ -55,6 +55,12 @@
|
||||
},
|
||||
"time_end": {
|
||||
"type": "time"
|
||||
},
|
||||
"services": {
|
||||
"type": "relation",
|
||||
"relation": "manyToMany",
|
||||
"target": "api::service.service",
|
||||
"inversedBy": "orders"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
24
src/api/service/content-types/service/schema.json
Normal file
24
src/api/service/content-types/service/schema.json
Normal file
@ -0,0 +1,24 @@
|
||||
{
|
||||
"kind": "collectionType",
|
||||
"collectionName": "services",
|
||||
"info": {
|
||||
"singularName": "service",
|
||||
"pluralName": "services",
|
||||
"displayName": "service"
|
||||
},
|
||||
"options": {
|
||||
"draftAndPublish": true
|
||||
},
|
||||
"pluginOptions": {},
|
||||
"attributes": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"orders": {
|
||||
"type": "relation",
|
||||
"relation": "manyToMany",
|
||||
"target": "api::order.order",
|
||||
"mappedBy": "services"
|
||||
}
|
||||
}
|
||||
}
|
||||
7
src/api/service/controllers/service.ts
Normal file
7
src/api/service/controllers/service.ts
Normal file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* service controller
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi'
|
||||
|
||||
export default factories.createCoreController('api::service.service');
|
||||
7
src/api/service/routes/service.ts
Normal file
7
src/api/service/routes/service.ts
Normal file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* service router
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreRouter('api::service.service');
|
||||
7
src/api/service/services/service.ts
Normal file
7
src/api/service/services/service.ts
Normal file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* service service
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreService('api::service.service');
|
||||
33
types/generated/contentTypes.d.ts
vendored
33
types/generated/contentTypes.d.ts
vendored
@ -471,7 +471,8 @@ export interface ApiOrderOrder extends Struct.CollectionTypeSchema {
|
||||
order_number: Schema.Attribute.Integer;
|
||||
price: Schema.Attribute.Integer;
|
||||
publishedAt: Schema.Attribute.DateTime;
|
||||
service: Schema.Attribute.Text;
|
||||
service_description: Schema.Attribute.Text;
|
||||
services: Schema.Attribute.Relation<'manyToMany', 'api::service.service'>;
|
||||
slot: Schema.Attribute.Relation<'manyToOne', 'api::slot.slot'>;
|
||||
state: Schema.Attribute.Enumeration<
|
||||
['created', 'scheduled', 'approved', 'completed', 'cancelled']
|
||||
@ -485,6 +486,35 @@ export interface ApiOrderOrder extends Struct.CollectionTypeSchema {
|
||||
};
|
||||
}
|
||||
|
||||
export interface ApiServiceService extends Struct.CollectionTypeSchema {
|
||||
collectionName: 'services';
|
||||
info: {
|
||||
displayName: 'service';
|
||||
pluralName: 'services';
|
||||
singularName: 'service';
|
||||
};
|
||||
options: {
|
||||
draftAndPublish: true;
|
||||
};
|
||||
attributes: {
|
||||
createdAt: Schema.Attribute.DateTime;
|
||||
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
|
||||
Schema.Attribute.Private;
|
||||
locale: Schema.Attribute.String & Schema.Attribute.Private;
|
||||
localizations: Schema.Attribute.Relation<
|
||||
'oneToMany',
|
||||
'api::service.service'
|
||||
> &
|
||||
Schema.Attribute.Private;
|
||||
name: Schema.Attribute.String;
|
||||
orders: Schema.Attribute.Relation<'manyToMany', 'api::order.order'>;
|
||||
publishedAt: Schema.Attribute.DateTime;
|
||||
updatedAt: Schema.Attribute.DateTime;
|
||||
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
|
||||
Schema.Attribute.Private;
|
||||
};
|
||||
}
|
||||
|
||||
export interface ApiSettingSetting extends Struct.CollectionTypeSchema {
|
||||
collectionName: 'settings';
|
||||
info: {
|
||||
@ -1058,6 +1088,7 @@ declare module '@strapi/strapi' {
|
||||
'api::block.block': ApiBlockBlock;
|
||||
'api::customer.customer': ApiCustomerCustomer;
|
||||
'api::order.order': ApiOrderOrder;
|
||||
'api::service.service': ApiServiceService;
|
||||
'api::setting.setting': ApiSettingSetting;
|
||||
'api::slot.slot': ApiSlotSlot;
|
||||
'plugin::content-releases.release': PluginContentReleasesRelease;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user