diff --git a/src/api/customer/content-types/customer/schema.json b/src/api/customer/content-types/customer/schema.json index dce0a18..36c1a09 100644 --- a/src/api/customer/content-types/customer/schema.json +++ b/src/api/customer/content-types/customer/schema.json @@ -68,14 +68,14 @@ "target": "api::order.order", "mappedBy": "client" }, - "setting": { - "type": "relation", - "relation": "oneToOne", - "target": "api::setting.setting", - "mappedBy": "customer" - }, "photoUrl": { "type": "string" + }, + "masterOrders": { + "type": "relation", + "relation": "oneToMany", + "target": "api::order.order", + "mappedBy": "master" } } } diff --git a/src/api/order/content-types/order/schema.json b/src/api/order/content-types/order/schema.json index 3ab7d42..137c3fc 100644 --- a/src/api/order/content-types/order/schema.json +++ b/src/api/order/content-types/order/schema.json @@ -46,6 +46,15 @@ "relation": "manyToOne", "target": "api::block.block", "inversedBy": "orders" + }, + "orderNumber": { + "type": "integer" + }, + "master": { + "type": "relation", + "relation": "manyToOne", + "target": "api::customer.customer", + "inversedBy": "masterOrders" } } } diff --git a/src/api/setting/content-types/setting/schema.json b/src/api/setting/content-types/setting/schema.json index 893cd6a..6c6d10a 100644 --- a/src/api/setting/content-types/setting/schema.json +++ b/src/api/setting/content-types/setting/schema.json @@ -11,12 +11,6 @@ }, "pluginOptions": {}, "attributes": { - "customer": { - "type": "relation", - "relation": "oneToOne", - "target": "api::customer.customer", - "inversedBy": "setting" - }, "recordingByBlocks": { "type": "boolean", "default": false diff --git a/start.cmd b/start.cmd new file mode 100644 index 0000000..0f5e969 --- /dev/null +++ b/start.cmd @@ -0,0 +1 @@ +pnpm develop \ No newline at end of file diff --git a/types/generated/contentTypes.d.ts b/types/generated/contentTypes.d.ts index 4a14717..9b58c16 100644 --- a/types/generated/contentTypes.d.ts +++ b/types/generated/contentTypes.d.ts @@ -429,6 +429,7 @@ export interface ApiCustomerCustomer extends Struct.CollectionTypeSchema { 'api::customer.customer' > & Schema.Attribute.Private; + masterOrders: Schema.Attribute.Relation<'oneToMany', 'api::order.order'>; masters: Schema.Attribute.Relation<'manyToMany', 'api::customer.customer'>; name: Schema.Attribute.String & Schema.Attribute.Required; orders: Schema.Attribute.Relation<'oneToMany', 'api::order.order'>; @@ -439,7 +440,6 @@ export interface ApiCustomerCustomer extends Struct.CollectionTypeSchema { 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; @@ -468,6 +468,8 @@ export interface ApiOrderOrder extends Struct.CollectionTypeSchema { locale: Schema.Attribute.String & Schema.Attribute.Private; localizations: Schema.Attribute.Relation<'oneToMany', 'api::order.order'> & Schema.Attribute.Private; + master: Schema.Attribute.Relation<'manyToOne', 'api::customer.customer'>; + orderNumber: Schema.Attribute.Integer; price: Schema.Attribute.Integer; publishedAt: Schema.Attribute.DateTime; service: Schema.Attribute.Text; @@ -496,7 +498,6 @@ export interface ApiSettingSetting extends Struct.CollectionTypeSchema { 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',