Compare commits

..

10 Commits

Author SHA1 Message Date
vchikalkin
d4ea41a910 subscription settings: add field proEnabled 2025-09-17 14:45:22 +03:00
vchikalkin
2cebfe90bd add new entity customer_setting 2025-09-16 15:30:07 +03:00
vchikalkin
67da211238 SubscriptionHistory: change type to string 2025-09-16 12:30:31 +03:00
vchikalkin
09e9e178c5 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.
2025-09-16 11:53:18 +03:00
vchikalkin
250921344b SubscriptionPrice: rename price -> amount 2025-09-11 13:21:26 +03:00
vchikalkin
eb5bf5eee6 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.
2025-09-11 11:36:55 +03:00
vchikalkin
7436ad181b 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.
2025-09-08 13:22:56 +03:00
vchikalkin
0cb35adefa 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.
2025-09-02 19:02:08 +03:00
vchikalkin
d64432db46 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.
2025-08-27 18:58:33 +03:00
vchikalkin
2f1fbb8824 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.
2025-08-26 18:53:50 +03:00
4 changed files with 1 additions and 39 deletions

View File

@ -1,28 +0,0 @@
services:
postgres:
image: postgres
ports:
- '127.0.0.1:5432:5432'
environment:
POSTGRES_USER: ${DATABASE_USERNAME}
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
POSTGRES_DB: ${DATABASE_NAME}
strapi:
build: .
ports:
- '127.0.0.1:1337:1337'
environment:
APP_KEYS: ${APP_KEYS}
API_TOKEN_SALT: ${API_TOKEN_SALT}
ADMIN_JWT_SECRET: ${ADMIN_JWT_SECRET}
TRANSFER_TOKEN_SALT: ${TRANSFER_TOKEN_SALT}
JWT_SECRET: ${JWT_SECRET}
DATABASE_HOST: ${DATABASE_HOST}
DATABASE_PORT: ${DATABASE_PORT}
DATABASE_NAME: ${DATABASE_NAME}
DATABASE_USERNAME: ${DATABASE_USERNAME}
DATABASE_PASSWORD: ${DATABASE_PASSWORD}
DATABASE_SSL: 'false'
BOT_TOKEN: ${BOT_TOKEN}

View File

@ -17,11 +17,6 @@
"maxLength": 100, "maxLength": 100,
"required": true "required": true
}, },
"surname": {
"type": "string",
"maxLength": 100,
"required": false
},
"telegramId": { "telegramId": {
"type": "biginteger", "type": "biginteger",
"unique": true "unique": true

View File

@ -16,7 +16,6 @@
"required": true, "required": true,
"enum": [ "enum": [
"trial", "trial",
"day",
"week", "week",
"month", "month",
"half_year", "half_year",

View File

@ -431,10 +431,6 @@ export interface ApiCustomerCustomer extends Struct.CollectionTypeSchema {
'oneToMany', 'oneToMany',
'api::subscription.subscription' 'api::subscription.subscription'
>; >;
surname: Schema.Attribute.String &
Schema.Attribute.SetMinMaxLength<{
maxLength: 100;
}>;
telegramId: Schema.Attribute.BigInteger & Schema.Attribute.Unique; telegramId: Schema.Attribute.BigInteger & Schema.Attribute.Unique;
updatedAt: Schema.Attribute.DateTime; updatedAt: Schema.Attribute.DateTime;
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
@ -669,7 +665,7 @@ export interface ApiSubscriptionPriceSubscriptionPrice
> & > &
Schema.Attribute.Private; Schema.Attribute.Private;
period: Schema.Attribute.Enumeration< period: Schema.Attribute.Enumeration<
['trial', 'day', 'week', 'month', 'half_year', 'year'] ['trial', 'week', 'month', 'half_year', 'year']
> & > &
Schema.Attribute.Required; Schema.Attribute.Required;
publishedAt: Schema.Attribute.DateTime; publishedAt: Schema.Attribute.DateTime;