From 67da21123832776fb52fcdeeb48e0f2142bf2a23 Mon Sep 17 00:00:00 2001 From: vchikalkin Date: Tue, 16 Sep 2025 12:30:31 +0300 Subject: [PATCH] SubscriptionHistory: change type to string --- .../subscription-history/schema.json | 15 ++++----------- types/generated/contentTypes.d.ts | 8 ++++---- 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/src/api/subscription-history/content-types/subscription-history/schema.json b/src/api/subscription-history/content-types/subscription-history/schema.json index 8c638d0..0ce4a4f 100644 --- a/src/api/subscription-history/content-types/subscription-history/schema.json +++ b/src/api/subscription-history/content-types/subscription-history/schema.json @@ -22,17 +22,6 @@ "relation": "oneToOne", "target": "api::subscription-price.subscription-price" }, - "period": { - "type": "enumeration", - "required": true, - "enum": [ - "trial", - "week", - "month", - "half_year", - "year" - ] - }, "amount": { "type": "decimal", "required": true @@ -69,6 +58,10 @@ }, "description": { "type": "text" + }, + "period": { + "type": "string", + "maxLength": 20 } } } diff --git a/types/generated/contentTypes.d.ts b/types/generated/contentTypes.d.ts index 5d60b18..1ae836e 100644 --- a/types/generated/contentTypes.d.ts +++ b/types/generated/contentTypes.d.ts @@ -578,10 +578,10 @@ export interface ApiSubscriptionHistorySubscriptionHistory > & Schema.Attribute.Private; paymentId: Schema.Attribute.String; - period: Schema.Attribute.Enumeration< - ['trial', 'week', 'month', 'half_year', 'year'] - > & - Schema.Attribute.Required; + period: Schema.Attribute.String & + Schema.Attribute.SetMinMaxLength<{ + maxLength: 20; + }>; publishedAt: Schema.Attribute.DateTime; source: Schema.Attribute.Enumeration< ['payment', 'trial', 'reward', 'admin', 'renewal']