правки anna k
This commit is contained in:
parent
d24eea9e25
commit
d14a8279c0
@ -24,7 +24,8 @@
|
||||
"type": "enumeration",
|
||||
"enum": [
|
||||
"created",
|
||||
"paid"
|
||||
"paid",
|
||||
"deleted"
|
||||
],
|
||||
"default": "created"
|
||||
},
|
||||
@ -48,6 +49,12 @@
|
||||
"relation": "manyToOne",
|
||||
"target": "api::customer.customer",
|
||||
"inversedBy": "blocks"
|
||||
},
|
||||
"orders": {
|
||||
"type": "relation",
|
||||
"relation": "oneToMany",
|
||||
"target": "api::order.order",
|
||||
"mappedBy": "block"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -61,6 +61,18 @@
|
||||
"relation": "oneToMany",
|
||||
"target": "api::slot.slot",
|
||||
"mappedBy": "master"
|
||||
},
|
||||
"orders": {
|
||||
"type": "relation",
|
||||
"relation": "oneToMany",
|
||||
"target": "api::order.order",
|
||||
"mappedBy": "client"
|
||||
},
|
||||
"setting": {
|
||||
"type": "relation",
|
||||
"relation": "oneToOne",
|
||||
"target": "api::setting.setting",
|
||||
"mappedBy": "customer"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,7 +4,8 @@
|
||||
"info": {
|
||||
"singularName": "order",
|
||||
"pluralName": "orders",
|
||||
"displayName": "Order"
|
||||
"displayName": "Order",
|
||||
"description": ""
|
||||
},
|
||||
"options": {
|
||||
"draftAndPublish": true
|
||||
@ -32,7 +33,19 @@
|
||||
"type": "relation",
|
||||
"relation": "oneToOne",
|
||||
"target": "api::slot.slot",
|
||||
"inversedBy": "order"
|
||||
"mappedBy": "orders"
|
||||
},
|
||||
"client": {
|
||||
"type": "relation",
|
||||
"relation": "manyToOne",
|
||||
"target": "api::customer.customer",
|
||||
"inversedBy": "orders"
|
||||
},
|
||||
"block": {
|
||||
"type": "relation",
|
||||
"relation": "manyToOne",
|
||||
"target": "api::block.block",
|
||||
"inversedBy": "orders"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
25
src/api/setting/content-types/setting/schema.json
Normal file
25
src/api/setting/content-types/setting/schema.json
Normal file
@ -0,0 +1,25 @@
|
||||
{
|
||||
"kind": "collectionType",
|
||||
"collectionName": "settings",
|
||||
"info": {
|
||||
"singularName": "setting",
|
||||
"pluralName": "settings",
|
||||
"displayName": "Setting"
|
||||
},
|
||||
"options": {
|
||||
"draftAndPublish": true
|
||||
},
|
||||
"pluginOptions": {},
|
||||
"attributes": {
|
||||
"customer": {
|
||||
"type": "relation",
|
||||
"relation": "oneToOne",
|
||||
"target": "api::customer.customer",
|
||||
"inversedBy": "setting"
|
||||
},
|
||||
"recordingByBlocks": {
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
}
|
||||
}
|
||||
}
|
||||
7
src/api/setting/controllers/setting.ts
Normal file
7
src/api/setting/controllers/setting.ts
Normal file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* setting controller
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi'
|
||||
|
||||
export default factories.createCoreController('api::setting.setting');
|
||||
7
src/api/setting/routes/setting.ts
Normal file
7
src/api/setting/routes/setting.ts
Normal file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* setting router
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreRouter('api::setting.setting');
|
||||
7
src/api/setting/services/setting.ts
Normal file
7
src/api/setting/services/setting.ts
Normal file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* setting service
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreService('api::setting.setting');
|
||||
@ -24,14 +24,15 @@
|
||||
"type": "enumeration",
|
||||
"enum": [
|
||||
"open",
|
||||
"reserved",
|
||||
"closed"
|
||||
]
|
||||
},
|
||||
"order": {
|
||||
"orders": {
|
||||
"type": "relation",
|
||||
"relation": "oneToOne",
|
||||
"target": "api::order.order",
|
||||
"mappedBy": "slot"
|
||||
"inversedBy": "slot"
|
||||
},
|
||||
"master": {
|
||||
"type": "relation",
|
||||
|
||||
43
types/generated/contentTypes.d.ts
vendored
43
types/generated/contentTypes.d.ts
vendored
@ -391,12 +391,13 @@ export interface ApiBlockBlock extends Struct.CollectionTypeSchema {
|
||||
localizations: Schema.Attribute.Relation<'oneToMany', 'api::block.block'> &
|
||||
Schema.Attribute.Private;
|
||||
master: Schema.Attribute.Relation<'manyToOne', 'api::customer.customer'>;
|
||||
orders: Schema.Attribute.Relation<'oneToMany', 'api::order.order'>;
|
||||
publishedAt: Schema.Attribute.DateTime;
|
||||
sessionsCompleted: Schema.Attribute.Integer & Schema.Attribute.DefaultTo<0>;
|
||||
sessionsTotal: Schema.Attribute.Integer &
|
||||
Schema.Attribute.Required &
|
||||
Schema.Attribute.DefaultTo<10>;
|
||||
state: Schema.Attribute.Enumeration<['created', 'paid']> &
|
||||
state: Schema.Attribute.Enumeration<['created', 'paid', 'deleted']> &
|
||||
Schema.Attribute.DefaultTo<'created'>;
|
||||
updatedAt: Schema.Attribute.DateTime;
|
||||
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
|
||||
@ -430,12 +431,14 @@ export interface ApiCustomerCustomer extends Struct.CollectionTypeSchema {
|
||||
Schema.Attribute.Private;
|
||||
masters: Schema.Attribute.Relation<'manyToMany', 'api::customer.customer'>;
|
||||
name: Schema.Attribute.String & Schema.Attribute.Required;
|
||||
orders: Schema.Attribute.Relation<'oneToMany', 'api::order.order'>;
|
||||
phone: Schema.Attribute.String &
|
||||
Schema.Attribute.Required &
|
||||
Schema.Attribute.Unique;
|
||||
publishedAt: Schema.Attribute.DateTime;
|
||||
role: Schema.Attribute.Enumeration<['client', 'master']> &
|
||||
Schema.Attribute.Required;
|
||||
setting: Schema.Attribute.Relation<'oneToOne', 'api::setting.setting'>;
|
||||
slots: Schema.Attribute.Relation<'oneToMany', 'api::slot.slot'>;
|
||||
telegramId: Schema.Attribute.BigInteger & Schema.Attribute.Unique;
|
||||
updatedAt: Schema.Attribute.DateTime;
|
||||
@ -447,6 +450,7 @@ export interface ApiCustomerCustomer extends Struct.CollectionTypeSchema {
|
||||
export interface ApiOrderOrder extends Struct.CollectionTypeSchema {
|
||||
collectionName: 'orders';
|
||||
info: {
|
||||
description: '';
|
||||
displayName: 'Order';
|
||||
pluralName: 'orders';
|
||||
singularName: 'order';
|
||||
@ -455,6 +459,8 @@ export interface ApiOrderOrder extends Struct.CollectionTypeSchema {
|
||||
draftAndPublish: true;
|
||||
};
|
||||
attributes: {
|
||||
block: Schema.Attribute.Relation<'manyToOne', 'api::block.block'>;
|
||||
client: Schema.Attribute.Relation<'manyToOne', 'api::customer.customer'>;
|
||||
createdAt: Schema.Attribute.DateTime;
|
||||
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
|
||||
Schema.Attribute.Private;
|
||||
@ -475,6 +481,36 @@ export interface ApiOrderOrder extends Struct.CollectionTypeSchema {
|
||||
};
|
||||
}
|
||||
|
||||
export interface ApiSettingSetting extends Struct.CollectionTypeSchema {
|
||||
collectionName: 'settings';
|
||||
info: {
|
||||
displayName: 'Setting';
|
||||
pluralName: 'settings';
|
||||
singularName: 'setting';
|
||||
};
|
||||
options: {
|
||||
draftAndPublish: true;
|
||||
};
|
||||
attributes: {
|
||||
createdAt: Schema.Attribute.DateTime;
|
||||
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
|
||||
Schema.Attribute.Private;
|
||||
customer: Schema.Attribute.Relation<'oneToOne', 'api::customer.customer'>;
|
||||
locale: Schema.Attribute.String & Schema.Attribute.Private;
|
||||
localizations: Schema.Attribute.Relation<
|
||||
'oneToMany',
|
||||
'api::setting.setting'
|
||||
> &
|
||||
Schema.Attribute.Private;
|
||||
publishedAt: Schema.Attribute.DateTime;
|
||||
recordingByBlocks: Schema.Attribute.Boolean &
|
||||
Schema.Attribute.DefaultTo<false>;
|
||||
updatedAt: Schema.Attribute.DateTime;
|
||||
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
|
||||
Schema.Attribute.Private;
|
||||
};
|
||||
}
|
||||
|
||||
export interface ApiSlotSlot extends Struct.CollectionTypeSchema {
|
||||
collectionName: 'slots';
|
||||
info: {
|
||||
@ -496,9 +532,9 @@ export interface ApiSlotSlot extends Struct.CollectionTypeSchema {
|
||||
localizations: Schema.Attribute.Relation<'oneToMany', 'api::slot.slot'> &
|
||||
Schema.Attribute.Private;
|
||||
master: Schema.Attribute.Relation<'manyToOne', 'api::customer.customer'>;
|
||||
order: Schema.Attribute.Relation<'oneToOne', 'api::order.order'>;
|
||||
orders: Schema.Attribute.Relation<'oneToOne', 'api::order.order'>;
|
||||
publishedAt: Schema.Attribute.DateTime;
|
||||
state: Schema.Attribute.Enumeration<['open', 'closed']>;
|
||||
state: Schema.Attribute.Enumeration<['open', 'reserved', 'closed']>;
|
||||
updatedAt: Schema.Attribute.DateTime;
|
||||
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
|
||||
Schema.Attribute.Private;
|
||||
@ -1017,6 +1053,7 @@ declare module '@strapi/strapi' {
|
||||
'api::block.block': ApiBlockBlock;
|
||||
'api::customer.customer': ApiCustomerCustomer;
|
||||
'api::order.order': ApiOrderOrder;
|
||||
'api::setting.setting': ApiSettingSetting;
|
||||
'api::slot.slot': ApiSlotSlot;
|
||||
'plugin::content-releases.release': PluginContentReleasesRelease;
|
||||
'plugin::content-releases.release-action': PluginContentReleasesReleaseAction;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user