24 Commits

Author SHA1 Message Date
vchikalkin
0e58a8cef7 subscription-price: add period 'day' 2025-10-09 16:19:03 +03:00
vchikalkin
a63eff9f46 customer: add field surname 2025-10-07 11:42:27 +03:00
Vlad Chikalkin
e0a9f55eeb
Feature/pro subscription (#8)
* feat: add subscription relation to customer schema and new subscription-related interfaces

- Introduced a one-to-one relation for 'subscription' in the customer schema to link customers with their subscriptions.
- Added new TypeScript interfaces for subscription-related entities, including Subscription, SubscriptionHistory, SubscriptionPrice, and SubscriptionSetting, ensuring type safety and consistency across the application.

* refactor: remove unused fields from subscription schema and TypeScript definitions

- Deleted the 'referralCode', 'subscription', 'referralCount', and 'referredBy' fields from the subscription schema to streamline the data model.
- Updated TypeScript definitions to reflect these changes, ensuring type safety and consistency across the application.

* feat: add 'days' field to subscription price schema and update TypeScript definitions

- Introduced a new 'days' integer field in the subscription price schema, marked as required to enhance subscription duration tracking.
- Removed unused 'description', 'trialPeriodDays', and 'trialEnabled' fields from the subscription setting schema to streamline the data model.
- Updated TypeScript definitions to reflect these changes, ensuring type safety and consistency across the application.

* refactor: rename relation fields in customer schema and update TypeScript definitions

- Changed 'clients' to 'invited' and 'masters' to 'invitedBy' in the customer schema to better reflect their purpose in the data model.
- Updated TypeScript definitions to include the new relation fields, ensuring type safety and consistency across the application.

* feat: add subscription_rewards relation to customer and subscription history schemas, and update TypeScript definitions

- Introduced a new 'subscription_rewards' relation in both the customer and subscription history schemas to link them with subscription rewards.
- Updated the 'expiresAt' field in the subscription schema to be required, ensuring better data integrity.
- Adjusted the default value for 'maxOrdersPerMonth' in the subscription setting schema from 30 to 20, and removed unused fields to streamline the model.
- Updated TypeScript definitions to reflect these changes, ensuring type safety and consistency across the application.

* SubscriptionPrice: rename price -> amount

* refactor: remove block-related schemas, controllers, routes, and services

- Deleted the block schema, controller, routes, and services to streamline the API structure.
- Updated customer and order schemas to remove references to the block relation, ensuring data integrity and clarity.
- Adjusted TypeScript definitions to reflect the removal of block-related entities, maintaining type safety across the application.

* SubscriptionHistory: change type to string

* add new entity customer_setting

* subscription settings: add field proEnabled
2025-09-17 14:46:39 +03:00
Vlad Chikalkin
ccd0947334
feat: add bannedUntil field to customer schema (#7)
- Introduced a new 'bannedUntil' datetime field in the customer schema to track when a customer is banned until.
- Updated TypeScript definitions to include the new 'bannedUntil' attribute, ensuring type safety and consistency across the application.
2025-08-26 13:18:12 +03:00
vchikalkin
01fbd1c696 feat: add price and description fields to service schema
- Introduced new fields 'price' and 'description' in the service schema to enhance service details.
- Updated TypeScript definitions to include these new attributes, ensuring type safety and consistency across the application.
2025-08-20 17:23:33 +03:00
vchikalkin
50f23f67b3 feat: update customer and service schemas to enforce maxLength and required attributes
- Added maxLength constraints to 'name' and 'phone' attributes in customer and service schemas.
- Marked 'name' as required in both schemas.
- Updated TypeScript definitions to reflect these changes.
2025-08-02 11:15:21 +03:00
Vlad Chikalkin
d592c9cf31
feat: add 'active' boolean attribute to content type schema and TypeScript definitions (#5) 2025-08-01 19:53:47 +03:00
vchikalkin
7f57b03c88 order: remove field 'price' 2025-07-22 13:33:52 +03:00
vchikalkin
6dc36ebe89 refactor: remove service_description field from order schema and TypeScript definitions 2025-07-19 13:46:20 +03:00
Vlad Chikalkin
b0171aa079
Refactor/migrate to datetime (#2)
* feat: refactor order and slot lifecycles to use datetime fields for time validation

* refactor: remove time fields from order and slot schemas to streamline data structure

* fix: correct time validation logic in order and slot lifecycles to ensure proper datetime comparisons

* fix: update order lifecycle validation to exclude only 'cancelled' state

* fix: add validation to ensure order times fall within the specified slot boundaries

* feat: integrate dayjs for improved datetime handling in order lifecycles
Нельзя завершить запись до её наступления

* fix: enhance datetime validation in order and slot lifecycles to ensure accurate comparisons

* fix: standardize error messages in order and slot lifecycles for better clarity
2025-07-18 17:12:57 +03:00
vchikalkin
065da3e275 order: rename cancellation ->cancelling 2025-06-24 12:32:36 +03:00
vchikalkin
af4196c685 order: add state 'cancellation' 2025-06-24 11:35:34 +03:00
vchikalkin
e419cd811c packages: upgrade strapi version 2025-06-10 11:24:30 +03:00
vchikalkin
d62b9ad4b0 order: delete date field 2025-06-10 11:19:13 +03:00
vchikalkin
797da91b8e service: add field 'duration' 2025-05-08 17:40:15 +03:00
vchikalkin
3c2c7701b1 customer::service relations 2025-05-07 17:46:58 +03:00
vchikalkin
554fa6adc0 add type 'service' 2025-02-12 11:16:44 +03:00
vchikalkin
b30e9e46fb fix fields types & names 2025-02-11 11:40:37 +03:00
vchikalkin
efe34ba945 upgrade for slots & orders functional 2025-01-30 18:56:18 +03:00
vchikalkin
844365c40a upgrade entities 2025-01-27 19:33:49 +03:00
vchikalkin
4001b68491 customer.active=false by default 2025-01-10 19:17:56 +03:00
vchikalkin
2580fedfd6 customer: add field "photoUrl" 2025-01-01 16:05:09 +03:00
vchikalkin
d14a8279c0 правки anna k 2024-12-04 19:04:41 +03:00
vchikalkin
d24eea9e25 day 2 2024-11-28 23:29:05 +03:00