TbrBaseBracketsSeeder.php 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <?php
  2. namespace Database\Seeders;
  3. use Illuminate\Database\Seeder;
  4. use Illuminate\Support\Facades\DB;
  5. class TbrBaseBracketsSeeder extends Seeder
  6. {
  7. public function run(): void
  8. {
  9. $now = now();
  10. DB::table('royalties_base_brackets')->insert([
  11. [
  12. 'description' => 'Isento',
  13. 'start_month' => 1,
  14. 'end_month' => 3,
  15. 'percentage' => 0.0000,
  16. 'created_at' => $now,
  17. 'updated_at' => $now,
  18. ],
  19. [
  20. 'description' => 'Maior entre % fixo TBR ou 8% do faturamento',
  21. 'start_month' => 4,
  22. 'end_month' => 12,
  23. 'percentage' => 0.0800,
  24. 'created_at' => $now,
  25. 'updated_at' => $now,
  26. ],
  27. [
  28. 'description' => 'Maior entre % fixo TBR ou 8% do faturamento',
  29. 'start_month' => 13,
  30. 'end_month' => 60,
  31. 'percentage' => 0.0800,
  32. 'created_at' => $now,
  33. 'updated_at' => $now,
  34. ],
  35. ]);
  36. DB::table('fnm_base_brackets')->insert([
  37. [
  38. 'description' => 'Isento',
  39. 'start_month' => 1,
  40. 'end_month' => 3,
  41. 'percentage' => 0.0000,
  42. 'created_at' => $now,
  43. 'updated_at' => $now,
  44. ],
  45. [
  46. 'description' => 'Maior entre: % fixo TBR ou 2% do faturamento',
  47. 'start_month' => 4,
  48. 'end_month' => 12,
  49. 'percentage' => 0.0200,
  50. 'created_at' => $now,
  51. 'updated_at' => $now,
  52. ],
  53. [
  54. 'description' => 'Maior entre: % fixo TBR ou 2% do faturamento',
  55. 'start_month' => 13,
  56. 'end_month' => 60,
  57. 'percentage' => 0.0200,
  58. 'created_at' => $now,
  59. 'updated_at' => $now,
  60. ],
  61. ]);
  62. DB::table('maintenance_base_brackets')->insert([
  63. [
  64. 'description' => '30% fixo da TBR',
  65. 'start_month' => 1,
  66. 'end_month' => 3,
  67. 'percentage' => 0.3000,
  68. 'created_at' => $now,
  69. 'updated_at' => $now,
  70. ],
  71. [
  72. 'description' => '30% fixo da TBR',
  73. 'start_month' => 4,
  74. 'end_month' => 12,
  75. 'percentage' => 0.3000,
  76. 'created_at' => $now,
  77. 'updated_at' => $now,
  78. ],
  79. [
  80. 'description' => '30% fixo da TBR',
  81. 'start_month' => 13,
  82. 'end_month' => 60,
  83. 'percentage' => 0.3000,
  84. 'created_at' => $now,
  85. 'updated_at' => $now,
  86. ],
  87. ]);
  88. }
  89. }