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.
This commit is contained in:
vchikalkin 2025-09-02 19:02:08 +03:00
parent d64432db46
commit 0cb35adefa
3 changed files with 5 additions and 17 deletions

View File

@ -38,6 +38,10 @@
},
"description": {
"type": "text"
},
"days": {
"type": "integer",
"required": true
}
}
}

View File

@ -25,18 +25,6 @@
"type": "integer",
"required": true,
"default": 1
},
"description": {
"type": "text"
},
"trialPeriodDays": {
"type": "integer",
"required": true,
"default": 7
},
"trialEnabled": {
"type": "boolean",
"required": true
}
}
}

View File

@ -680,6 +680,7 @@ export interface ApiSubscriptionPriceSubscriptionPrice
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private;
currency: Schema.Attribute.String & Schema.Attribute.DefaultTo<'RUB'>;
days: Schema.Attribute.Integer & Schema.Attribute.Required;
description: Schema.Attribute.Text;
isActive: Schema.Attribute.Boolean & Schema.Attribute.DefaultTo<true>;
locale: Schema.Attribute.String & Schema.Attribute.Private;
@ -715,7 +716,6 @@ export interface ApiSubscriptionSettingSubscriptionSetting
createdAt: Schema.Attribute.DateTime;
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private;
description: Schema.Attribute.Text;
locale: Schema.Attribute.String & Schema.Attribute.Private;
localizations: Schema.Attribute.Relation<
'oneToMany',
@ -732,10 +732,6 @@ export interface ApiSubscriptionSettingSubscriptionSetting
referralRewardDays: Schema.Attribute.Integer &
Schema.Attribute.Required &
Schema.Attribute.DefaultTo<3>;
trialEnabled: Schema.Attribute.Boolean & Schema.Attribute.Required;
trialPeriodDays: Schema.Attribute.Integer &
Schema.Attribute.Required &
Schema.Attribute.DefaultTo<7>;
updatedAt: Schema.Attribute.DateTime;
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private;