ConfigurationSeeder.php 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  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' => 'updates the users server limit to this amount (unless the user already has a higher server limit) after making a purchase with real money, set to 0 to ignore this.',
  74. ]);
  75. //force email and discord verification
  76. Configuration::firstOrCreate([
  77. 'key' => 'FORCE_EMAIL_VERIFICATION',
  78. ], [
  79. 'value' => 'false',
  80. 'type' => 'boolean',
  81. 'description' => 'Force an user to verify the email adress before creating a server / buying credits.'
  82. ]);
  83. Configuration::firstOrCreate([
  84. 'key' => 'FORCE_DISCORD_VERIFICATION',
  85. ], [
  86. 'value' => 'false',
  87. 'type' => 'boolean',
  88. 'description' => 'Force an user to link an Discord Account before creating a server / buying credits.'
  89. ]);
  90. //disable ip check on register
  91. Configuration::firstOrCreate([
  92. 'key' => 'REGISTER_IP_CHECK',
  93. ], [
  94. 'value' => 'true',
  95. 'type' => 'boolean',
  96. 'description' => 'Prevent users from making multiple accounts using the same IP address'
  97. ]);
  98. //per_page on allocations request
  99. Configuration::firstOrCreate([
  100. 'key' => 'ALLOCATION_LIMIT',
  101. ], [
  102. 'value' => '200',
  103. 'type' => 'integer',
  104. 'description' => 'The maximum amount of allocations to pull per node for automatic deployment, if more allocations are being used than this limit is set to, no new servers can be created!'
  105. ]);
  106. //credits display name
  107. Configuration::firstOrCreate([
  108. 'key' => 'CREDITS_DISPLAY_NAME',
  109. ], [
  110. 'value' => 'Credits',
  111. 'type' => 'string',
  112. 'description' => 'Set the display name of your currency :)'
  113. ]);
  114. //credits display name
  115. Configuration::firstOrCreate([
  116. 'key' => 'SERVER_CREATE_CHARGE_FIRST_HOUR',
  117. ], [
  118. 'value' => 'true',
  119. 'type' => 'boolean',
  120. 'description' => 'Charges the first hour worth of credits upon creating a server.'
  121. ]);
  122. //sales tax
  123. Configuration::firstOrCreate([
  124. 'key' => 'SALES_TAX',
  125. ], [
  126. 'value' => '0',
  127. 'type' => 'integer',
  128. 'description' => 'The %-value of tax that will be added to the product price on checkout'
  129. ]);
  130. }
  131. }