72 lines
2.2 KiB
PHP
72 lines
2.2 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Database\Seeders;
|
|
|
|
use App\Enums\Plan\Slug;
|
|
use App\Models\Plan;
|
|
use Illuminate\Database\Seeder;
|
|
|
|
class PlanSeeder extends Seeder
|
|
{
|
|
/**
|
|
* Run the database seeds.
|
|
*/
|
|
public function run(): void
|
|
{
|
|
$plans = [
|
|
[
|
|
'slug' => Slug::Starter,
|
|
'name' => 'Starter',
|
|
'stripe_monthly_price_id' => env('STRIPE_STARTER_MONTHLY'),
|
|
'stripe_yearly_price_id' => env('STRIPE_STARTER_YEARLY'),
|
|
'social_account_limit' => 5,
|
|
'member_limit' => 1,
|
|
'workspace_limit' => 1,
|
|
'monthly_credits_limit' => 1000,
|
|
'sort' => 1,
|
|
],
|
|
[
|
|
'slug' => Slug::Plus,
|
|
'name' => 'Plus',
|
|
'stripe_monthly_price_id' => env('STRIPE_PLUS_MONTHLY'),
|
|
'stripe_yearly_price_id' => env('STRIPE_PLUS_YEARLY'),
|
|
'social_account_limit' => 10,
|
|
'member_limit' => 5,
|
|
'workspace_limit' => 5,
|
|
'monthly_credits_limit' => 2000,
|
|
'sort' => 2,
|
|
],
|
|
[
|
|
'slug' => Slug::Pro,
|
|
'name' => 'Pro',
|
|
'stripe_monthly_price_id' => env('STRIPE_PRO_MONTHLY'),
|
|
'stripe_yearly_price_id' => env('STRIPE_PRO_YEARLY'),
|
|
'social_account_limit' => 30,
|
|
'member_limit' => 15,
|
|
'workspace_limit' => 15,
|
|
'monthly_credits_limit' => 5000,
|
|
'sort' => 3,
|
|
],
|
|
[
|
|
'slug' => Slug::Max,
|
|
'name' => 'Max',
|
|
'stripe_monthly_price_id' => env('STRIPE_MAX_MONTHLY'),
|
|
'stripe_yearly_price_id' => env('STRIPE_MAX_YEARLY'),
|
|
'social_account_limit' => 100,
|
|
'member_limit' => 20,
|
|
'workspace_limit' => 50,
|
|
'monthly_credits_limit' => 15000,
|
|
'sort' => 4,
|
|
],
|
|
];
|
|
|
|
foreach ($plans as $plan) {
|
|
Plan::updateOrCreate(
|
|
['slug' => $plan['slug']],
|
|
$plan,
|
|
);
|
|
}
|
|
}
|
|
}
|