Update: 2026-05-05 00:12:11

This commit is contained in:
Hamza-Ayed
2026-05-05 00:12:11 +03:00
parent 79c88c47cc
commit ed525250c2
2 changed files with 18 additions and 10 deletions

View File

@@ -15,12 +15,13 @@ return [
'max_invoices_month' => 15,
'max_users' => 1,
'price_jod' => 0.00,
'ai_features' => false,
'jofotara_enabled' => false,
'ai_features' => true,
'jofotara_enabled' => true,
'badge_color' => 'gray',
'description_ar' => 'للتجربة الأولية — شركة واحدة و15 فاتورة شهرياً',
'features' => [
'استخراج بيانات الفواتير يدوياً',
'استخراج الفواتير بالذكاء الاصطناعي',
'الربط المباشر مع جوفوترة',
'شركة واحدة فقط',
'15 فاتورة شهرياً',
'مستخدم واحد',
@@ -35,11 +36,12 @@ return [
'max_users' => 3,
'price_jod' => 15.00,
'ai_features' => true,
'jofotara_enabled' => false,
'jofotara_enabled' => true,
'badge_color' => 'blue',
'description_ar' => 'للمحاسبين المستقلين — ذكاء اصطناعي + 3 شركات',
'description_ar' => 'للمحاسبين المستقلين — 3 شركات',
'features' => [
'استخراج ذكي بالـ AI',
'استخراج الفواتير بالذكاء الاصطناعي',
'الربط المباشر مع جوفوترة',
'حتى 3 شركات',
'100 فاتورة شهرياً',
'3 مستخدمين',

View File

@@ -42,9 +42,12 @@ $migrations = [
sort_order INT DEFAULT 0,
features_json JSON NULL,
created_at DATETIME DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
",
// 4.5 Fix collation if table already exists
'subscription_plans_collation_fix' => "ALTER TABLE subscription_plans CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci",
// 5. Ensure subscriptions table exists with all needed columns
'subscriptions_table' => "
CREATE TABLE IF NOT EXISTS subscriptions (
@@ -64,9 +67,12 @@ $migrations = [
updated_at DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
FOREIGN KEY (tenant_id) REFERENCES tenants(id) ON DELETE CASCADE,
FOREIGN KEY (plan_id) REFERENCES subscription_plans(id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
",
// 5.5 Fix collation if table already exists
'subscriptions_collation_fix' => "ALTER TABLE subscriptions CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci",
// 6. Add plan_id column to subscriptions if upgrading from old schema
'subscriptions_plan_id' => "ALTER TABLE subscriptions ADD COLUMN plan_id VARCHAR(20) NOT NULL DEFAULT 'free'",
@@ -108,8 +114,8 @@ echo "\n────────────────────────
echo "\n📦 Seeding subscription plans...\n";
$plans = [
['free', 'مجانية', 'Free', 1, 15, 1, 0.00, 0, 0, 10],
['basic', 'أساسية', 'Basic', 3, 100, 3, 15.00, 1, 0, 20],
['free', 'مجانية', 'Free', 1, 15, 1, 0.00, 1, 1, 10],
['basic', 'أساسية', 'Basic', 3, 100, 3, 15.00, 1, 1, 20],
['office', 'مكتبية', 'Office', 10, 500, 10, 45.00, 1, 1, 30],
['pro', 'احترافية', 'Pro', 25, 2000, 25, 99.00, 1, 1, 40],
['enterprise', 'مؤسسية', 'Enterprise', 999, 99999, 999, 249.00, 1, 1, 50],