|
|
@@ -2,153 +2,12 @@
|
|
|
|
|
|
namespace Database\Seeders;
|
|
|
|
|
|
-use App\Models\Product;
|
|
|
use Illuminate\Database\Seeder;
|
|
|
|
|
|
class DeveloperTestSeeder extends Seeder
|
|
|
{
|
|
|
public function run(): void
|
|
|
{
|
|
|
- $this->seedProducts();
|
|
|
- }
|
|
|
-
|
|
|
- private function seedProducts(): void
|
|
|
- {
|
|
|
- $products = [
|
|
|
- [
|
|
|
- 'name' => 'Apostila Nível 1',
|
|
|
- 'sku' => 'AP-NV1',
|
|
|
- 'barcode' => '7890001000001',
|
|
|
- 'price_cost' => 18.00,
|
|
|
- 'price_sale' => 35.00,
|
|
|
- 'measure_unit' => 'UN',
|
|
|
- 'kit' => false,
|
|
|
- 'visible_franchisee' => true,
|
|
|
- 'weight' => 0.300,
|
|
|
- 'length' => 29.7,
|
|
|
- 'height' => 21.0,
|
|
|
- ],
|
|
|
- [
|
|
|
- 'name' => 'Apostila Nível 2',
|
|
|
- 'sku' => 'AP-NV2',
|
|
|
- 'barcode' => '7890001000002',
|
|
|
- 'price_cost' => 18.00,
|
|
|
- 'price_sale' => 35.00,
|
|
|
- 'measure_unit' => 'UN',
|
|
|
- 'kit' => false,
|
|
|
- 'visible_franchisee' => true,
|
|
|
- 'weight' => 0.300,
|
|
|
- 'length' => 29.7,
|
|
|
- 'height' => 21.0,
|
|
|
- ],
|
|
|
- [
|
|
|
- 'name' => 'Apostila Nível 3',
|
|
|
- 'sku' => 'AP-NV3',
|
|
|
- 'barcode' => '7890001000003',
|
|
|
- 'price_cost' => 18.00,
|
|
|
- 'price_sale' => 35.00,
|
|
|
- 'measure_unit' => 'UN',
|
|
|
- 'kit' => false,
|
|
|
- 'visible_franchisee' => true,
|
|
|
- 'weight' => 0.300,
|
|
|
- 'length' => 29.7,
|
|
|
- 'height' => 21.0,
|
|
|
- ],
|
|
|
- [
|
|
|
- 'name' => 'Kit Material Didático Básico',
|
|
|
- 'sku' => 'KIT-MAT-BAS',
|
|
|
- 'barcode' => '7890001000010',
|
|
|
- 'price_cost' => 45.00,
|
|
|
- 'price_sale' => 89.90,
|
|
|
- 'measure_unit' => 'KIT',
|
|
|
- 'kit' => true,
|
|
|
- 'visible_franchisee' => true,
|
|
|
- 'weight' => 0.800,
|
|
|
- 'length' => 30.0,
|
|
|
- 'height' => 22.0,
|
|
|
- ],
|
|
|
- [
|
|
|
- 'name' => 'Kit Material Didático Completo',
|
|
|
- 'sku' => 'KIT-MAT-COMP',
|
|
|
- 'barcode' => '7890001000011',
|
|
|
- 'price_cost' => 90.00,
|
|
|
- 'price_sale' => 169.90,
|
|
|
- 'measure_unit' => 'KIT',
|
|
|
- 'kit' => true,
|
|
|
- 'visible_franchisee' => true,
|
|
|
- 'weight' => 1.500,
|
|
|
- 'length' => 30.0,
|
|
|
- 'height' => 22.0,
|
|
|
- ],
|
|
|
- [
|
|
|
- 'name' => 'Caderno de Atividades',
|
|
|
- 'sku' => 'CAD-ATI',
|
|
|
- 'barcode' => '7890001000020',
|
|
|
- 'price_cost' => 12.00,
|
|
|
- 'price_sale' => 24.90,
|
|
|
- 'measure_unit' => 'UN',
|
|
|
- 'kit' => false,
|
|
|
- 'visible_franchisee' => true,
|
|
|
- 'weight' => 0.200,
|
|
|
- 'length' => 29.7,
|
|
|
- 'height' => 21.0,
|
|
|
- ],
|
|
|
- [
|
|
|
- 'name' => 'Livro do Aluno — Ginástica do Cérebro',
|
|
|
- 'sku' => 'LV-ALUNO-GC',
|
|
|
- 'barcode' => '7890001000030',
|
|
|
- 'price_cost' => 32.00,
|
|
|
- 'price_sale' => 59.90,
|
|
|
- 'measure_unit' => 'UN',
|
|
|
- 'kit' => false,
|
|
|
- 'visible_franchisee' => true,
|
|
|
- 'weight' => 0.450,
|
|
|
- 'length' => 23.0,
|
|
|
- 'height' => 16.0,
|
|
|
- ],
|
|
|
- [
|
|
|
- 'name' => 'Camiseta Ginástica do Cérebro',
|
|
|
- 'sku' => 'CAM-GC',
|
|
|
- 'barcode' => '7890001000040',
|
|
|
- 'price_cost' => 20.00,
|
|
|
- 'price_sale' => 49.90,
|
|
|
- 'measure_unit' => 'UN',
|
|
|
- 'kit' => false,
|
|
|
- 'visible_franchisee' => true,
|
|
|
- 'weight' => 0.200,
|
|
|
- 'length' => 30.0,
|
|
|
- 'height' => 20.0,
|
|
|
- ],
|
|
|
- [
|
|
|
- 'name' => 'Pasta do Aluno',
|
|
|
- 'sku' => 'PAST-ALUNO',
|
|
|
- 'barcode' => '7890001000050',
|
|
|
- 'price_cost' => 5.00,
|
|
|
- 'price_sale' => 12.90,
|
|
|
- 'measure_unit' => 'UN',
|
|
|
- 'kit' => false,
|
|
|
- 'visible_franchisee' => true,
|
|
|
- 'weight' => 0.100,
|
|
|
- 'length' => 33.0,
|
|
|
- 'height' => 23.0,
|
|
|
- ],
|
|
|
- [
|
|
|
- 'name' => 'Certificado de Conclusão',
|
|
|
- 'sku' => 'CERT-CONCL',
|
|
|
- 'barcode' => '7890001000060',
|
|
|
- 'price_cost' => 2.00,
|
|
|
- 'price_sale' => 5.00,
|
|
|
- 'measure_unit' => 'UN',
|
|
|
- 'kit' => false,
|
|
|
- 'visible_franchisee' => false,
|
|
|
- 'weight' => 0.050,
|
|
|
- 'length' => 29.7,
|
|
|
- 'height' => 21.0,
|
|
|
- ],
|
|
|
- ];
|
|
|
-
|
|
|
- foreach ($products as $product) {
|
|
|
- Product::firstOrCreate(['sku' => $product['sku']], $product);
|
|
|
- }
|
|
|
+ //
|
|
|
}
|
|
|
}
|