day 2
This commit is contained in:
parent
b907aa39f5
commit
d24eea9e25
@ -31,7 +31,8 @@
|
||||
"npm": ">=6.0.0"
|
||||
},
|
||||
"strapi": {
|
||||
"uuid": "106db158-9aa4-498b-b4ad-2472760d92e9"
|
||||
"uuid": "106db158-9aa4-498b-b4ad-2472760d92e9",
|
||||
"telemetryDisabled": true
|
||||
},
|
||||
"packageManager": "pnpm@9.14.2+sha512.6e2baf77d06b9362294152c851c4f278ede37ab1eba3a55fda317a4a17b209f4dbb973fb250a77abc463a341fcb1f17f17cfa24091c4eb319cda0d9b84278387"
|
||||
}
|
||||
|
||||
53
src/api/block/content-types/block/schema.json
Normal file
53
src/api/block/content-types/block/schema.json
Normal file
@ -0,0 +1,53 @@
|
||||
{
|
||||
"kind": "collectionType",
|
||||
"collectionName": "blocks",
|
||||
"info": {
|
||||
"singularName": "block",
|
||||
"pluralName": "blocks",
|
||||
"displayName": "Block",
|
||||
"description": ""
|
||||
},
|
||||
"options": {
|
||||
"draftAndPublish": true
|
||||
},
|
||||
"pluginOptions": {},
|
||||
"attributes": {
|
||||
"datestart": {
|
||||
"type": "datetime",
|
||||
"required": true
|
||||
},
|
||||
"dateend": {
|
||||
"type": "datetime",
|
||||
"required": true
|
||||
},
|
||||
"state": {
|
||||
"type": "enumeration",
|
||||
"enum": [
|
||||
"created",
|
||||
"paid"
|
||||
],
|
||||
"default": "created"
|
||||
},
|
||||
"sessionsTotal": {
|
||||
"type": "integer",
|
||||
"default": 10,
|
||||
"required": true
|
||||
},
|
||||
"sessionsCompleted": {
|
||||
"type": "integer",
|
||||
"default": 0
|
||||
},
|
||||
"master": {
|
||||
"type": "relation",
|
||||
"relation": "manyToOne",
|
||||
"target": "api::customer.customer",
|
||||
"inversedBy": "blocks"
|
||||
},
|
||||
"client": {
|
||||
"type": "relation",
|
||||
"relation": "manyToOne",
|
||||
"target": "api::customer.customer",
|
||||
"inversedBy": "blocks"
|
||||
}
|
||||
}
|
||||
}
|
||||
7
src/api/block/controllers/block.ts
Normal file
7
src/api/block/controllers/block.ts
Normal file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* block controller
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi'
|
||||
|
||||
export default factories.createCoreController('api::block.block');
|
||||
7
src/api/block/routes/block.ts
Normal file
7
src/api/block/routes/block.ts
Normal file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* block router
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreRouter('api::block.block');
|
||||
7
src/api/block/services/block.ts
Normal file
7
src/api/block/services/block.ts
Normal file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* block service
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreService('api::block.block');
|
||||
66
src/api/customer/content-types/customer/schema.json
Normal file
66
src/api/customer/content-types/customer/schema.json
Normal file
@ -0,0 +1,66 @@
|
||||
{
|
||||
"kind": "collectionType",
|
||||
"collectionName": "customers",
|
||||
"info": {
|
||||
"singularName": "customer",
|
||||
"pluralName": "customers",
|
||||
"displayName": "Customer",
|
||||
"description": ""
|
||||
},
|
||||
"options": {
|
||||
"draftAndPublish": true
|
||||
},
|
||||
"pluginOptions": {},
|
||||
"attributes": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"required": true
|
||||
},
|
||||
"telegramId": {
|
||||
"type": "biginteger",
|
||||
"unique": true
|
||||
},
|
||||
"phone": {
|
||||
"type": "string",
|
||||
"unique": true,
|
||||
"required": true
|
||||
},
|
||||
"role": {
|
||||
"type": "enumeration",
|
||||
"enum": [
|
||||
"client",
|
||||
"master"
|
||||
],
|
||||
"required": true
|
||||
},
|
||||
"active": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"required": false
|
||||
},
|
||||
"clients": {
|
||||
"type": "relation",
|
||||
"relation": "manyToMany",
|
||||
"target": "api::customer.customer",
|
||||
"inversedBy": "masters"
|
||||
},
|
||||
"masters": {
|
||||
"type": "relation",
|
||||
"relation": "manyToMany",
|
||||
"target": "api::customer.customer",
|
||||
"mappedBy": "clients"
|
||||
},
|
||||
"blocks": {
|
||||
"type": "relation",
|
||||
"relation": "oneToMany",
|
||||
"target": "api::block.block",
|
||||
"mappedBy": "client"
|
||||
},
|
||||
"slots": {
|
||||
"type": "relation",
|
||||
"relation": "oneToMany",
|
||||
"target": "api::slot.slot",
|
||||
"mappedBy": "master"
|
||||
}
|
||||
}
|
||||
}
|
||||
7
src/api/customer/controllers/customer.ts
Normal file
7
src/api/customer/controllers/customer.ts
Normal file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* customer controller
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi'
|
||||
|
||||
export default factories.createCoreController('api::customer.customer');
|
||||
7
src/api/customer/routes/customer.ts
Normal file
7
src/api/customer/routes/customer.ts
Normal file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* customer router
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreRouter('api::customer.customer');
|
||||
7
src/api/customer/services/customer.ts
Normal file
7
src/api/customer/services/customer.ts
Normal file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* customer service
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreService('api::customer.customer');
|
||||
38
src/api/order/content-types/order/schema.json
Normal file
38
src/api/order/content-types/order/schema.json
Normal file
@ -0,0 +1,38 @@
|
||||
{
|
||||
"kind": "collectionType",
|
||||
"collectionName": "orders",
|
||||
"info": {
|
||||
"singularName": "order",
|
||||
"pluralName": "orders",
|
||||
"displayName": "Order"
|
||||
},
|
||||
"options": {
|
||||
"draftAndPublish": true
|
||||
},
|
||||
"pluginOptions": {},
|
||||
"attributes": {
|
||||
"state": {
|
||||
"type": "enumeration",
|
||||
"enum": [
|
||||
"created",
|
||||
"scheduled",
|
||||
"approved",
|
||||
"completed",
|
||||
"cancelled"
|
||||
],
|
||||
"default": "created"
|
||||
},
|
||||
"price": {
|
||||
"type": "integer"
|
||||
},
|
||||
"service": {
|
||||
"type": "text"
|
||||
},
|
||||
"slot": {
|
||||
"type": "relation",
|
||||
"relation": "oneToOne",
|
||||
"target": "api::slot.slot",
|
||||
"inversedBy": "order"
|
||||
}
|
||||
}
|
||||
}
|
||||
7
src/api/order/controllers/order.ts
Normal file
7
src/api/order/controllers/order.ts
Normal file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* order controller
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi'
|
||||
|
||||
export default factories.createCoreController('api::order.order');
|
||||
7
src/api/order/routes/order.ts
Normal file
7
src/api/order/routes/order.ts
Normal file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* order router
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreRouter('api::order.order');
|
||||
7
src/api/order/services/order.ts
Normal file
7
src/api/order/services/order.ts
Normal file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* order service
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreService('api::order.order');
|
||||
43
src/api/slot/content-types/slot/schema.json
Normal file
43
src/api/slot/content-types/slot/schema.json
Normal file
@ -0,0 +1,43 @@
|
||||
{
|
||||
"kind": "collectionType",
|
||||
"collectionName": "slots",
|
||||
"info": {
|
||||
"singularName": "slot",
|
||||
"pluralName": "slots",
|
||||
"displayName": "Slot",
|
||||
"description": ""
|
||||
},
|
||||
"options": {
|
||||
"draftAndPublish": true
|
||||
},
|
||||
"pluginOptions": {},
|
||||
"attributes": {
|
||||
"datestart": {
|
||||
"type": "datetime",
|
||||
"required": true
|
||||
},
|
||||
"dateend": {
|
||||
"type": "datetime",
|
||||
"required": true
|
||||
},
|
||||
"state": {
|
||||
"type": "enumeration",
|
||||
"enum": [
|
||||
"open",
|
||||
"closed"
|
||||
]
|
||||
},
|
||||
"order": {
|
||||
"type": "relation",
|
||||
"relation": "oneToOne",
|
||||
"target": "api::order.order",
|
||||
"mappedBy": "slot"
|
||||
},
|
||||
"master": {
|
||||
"type": "relation",
|
||||
"relation": "manyToOne",
|
||||
"target": "api::customer.customer",
|
||||
"inversedBy": "slots"
|
||||
}
|
||||
}
|
||||
}
|
||||
7
src/api/slot/controllers/slot.ts
Normal file
7
src/api/slot/controllers/slot.ts
Normal file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* slot controller
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi'
|
||||
|
||||
export default factories.createCoreController('api::slot.slot');
|
||||
7
src/api/slot/routes/slot.ts
Normal file
7
src/api/slot/routes/slot.ts
Normal file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* slot router
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreRouter('api::slot.slot');
|
||||
7
src/api/slot/services/slot.ts
Normal file
7
src/api/slot/services/slot.ts
Normal file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* slot service
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreService('api::slot.slot');
|
||||
3
types/generated/components.d.ts
vendored
Normal file
3
types/generated/components.d.ts
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
/*
|
||||
* The app doesn't have any components yet.
|
||||
*/
|
||||
1033
types/generated/contentTypes.d.ts
vendored
Normal file
1033
types/generated/contentTypes.d.ts
vendored
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user