ctrlpanel/database/seeders/Seeds/ConfigurationSeeder.php

87 lines
2.6 KiB
PHP
Raw Normal View History

2021-06-05 09:26:32 +00:00
<?php
2021-06-22 15:13:24 +00:00
namespace Database\Seeders\Seeds;
2021-06-05 09:26:32 +00:00
use App\Models\Configuration;
use Illuminate\Database\Seeder;
class ConfigurationSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
//initials
Configuration::firstOrCreate([
'key' => 'INITIAL_CREDITS',
], [
2021-06-05 09:26:32 +00:00
'value' => '250',
'type' => 'integer',
'description' => 'The initial amount of credits the user starts with.'
2021-06-05 09:26:32 +00:00
]);
Configuration::firstOrCreate([
'key' => 'INITIAL_SERVER_LIMIT',
], [
2021-06-05 09:26:32 +00:00
'value' => '1',
'type' => 'integer',
'description' => 'The initial server limit the user starts with.'
2021-06-05 09:26:32 +00:00
]);
//verify email event
Configuration::firstOrCreate([
'key' => 'CREDITS_REWARD_AFTER_VERIFY_EMAIL',
], [
2021-06-05 09:26:32 +00:00
'value' => '250',
'type' => 'integer',
'description' => 'Increase in credits after the user has verified their email account.'
2021-06-05 09:26:32 +00:00
]);
Configuration::firstOrCreate([
'key' => 'SERVER_LIMIT_REWARD_AFTER_VERIFY_EMAIL',
], [
2021-06-05 09:26:32 +00:00
'value' => '2',
'type' => 'integer',
'description' => 'Increase in server limit after the user has verified their email account.'
2021-06-05 09:26:32 +00:00
]);
//verify discord event
Configuration::firstOrCreate([
2021-06-05 09:26:32 +00:00
'key' => 'CREDITS_REWARD_AFTER_VERIFY_DISCORD',
] , [
2021-06-05 09:26:32 +00:00
'value' => '375',
'type' => 'integer',
'description' => 'Increase in credits after the user has verified their discord account.'
2021-06-05 09:26:32 +00:00
]);
Configuration::firstOrCreate([
'key' => 'SERVER_LIMIT_REWARD_AFTER_VERIFY_DISCORD',
], [
2021-06-05 09:26:32 +00:00
'value' => '2',
'type' => 'integer',
'description' => 'Increase in server limit after the user has verified their discord account.'
2021-06-05 09:26:32 +00:00
]);
//other
Configuration::firstOrCreate([
'key' => 'MINIMUM_REQUIRED_CREDITS_TO_MAKE_SERVER',
], [
2021-06-05 09:26:32 +00:00
'value' => '50',
'type' => 'integer',
'description' => 'The minimum amount of credits the user would need to make a server.'
]);
//purchasing
Configuration::firstOrCreate([
'key' => 'SERVER_LIMIT_AFTER_IRL_PURCHASE',
], [
'value' => '10',
'type' => 'integer',
'description' => 'Sets the users server limit to this amount after purchasing with money, set to 0 to ignore this.',
2021-06-05 09:26:32 +00:00
]);
}
}