From d24eea9e25726f3bd6e1f407886660d7a2859e70 Mon Sep 17 00:00:00 2001 From: vchikalkin Date: Thu, 28 Nov 2024 23:29:05 +0300 Subject: [PATCH] day 2 --- package.json | 3 +- src/api/block/content-types/block/schema.json | 53 + src/api/block/controllers/block.ts | 7 + src/api/block/routes/block.ts | 7 + src/api/block/services/block.ts | 7 + .../content-types/customer/schema.json | 66 ++ src/api/customer/controllers/customer.ts | 7 + src/api/customer/routes/customer.ts | 7 + src/api/customer/services/customer.ts | 7 + src/api/order/content-types/order/schema.json | 38 + src/api/order/controllers/order.ts | 7 + src/api/order/routes/order.ts | 7 + src/api/order/services/order.ts | 7 + src/api/slot/content-types/slot/schema.json | 43 + src/api/slot/controllers/slot.ts | 7 + src/api/slot/routes/slot.ts | 7 + src/api/slot/services/slot.ts | 7 + types/generated/components.d.ts | 3 + types/generated/contentTypes.d.ts | 1033 +++++++++++++++++ 19 files changed, 1322 insertions(+), 1 deletion(-) create mode 100644 src/api/block/content-types/block/schema.json create mode 100644 src/api/block/controllers/block.ts create mode 100644 src/api/block/routes/block.ts create mode 100644 src/api/block/services/block.ts create mode 100644 src/api/customer/content-types/customer/schema.json create mode 100644 src/api/customer/controllers/customer.ts create mode 100644 src/api/customer/routes/customer.ts create mode 100644 src/api/customer/services/customer.ts create mode 100644 src/api/order/content-types/order/schema.json create mode 100644 src/api/order/controllers/order.ts create mode 100644 src/api/order/routes/order.ts create mode 100644 src/api/order/services/order.ts create mode 100644 src/api/slot/content-types/slot/schema.json create mode 100644 src/api/slot/controllers/slot.ts create mode 100644 src/api/slot/routes/slot.ts create mode 100644 src/api/slot/services/slot.ts create mode 100644 types/generated/components.d.ts create mode 100644 types/generated/contentTypes.d.ts diff --git a/package.json b/package.json index 72f0736..f0fe164 100644 --- a/package.json +++ b/package.json @@ -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" } diff --git a/src/api/block/content-types/block/schema.json b/src/api/block/content-types/block/schema.json new file mode 100644 index 0000000..37f52c1 --- /dev/null +++ b/src/api/block/content-types/block/schema.json @@ -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" + } + } +} diff --git a/src/api/block/controllers/block.ts b/src/api/block/controllers/block.ts new file mode 100644 index 0000000..a1a251b --- /dev/null +++ b/src/api/block/controllers/block.ts @@ -0,0 +1,7 @@ +/** + * block controller + */ + +import { factories } from '@strapi/strapi' + +export default factories.createCoreController('api::block.block'); diff --git a/src/api/block/routes/block.ts b/src/api/block/routes/block.ts new file mode 100644 index 0000000..fe506b2 --- /dev/null +++ b/src/api/block/routes/block.ts @@ -0,0 +1,7 @@ +/** + * block router + */ + +import { factories } from '@strapi/strapi'; + +export default factories.createCoreRouter('api::block.block'); diff --git a/src/api/block/services/block.ts b/src/api/block/services/block.ts new file mode 100644 index 0000000..d874aef --- /dev/null +++ b/src/api/block/services/block.ts @@ -0,0 +1,7 @@ +/** + * block service + */ + +import { factories } from '@strapi/strapi'; + +export default factories.createCoreService('api::block.block'); diff --git a/src/api/customer/content-types/customer/schema.json b/src/api/customer/content-types/customer/schema.json new file mode 100644 index 0000000..18623ad --- /dev/null +++ b/src/api/customer/content-types/customer/schema.json @@ -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" + } + } +} diff --git a/src/api/customer/controllers/customer.ts b/src/api/customer/controllers/customer.ts new file mode 100644 index 0000000..48bb9c8 --- /dev/null +++ b/src/api/customer/controllers/customer.ts @@ -0,0 +1,7 @@ +/** + * customer controller + */ + +import { factories } from '@strapi/strapi' + +export default factories.createCoreController('api::customer.customer'); diff --git a/src/api/customer/routes/customer.ts b/src/api/customer/routes/customer.ts new file mode 100644 index 0000000..2f01375 --- /dev/null +++ b/src/api/customer/routes/customer.ts @@ -0,0 +1,7 @@ +/** + * customer router + */ + +import { factories } from '@strapi/strapi'; + +export default factories.createCoreRouter('api::customer.customer'); diff --git a/src/api/customer/services/customer.ts b/src/api/customer/services/customer.ts new file mode 100644 index 0000000..d9b3daf --- /dev/null +++ b/src/api/customer/services/customer.ts @@ -0,0 +1,7 @@ +/** + * customer service + */ + +import { factories } from '@strapi/strapi'; + +export default factories.createCoreService('api::customer.customer'); diff --git a/src/api/order/content-types/order/schema.json b/src/api/order/content-types/order/schema.json new file mode 100644 index 0000000..3f81e05 --- /dev/null +++ b/src/api/order/content-types/order/schema.json @@ -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" + } + } +} diff --git a/src/api/order/controllers/order.ts b/src/api/order/controllers/order.ts new file mode 100644 index 0000000..17e43ae --- /dev/null +++ b/src/api/order/controllers/order.ts @@ -0,0 +1,7 @@ +/** + * order controller + */ + +import { factories } from '@strapi/strapi' + +export default factories.createCoreController('api::order.order'); diff --git a/src/api/order/routes/order.ts b/src/api/order/routes/order.ts new file mode 100644 index 0000000..900d739 --- /dev/null +++ b/src/api/order/routes/order.ts @@ -0,0 +1,7 @@ +/** + * order router + */ + +import { factories } from '@strapi/strapi'; + +export default factories.createCoreRouter('api::order.order'); diff --git a/src/api/order/services/order.ts b/src/api/order/services/order.ts new file mode 100644 index 0000000..6500849 --- /dev/null +++ b/src/api/order/services/order.ts @@ -0,0 +1,7 @@ +/** + * order service + */ + +import { factories } from '@strapi/strapi'; + +export default factories.createCoreService('api::order.order'); diff --git a/src/api/slot/content-types/slot/schema.json b/src/api/slot/content-types/slot/schema.json new file mode 100644 index 0000000..1f18a36 --- /dev/null +++ b/src/api/slot/content-types/slot/schema.json @@ -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" + } + } +} diff --git a/src/api/slot/controllers/slot.ts b/src/api/slot/controllers/slot.ts new file mode 100644 index 0000000..5bb4cca --- /dev/null +++ b/src/api/slot/controllers/slot.ts @@ -0,0 +1,7 @@ +/** + * slot controller + */ + +import { factories } from '@strapi/strapi' + +export default factories.createCoreController('api::slot.slot'); diff --git a/src/api/slot/routes/slot.ts b/src/api/slot/routes/slot.ts new file mode 100644 index 0000000..52b358e --- /dev/null +++ b/src/api/slot/routes/slot.ts @@ -0,0 +1,7 @@ +/** + * slot router + */ + +import { factories } from '@strapi/strapi'; + +export default factories.createCoreRouter('api::slot.slot'); diff --git a/src/api/slot/services/slot.ts b/src/api/slot/services/slot.ts new file mode 100644 index 0000000..623ace0 --- /dev/null +++ b/src/api/slot/services/slot.ts @@ -0,0 +1,7 @@ +/** + * slot service + */ + +import { factories } from '@strapi/strapi'; + +export default factories.createCoreService('api::slot.slot'); diff --git a/types/generated/components.d.ts b/types/generated/components.d.ts new file mode 100644 index 0000000..41aa563 --- /dev/null +++ b/types/generated/components.d.ts @@ -0,0 +1,3 @@ +/* + * The app doesn't have any components yet. + */ diff --git a/types/generated/contentTypes.d.ts b/types/generated/contentTypes.d.ts new file mode 100644 index 0000000..9fa8e41 --- /dev/null +++ b/types/generated/contentTypes.d.ts @@ -0,0 +1,1033 @@ +import type { Schema, Struct } from '@strapi/strapi'; + +export interface AdminApiToken extends Struct.CollectionTypeSchema { + collectionName: 'strapi_api_tokens'; + info: { + description: ''; + displayName: 'Api Token'; + name: 'Api Token'; + pluralName: 'api-tokens'; + singularName: 'api-token'; + }; + options: { + draftAndPublish: false; + }; + pluginOptions: { + 'content-manager': { + visible: false; + }; + 'content-type-builder': { + visible: false; + }; + }; + attributes: { + accessKey: Schema.Attribute.String & + Schema.Attribute.Required & + Schema.Attribute.SetMinMaxLength<{ + minLength: 1; + }>; + createdAt: Schema.Attribute.DateTime; + createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + description: Schema.Attribute.String & + Schema.Attribute.SetMinMaxLength<{ + minLength: 1; + }> & + Schema.Attribute.DefaultTo<''>; + expiresAt: Schema.Attribute.DateTime; + lastUsedAt: Schema.Attribute.DateTime; + lifespan: Schema.Attribute.BigInteger; + locale: Schema.Attribute.String & Schema.Attribute.Private; + localizations: Schema.Attribute.Relation<'oneToMany', 'admin::api-token'> & + Schema.Attribute.Private; + name: Schema.Attribute.String & + Schema.Attribute.Required & + Schema.Attribute.Unique & + Schema.Attribute.SetMinMaxLength<{ + minLength: 1; + }>; + permissions: Schema.Attribute.Relation< + 'oneToMany', + 'admin::api-token-permission' + >; + publishedAt: Schema.Attribute.DateTime; + type: Schema.Attribute.Enumeration<['read-only', 'full-access', 'custom']> & + Schema.Attribute.Required & + Schema.Attribute.DefaultTo<'read-only'>; + updatedAt: Schema.Attribute.DateTime; + updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + }; +} + +export interface AdminApiTokenPermission extends Struct.CollectionTypeSchema { + collectionName: 'strapi_api_token_permissions'; + info: { + description: ''; + displayName: 'API Token Permission'; + name: 'API Token Permission'; + pluralName: 'api-token-permissions'; + singularName: 'api-token-permission'; + }; + options: { + draftAndPublish: false; + }; + pluginOptions: { + 'content-manager': { + visible: false; + }; + 'content-type-builder': { + visible: false; + }; + }; + attributes: { + action: Schema.Attribute.String & + Schema.Attribute.Required & + Schema.Attribute.SetMinMaxLength<{ + minLength: 1; + }>; + 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', + 'admin::api-token-permission' + > & + Schema.Attribute.Private; + publishedAt: Schema.Attribute.DateTime; + token: Schema.Attribute.Relation<'manyToOne', 'admin::api-token'>; + updatedAt: Schema.Attribute.DateTime; + updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + }; +} + +export interface AdminPermission extends Struct.CollectionTypeSchema { + collectionName: 'admin_permissions'; + info: { + description: ''; + displayName: 'Permission'; + name: 'Permission'; + pluralName: 'permissions'; + singularName: 'permission'; + }; + options: { + draftAndPublish: false; + }; + pluginOptions: { + 'content-manager': { + visible: false; + }; + 'content-type-builder': { + visible: false; + }; + }; + attributes: { + action: Schema.Attribute.String & + Schema.Attribute.Required & + Schema.Attribute.SetMinMaxLength<{ + minLength: 1; + }>; + actionParameters: Schema.Attribute.JSON & Schema.Attribute.DefaultTo<{}>; + conditions: Schema.Attribute.JSON & Schema.Attribute.DefaultTo<[]>; + 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', 'admin::permission'> & + Schema.Attribute.Private; + properties: Schema.Attribute.JSON & Schema.Attribute.DefaultTo<{}>; + publishedAt: Schema.Attribute.DateTime; + role: Schema.Attribute.Relation<'manyToOne', 'admin::role'>; + subject: Schema.Attribute.String & + Schema.Attribute.SetMinMaxLength<{ + minLength: 1; + }>; + updatedAt: Schema.Attribute.DateTime; + updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + }; +} + +export interface AdminRole extends Struct.CollectionTypeSchema { + collectionName: 'admin_roles'; + info: { + description: ''; + displayName: 'Role'; + name: 'Role'; + pluralName: 'roles'; + singularName: 'role'; + }; + options: { + draftAndPublish: false; + }; + pluginOptions: { + 'content-manager': { + visible: false; + }; + 'content-type-builder': { + visible: false; + }; + }; + attributes: { + code: Schema.Attribute.String & + Schema.Attribute.Required & + Schema.Attribute.Unique & + Schema.Attribute.SetMinMaxLength<{ + minLength: 1; + }>; + createdAt: Schema.Attribute.DateTime; + createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + description: Schema.Attribute.String; + locale: Schema.Attribute.String & Schema.Attribute.Private; + localizations: Schema.Attribute.Relation<'oneToMany', 'admin::role'> & + Schema.Attribute.Private; + name: Schema.Attribute.String & + Schema.Attribute.Required & + Schema.Attribute.Unique & + Schema.Attribute.SetMinMaxLength<{ + minLength: 1; + }>; + permissions: Schema.Attribute.Relation<'oneToMany', 'admin::permission'>; + publishedAt: Schema.Attribute.DateTime; + updatedAt: Schema.Attribute.DateTime; + updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + users: Schema.Attribute.Relation<'manyToMany', 'admin::user'>; + }; +} + +export interface AdminTransferToken extends Struct.CollectionTypeSchema { + collectionName: 'strapi_transfer_tokens'; + info: { + description: ''; + displayName: 'Transfer Token'; + name: 'Transfer Token'; + pluralName: 'transfer-tokens'; + singularName: 'transfer-token'; + }; + options: { + draftAndPublish: false; + }; + pluginOptions: { + 'content-manager': { + visible: false; + }; + 'content-type-builder': { + visible: false; + }; + }; + attributes: { + accessKey: Schema.Attribute.String & + Schema.Attribute.Required & + Schema.Attribute.SetMinMaxLength<{ + minLength: 1; + }>; + createdAt: Schema.Attribute.DateTime; + createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + description: Schema.Attribute.String & + Schema.Attribute.SetMinMaxLength<{ + minLength: 1; + }> & + Schema.Attribute.DefaultTo<''>; + expiresAt: Schema.Attribute.DateTime; + lastUsedAt: Schema.Attribute.DateTime; + lifespan: Schema.Attribute.BigInteger; + locale: Schema.Attribute.String & Schema.Attribute.Private; + localizations: Schema.Attribute.Relation< + 'oneToMany', + 'admin::transfer-token' + > & + Schema.Attribute.Private; + name: Schema.Attribute.String & + Schema.Attribute.Required & + Schema.Attribute.Unique & + Schema.Attribute.SetMinMaxLength<{ + minLength: 1; + }>; + permissions: Schema.Attribute.Relation< + 'oneToMany', + 'admin::transfer-token-permission' + >; + publishedAt: Schema.Attribute.DateTime; + updatedAt: Schema.Attribute.DateTime; + updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + }; +} + +export interface AdminTransferTokenPermission + extends Struct.CollectionTypeSchema { + collectionName: 'strapi_transfer_token_permissions'; + info: { + description: ''; + displayName: 'Transfer Token Permission'; + name: 'Transfer Token Permission'; + pluralName: 'transfer-token-permissions'; + singularName: 'transfer-token-permission'; + }; + options: { + draftAndPublish: false; + }; + pluginOptions: { + 'content-manager': { + visible: false; + }; + 'content-type-builder': { + visible: false; + }; + }; + attributes: { + action: Schema.Attribute.String & + Schema.Attribute.Required & + Schema.Attribute.SetMinMaxLength<{ + minLength: 1; + }>; + 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', + 'admin::transfer-token-permission' + > & + Schema.Attribute.Private; + publishedAt: Schema.Attribute.DateTime; + token: Schema.Attribute.Relation<'manyToOne', 'admin::transfer-token'>; + updatedAt: Schema.Attribute.DateTime; + updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + }; +} + +export interface AdminUser extends Struct.CollectionTypeSchema { + collectionName: 'admin_users'; + info: { + description: ''; + displayName: 'User'; + name: 'User'; + pluralName: 'users'; + singularName: 'user'; + }; + options: { + draftAndPublish: false; + }; + pluginOptions: { + 'content-manager': { + visible: false; + }; + 'content-type-builder': { + visible: false; + }; + }; + attributes: { + blocked: Schema.Attribute.Boolean & + Schema.Attribute.Private & + Schema.Attribute.DefaultTo; + createdAt: Schema.Attribute.DateTime; + createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + email: Schema.Attribute.Email & + Schema.Attribute.Required & + Schema.Attribute.Private & + Schema.Attribute.Unique & + Schema.Attribute.SetMinMaxLength<{ + minLength: 6; + }>; + firstname: Schema.Attribute.String & + Schema.Attribute.SetMinMaxLength<{ + minLength: 1; + }>; + isActive: Schema.Attribute.Boolean & + Schema.Attribute.Private & + Schema.Attribute.DefaultTo; + lastname: Schema.Attribute.String & + Schema.Attribute.SetMinMaxLength<{ + minLength: 1; + }>; + locale: Schema.Attribute.String & Schema.Attribute.Private; + localizations: Schema.Attribute.Relation<'oneToMany', 'admin::user'> & + Schema.Attribute.Private; + password: Schema.Attribute.Password & + Schema.Attribute.Private & + Schema.Attribute.SetMinMaxLength<{ + minLength: 6; + }>; + preferedLanguage: Schema.Attribute.String; + publishedAt: Schema.Attribute.DateTime; + registrationToken: Schema.Attribute.String & Schema.Attribute.Private; + resetPasswordToken: Schema.Attribute.String & Schema.Attribute.Private; + roles: Schema.Attribute.Relation<'manyToMany', 'admin::role'> & + Schema.Attribute.Private; + updatedAt: Schema.Attribute.DateTime; + updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + username: Schema.Attribute.String; + }; +} + +export interface ApiBlockBlock extends Struct.CollectionTypeSchema { + collectionName: 'blocks'; + info: { + description: ''; + displayName: 'Block'; + pluralName: 'blocks'; + singularName: 'block'; + }; + options: { + draftAndPublish: true; + }; + attributes: { + client: Schema.Attribute.Relation<'manyToOne', 'api::customer.customer'>; + createdAt: Schema.Attribute.DateTime; + createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + dateend: Schema.Attribute.DateTime & Schema.Attribute.Required; + datestart: Schema.Attribute.DateTime & Schema.Attribute.Required; + locale: Schema.Attribute.String & Schema.Attribute.Private; + localizations: Schema.Attribute.Relation<'oneToMany', 'api::block.block'> & + Schema.Attribute.Private; + master: Schema.Attribute.Relation<'manyToOne', 'api::customer.customer'>; + 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']> & + Schema.Attribute.DefaultTo<'created'>; + updatedAt: Schema.Attribute.DateTime; + updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + }; +} + +export interface ApiCustomerCustomer extends Struct.CollectionTypeSchema { + collectionName: 'customers'; + info: { + description: ''; + displayName: 'Customer'; + pluralName: 'customers'; + singularName: 'customer'; + }; + options: { + draftAndPublish: true; + }; + attributes: { + active: Schema.Attribute.Boolean & Schema.Attribute.DefaultTo; + blocks: Schema.Attribute.Relation<'oneToMany', 'api::block.block'>; + clients: Schema.Attribute.Relation<'manyToMany', 'api::customer.customer'>; + 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::customer.customer' + > & + Schema.Attribute.Private; + masters: Schema.Attribute.Relation<'manyToMany', 'api::customer.customer'>; + name: Schema.Attribute.String & Schema.Attribute.Required; + phone: Schema.Attribute.String & + Schema.Attribute.Required & + Schema.Attribute.Unique; + publishedAt: Schema.Attribute.DateTime; + role: Schema.Attribute.Enumeration<['client', 'master']> & + Schema.Attribute.Required; + slots: Schema.Attribute.Relation<'oneToMany', 'api::slot.slot'>; + telegramId: Schema.Attribute.BigInteger & Schema.Attribute.Unique; + updatedAt: Schema.Attribute.DateTime; + updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + }; +} + +export interface ApiOrderOrder extends Struct.CollectionTypeSchema { + collectionName: 'orders'; + info: { + displayName: 'Order'; + pluralName: 'orders'; + singularName: 'order'; + }; + 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::order.order'> & + Schema.Attribute.Private; + price: Schema.Attribute.Integer; + publishedAt: Schema.Attribute.DateTime; + service: Schema.Attribute.Text; + slot: Schema.Attribute.Relation<'oneToOne', 'api::slot.slot'>; + state: Schema.Attribute.Enumeration< + ['created', 'scheduled', 'approved', 'completed', 'cancelled'] + > & + Schema.Attribute.DefaultTo<'created'>; + updatedAt: Schema.Attribute.DateTime; + updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + }; +} + +export interface ApiSlotSlot extends Struct.CollectionTypeSchema { + collectionName: 'slots'; + info: { + description: ''; + displayName: 'Slot'; + pluralName: 'slots'; + singularName: 'slot'; + }; + options: { + draftAndPublish: true; + }; + attributes: { + createdAt: Schema.Attribute.DateTime; + createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + dateend: Schema.Attribute.DateTime & Schema.Attribute.Required; + datestart: Schema.Attribute.DateTime & Schema.Attribute.Required; + locale: Schema.Attribute.String & Schema.Attribute.Private; + 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'>; + publishedAt: Schema.Attribute.DateTime; + state: Schema.Attribute.Enumeration<['open', 'closed']>; + updatedAt: Schema.Attribute.DateTime; + updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + }; +} + +export interface PluginContentReleasesRelease + extends Struct.CollectionTypeSchema { + collectionName: 'strapi_releases'; + info: { + displayName: 'Release'; + pluralName: 'releases'; + singularName: 'release'; + }; + options: { + draftAndPublish: false; + }; + pluginOptions: { + 'content-manager': { + visible: false; + }; + 'content-type-builder': { + visible: false; + }; + }; + attributes: { + actions: Schema.Attribute.Relation< + 'oneToMany', + 'plugin::content-releases.release-action' + >; + 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', + 'plugin::content-releases.release' + > & + Schema.Attribute.Private; + name: Schema.Attribute.String & Schema.Attribute.Required; + publishedAt: Schema.Attribute.DateTime; + releasedAt: Schema.Attribute.DateTime; + scheduledAt: Schema.Attribute.DateTime; + status: Schema.Attribute.Enumeration< + ['ready', 'blocked', 'failed', 'done', 'empty'] + > & + Schema.Attribute.Required; + timezone: Schema.Attribute.String; + updatedAt: Schema.Attribute.DateTime; + updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + }; +} + +export interface PluginContentReleasesReleaseAction + extends Struct.CollectionTypeSchema { + collectionName: 'strapi_release_actions'; + info: { + displayName: 'Release Action'; + pluralName: 'release-actions'; + singularName: 'release-action'; + }; + options: { + draftAndPublish: false; + }; + pluginOptions: { + 'content-manager': { + visible: false; + }; + 'content-type-builder': { + visible: false; + }; + }; + attributes: { + contentType: Schema.Attribute.String & Schema.Attribute.Required; + createdAt: Schema.Attribute.DateTime; + createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + entryDocumentId: Schema.Attribute.String; + isEntryValid: Schema.Attribute.Boolean; + locale: Schema.Attribute.String & Schema.Attribute.Private; + localizations: Schema.Attribute.Relation< + 'oneToMany', + 'plugin::content-releases.release-action' + > & + Schema.Attribute.Private; + publishedAt: Schema.Attribute.DateTime; + release: Schema.Attribute.Relation< + 'manyToOne', + 'plugin::content-releases.release' + >; + type: Schema.Attribute.Enumeration<['publish', 'unpublish']> & + Schema.Attribute.Required; + updatedAt: Schema.Attribute.DateTime; + updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + }; +} + +export interface PluginI18NLocale extends Struct.CollectionTypeSchema { + collectionName: 'i18n_locale'; + info: { + collectionName: 'locales'; + description: ''; + displayName: 'Locale'; + pluralName: 'locales'; + singularName: 'locale'; + }; + options: { + draftAndPublish: false; + }; + pluginOptions: { + 'content-manager': { + visible: false; + }; + 'content-type-builder': { + visible: false; + }; + }; + attributes: { + code: Schema.Attribute.String & Schema.Attribute.Unique; + 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', + 'plugin::i18n.locale' + > & + Schema.Attribute.Private; + name: Schema.Attribute.String & + Schema.Attribute.SetMinMax< + { + max: 50; + min: 1; + }, + number + >; + publishedAt: Schema.Attribute.DateTime; + updatedAt: Schema.Attribute.DateTime; + updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + }; +} + +export interface PluginReviewWorkflowsWorkflow + extends Struct.CollectionTypeSchema { + collectionName: 'strapi_workflows'; + info: { + description: ''; + displayName: 'Workflow'; + name: 'Workflow'; + pluralName: 'workflows'; + singularName: 'workflow'; + }; + options: { + draftAndPublish: false; + }; + pluginOptions: { + 'content-manager': { + visible: false; + }; + 'content-type-builder': { + visible: false; + }; + }; + attributes: { + contentTypes: Schema.Attribute.JSON & + Schema.Attribute.Required & + Schema.Attribute.DefaultTo<'[]'>; + 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', + 'plugin::review-workflows.workflow' + > & + Schema.Attribute.Private; + name: Schema.Attribute.String & + Schema.Attribute.Required & + Schema.Attribute.Unique; + publishedAt: Schema.Attribute.DateTime; + stageRequiredToPublish: Schema.Attribute.Relation< + 'oneToOne', + 'plugin::review-workflows.workflow-stage' + >; + stages: Schema.Attribute.Relation< + 'oneToMany', + 'plugin::review-workflows.workflow-stage' + >; + updatedAt: Schema.Attribute.DateTime; + updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + }; +} + +export interface PluginReviewWorkflowsWorkflowStage + extends Struct.CollectionTypeSchema { + collectionName: 'strapi_workflows_stages'; + info: { + description: ''; + displayName: 'Stages'; + name: 'Workflow Stage'; + pluralName: 'workflow-stages'; + singularName: 'workflow-stage'; + }; + options: { + draftAndPublish: false; + version: '1.1.0'; + }; + pluginOptions: { + 'content-manager': { + visible: false; + }; + 'content-type-builder': { + visible: false; + }; + }; + attributes: { + color: Schema.Attribute.String & Schema.Attribute.DefaultTo<'#4945FF'>; + 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', + 'plugin::review-workflows.workflow-stage' + > & + Schema.Attribute.Private; + name: Schema.Attribute.String; + permissions: Schema.Attribute.Relation<'manyToMany', 'admin::permission'>; + publishedAt: Schema.Attribute.DateTime; + updatedAt: Schema.Attribute.DateTime; + updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + workflow: Schema.Attribute.Relation< + 'manyToOne', + 'plugin::review-workflows.workflow' + >; + }; +} + +export interface PluginUploadFile extends Struct.CollectionTypeSchema { + collectionName: 'files'; + info: { + description: ''; + displayName: 'File'; + pluralName: 'files'; + singularName: 'file'; + }; + options: { + draftAndPublish: false; + }; + pluginOptions: { + 'content-manager': { + visible: false; + }; + 'content-type-builder': { + visible: false; + }; + }; + attributes: { + alternativeText: Schema.Attribute.String; + caption: Schema.Attribute.String; + createdAt: Schema.Attribute.DateTime; + createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + ext: Schema.Attribute.String; + folder: Schema.Attribute.Relation<'manyToOne', 'plugin::upload.folder'> & + Schema.Attribute.Private; + folderPath: Schema.Attribute.String & + Schema.Attribute.Required & + Schema.Attribute.Private & + Schema.Attribute.SetMinMaxLength<{ + minLength: 1; + }>; + formats: Schema.Attribute.JSON; + hash: Schema.Attribute.String & Schema.Attribute.Required; + height: Schema.Attribute.Integer; + locale: Schema.Attribute.String & Schema.Attribute.Private; + localizations: Schema.Attribute.Relation< + 'oneToMany', + 'plugin::upload.file' + > & + Schema.Attribute.Private; + mime: Schema.Attribute.String & Schema.Attribute.Required; + name: Schema.Attribute.String & Schema.Attribute.Required; + previewUrl: Schema.Attribute.String; + provider: Schema.Attribute.String & Schema.Attribute.Required; + provider_metadata: Schema.Attribute.JSON; + publishedAt: Schema.Attribute.DateTime; + related: Schema.Attribute.Relation<'morphToMany'>; + size: Schema.Attribute.Decimal & Schema.Attribute.Required; + updatedAt: Schema.Attribute.DateTime; + updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + url: Schema.Attribute.String & Schema.Attribute.Required; + width: Schema.Attribute.Integer; + }; +} + +export interface PluginUploadFolder extends Struct.CollectionTypeSchema { + collectionName: 'upload_folders'; + info: { + displayName: 'Folder'; + pluralName: 'folders'; + singularName: 'folder'; + }; + options: { + draftAndPublish: false; + }; + pluginOptions: { + 'content-manager': { + visible: false; + }; + 'content-type-builder': { + visible: false; + }; + }; + attributes: { + children: Schema.Attribute.Relation<'oneToMany', 'plugin::upload.folder'>; + createdAt: Schema.Attribute.DateTime; + createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + files: Schema.Attribute.Relation<'oneToMany', 'plugin::upload.file'>; + locale: Schema.Attribute.String & Schema.Attribute.Private; + localizations: Schema.Attribute.Relation< + 'oneToMany', + 'plugin::upload.folder' + > & + Schema.Attribute.Private; + name: Schema.Attribute.String & + Schema.Attribute.Required & + Schema.Attribute.SetMinMaxLength<{ + minLength: 1; + }>; + parent: Schema.Attribute.Relation<'manyToOne', 'plugin::upload.folder'>; + path: Schema.Attribute.String & + Schema.Attribute.Required & + Schema.Attribute.SetMinMaxLength<{ + minLength: 1; + }>; + pathId: Schema.Attribute.Integer & + Schema.Attribute.Required & + Schema.Attribute.Unique; + publishedAt: Schema.Attribute.DateTime; + updatedAt: Schema.Attribute.DateTime; + updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + }; +} + +export interface PluginUsersPermissionsPermission + extends Struct.CollectionTypeSchema { + collectionName: 'up_permissions'; + info: { + description: ''; + displayName: 'Permission'; + name: 'permission'; + pluralName: 'permissions'; + singularName: 'permission'; + }; + options: { + draftAndPublish: false; + }; + pluginOptions: { + 'content-manager': { + visible: false; + }; + 'content-type-builder': { + visible: false; + }; + }; + attributes: { + action: Schema.Attribute.String & Schema.Attribute.Required; + 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', + 'plugin::users-permissions.permission' + > & + Schema.Attribute.Private; + publishedAt: Schema.Attribute.DateTime; + role: Schema.Attribute.Relation< + 'manyToOne', + 'plugin::users-permissions.role' + >; + updatedAt: Schema.Attribute.DateTime; + updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + }; +} + +export interface PluginUsersPermissionsRole + extends Struct.CollectionTypeSchema { + collectionName: 'up_roles'; + info: { + description: ''; + displayName: 'Role'; + name: 'role'; + pluralName: 'roles'; + singularName: 'role'; + }; + options: { + draftAndPublish: false; + }; + pluginOptions: { + 'content-manager': { + visible: false; + }; + 'content-type-builder': { + visible: false; + }; + }; + attributes: { + createdAt: Schema.Attribute.DateTime; + createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + description: Schema.Attribute.String; + locale: Schema.Attribute.String & Schema.Attribute.Private; + localizations: Schema.Attribute.Relation< + 'oneToMany', + 'plugin::users-permissions.role' + > & + Schema.Attribute.Private; + name: Schema.Attribute.String & + Schema.Attribute.Required & + Schema.Attribute.SetMinMaxLength<{ + minLength: 3; + }>; + permissions: Schema.Attribute.Relation< + 'oneToMany', + 'plugin::users-permissions.permission' + >; + publishedAt: Schema.Attribute.DateTime; + type: Schema.Attribute.String & Schema.Attribute.Unique; + updatedAt: Schema.Attribute.DateTime; + updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + users: Schema.Attribute.Relation< + 'oneToMany', + 'plugin::users-permissions.user' + >; + }; +} + +export interface PluginUsersPermissionsUser + extends Struct.CollectionTypeSchema { + collectionName: 'up_users'; + info: { + description: ''; + displayName: 'User'; + name: 'user'; + pluralName: 'users'; + singularName: 'user'; + }; + options: { + draftAndPublish: false; + timestamps: true; + }; + attributes: { + blocked: Schema.Attribute.Boolean & Schema.Attribute.DefaultTo; + confirmationToken: Schema.Attribute.String & Schema.Attribute.Private; + confirmed: Schema.Attribute.Boolean & Schema.Attribute.DefaultTo; + createdAt: Schema.Attribute.DateTime; + createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + email: Schema.Attribute.Email & + Schema.Attribute.Required & + Schema.Attribute.SetMinMaxLength<{ + minLength: 6; + }>; + locale: Schema.Attribute.String & Schema.Attribute.Private; + localizations: Schema.Attribute.Relation< + 'oneToMany', + 'plugin::users-permissions.user' + > & + Schema.Attribute.Private; + password: Schema.Attribute.Password & + Schema.Attribute.Private & + Schema.Attribute.SetMinMaxLength<{ + minLength: 6; + }>; + provider: Schema.Attribute.String; + publishedAt: Schema.Attribute.DateTime; + resetPasswordToken: Schema.Attribute.String & Schema.Attribute.Private; + role: Schema.Attribute.Relation< + 'manyToOne', + 'plugin::users-permissions.role' + >; + updatedAt: Schema.Attribute.DateTime; + updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & + Schema.Attribute.Private; + username: Schema.Attribute.String & + Schema.Attribute.Required & + Schema.Attribute.Unique & + Schema.Attribute.SetMinMaxLength<{ + minLength: 3; + }>; + }; +} + +declare module '@strapi/strapi' { + export module Public { + export interface ContentTypeSchemas { + 'admin::api-token': AdminApiToken; + 'admin::api-token-permission': AdminApiTokenPermission; + 'admin::permission': AdminPermission; + 'admin::role': AdminRole; + 'admin::transfer-token': AdminTransferToken; + 'admin::transfer-token-permission': AdminTransferTokenPermission; + 'admin::user': AdminUser; + 'api::block.block': ApiBlockBlock; + 'api::customer.customer': ApiCustomerCustomer; + 'api::order.order': ApiOrderOrder; + 'api::slot.slot': ApiSlotSlot; + 'plugin::content-releases.release': PluginContentReleasesRelease; + 'plugin::content-releases.release-action': PluginContentReleasesReleaseAction; + 'plugin::i18n.locale': PluginI18NLocale; + 'plugin::review-workflows.workflow': PluginReviewWorkflowsWorkflow; + 'plugin::review-workflows.workflow-stage': PluginReviewWorkflowsWorkflowStage; + 'plugin::upload.file': PluginUploadFile; + 'plugin::upload.folder': PluginUploadFolder; + 'plugin::users-permissions.permission': PluginUsersPermissionsPermission; + 'plugin::users-permissions.role': PluginUsersPermissionsRole; + 'plugin::users-permissions.user': PluginUsersPermissionsUser; + } + } +}