ConfigurationSeeder.php 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <?php
  2. namespace Database\Seeders\Seeds;
  3. use App\Models\Configuration;
  4. use Illuminate\Database\Seeder;
  5. class ConfigurationSeeder extends Seeder
  6. {
  7. /**
  8. * Run the database seeds.
  9. *
  10. * @return void
  11. */
  12. public function run()
  13. {
  14. //initials
  15. Configuration::firstOrCreate([
  16. 'key' => 'INITIAL_CREDITS',
  17. ], [
  18. 'value' => '250',
  19. 'type' => 'integer',
  20. 'description' => 'The initial amount of credits the user starts with.'
  21. ]);
  22. Configuration::firstOrCreate([
  23. 'key' => 'INITIAL_SERVER_LIMIT',
  24. ], [
  25. 'value' => '1',
  26. 'type' => 'integer',
  27. 'description' => 'The initial server limit the user starts with.'
  28. ]);
  29. //verify email event
  30. Configuration::firstOrCreate([
  31. 'key' => 'CREDITS_REWARD_AFTER_VERIFY_EMAIL',
  32. ], [
  33. 'value' => '250',
  34. 'type' => 'integer',
  35. 'description' => 'Increase in credits after the user has verified their email account.'
  36. ]);
  37. Configuration::firstOrCreate([
  38. 'key' => 'SERVER_LIMIT_REWARD_AFTER_VERIFY_EMAIL',
  39. ], [
  40. 'value' => '2',
  41. 'type' => 'integer',
  42. 'description' => 'Increase in server limit after the user has verified their email account.'
  43. ]);
  44. //verify discord event
  45. Configuration::firstOrCreate([
  46. 'key' => 'CREDITS_REWARD_AFTER_VERIFY_DISCORD',
  47. ] , [
  48. 'value' => '375',
  49. 'type' => 'integer',
  50. 'description' => 'Increase in credits after the user has verified their discord account.'
  51. ]);
  52. Configuration::firstOrCreate([
  53. 'key' => 'SERVER_LIMIT_REWARD_AFTER_VERIFY_DISCORD',
  54. ], [
  55. 'value' => '2',
  56. 'type' => 'integer',
  57. 'description' => 'Increase in server limit after the user has verified their discord account.'
  58. ]);
  59. //other
  60. Configuration::firstOrCreate([
  61. 'key' => 'MINIMUM_REQUIRED_CREDITS_TO_MAKE_SERVER',
  62. ], [
  63. 'value' => '50',
  64. 'type' => 'integer',
  65. 'description' => 'The minimum amount of credits the user would need to make a server.'
  66. ]);
  67. //purchasing
  68. Configuration::firstOrCreate([
  69. 'key' => 'SERVER_LIMIT_AFTER_IRL_PURCHASE',
  70. ], [
  71. 'value' => '10',
  72. 'type' => 'integer',
  73. 'description' => 'Sets the users server limit to this amount after purchasing with money, set to 0 to ignore this.',
  74. ]);
  75. }
  76. }