2023-03-03 08:57:07 +01:00
< ? php
namespace Database\Seeders ;
use Illuminate\Database\Seeder ;
2023-03-03 15:43:38 +01:00
use Illuminate\Support\Facades\DB ;
2023-03-03 08:57:07 +01:00
class DatabaseSeeder extends Seeder
{
/**
* Seed the application ' s database .
*
* @ return void
*/
2023-03-03 15:43:38 +01:00
public function run () {
DB :: table ( 'categories' ) -> insert ([ 'id' => 1 , 'nom' => 'Basket' , 'created_at' => now (), 'updated_at' => now ()]);
DB :: table ( 'categories' ) -> insert ([ 'id' => 2 , 'nom' => 'Bottes' , 'created_at' => now (), 'updated_at' => now ()]);
DB :: table ( 'categories' ) -> insert ([ 'id' => 3 , 'nom' => 'Ballerines' , 'created_at' => now (), 'updated_at' => now ()]);
DB :: table ( 'categories' ) -> insert ([ 'id' => 4 , 'nom' => 'Sneakers' , 'created_at' => now (), 'updated_at' => now ()]);
DB :: table ( 'clients' ) -> insert ([ 'id' => 1 , 'nom' => " Martin " , 'prenom' => " Marc " , 'adresse' => '{"Pays": "France","Ville": "Marcq-en-baroeul","Adresse": "85 Rue de la Pompe","Code Postal": "59700"}' , 'created_at' => now (), 'updated_at' => now ()]);
DB :: table ( 'clients' ) -> insert ([ 'id' => 2 , 'nom' => " Durand " , 'prenom' => " Jean " , 'adresse' => '{"Pays": "Italie","Ville": "Venise","Adresse": "2049 Place San Polo","Code Postal": "30100"}' , 'created_at' => now (), 'updated_at' => now ()]);
DB :: table ( 'clients' ) -> insert ([ 'id' => 3 , 'nom' => " Desmoulin " , 'prenom' => " Claire " , 'adresse' => '{"Pays": "France","Ville": "Montrouge","Adresse": "67 rue de la Mare aux Carats","Code Postal": "92120"}' , 'created_at' => now (), 'updated_at' => now ()]);
DB :: table ( 'clients' ) -> insert ([ 'id' => 4 , 'nom' => " Dubois " , 'prenom' => " Martine " , 'adresse' => '{"Pays": "Belgique","Ville": "Namur","Adresse": "94 rue de la Boétie","Code Postal": "5004"}' , 'created_at' => now (), 'updated_at' => now ()]);
DB :: table ( 'clients' ) -> insert ([ 'id' => 5 , 'nom' => " Fontaine " , 'prenom' => " Andrea " , 'adresse' => '{"Pays": "France","Ville": "Poitiers","Adresse": "92 rue Victor Hugo","Code Postal": "86000"}' ]);
DB :: table ( 'commandes' ) -> insert ([ 'id' => 1 , 'date' => '2023-03-01' , 'clients_id' => 1 , 'adresse' => '{}' , 'created_at' => now (), 'updated_at' => now ()]);
DB :: table ( 'commandes' ) -> insert ([ 'id' => 2 , 'date' => '2023-02-05' , 'clients_id' => 2 , 'adresse' => '{}' , 'created_at' => now (), 'updated_at' => now ()]);
DB :: table ( 'commandes' ) -> insert ([ 'id' => 3 , 'date' => '2023-01-04' , 'clients_id' => 3 , 'adresse' => '{}' , 'created_at' => now (), 'updated_at' => now ()]);
DB :: table ( 'commandes' ) -> insert ([ 'id' => 4 , 'date' => '2023-07-07' , 'clients_id' => 1 , 'adresse' => '{}' , 'created_at' => now (), 'updated_at' => now ()]);
DB :: table ( 'commandes' ) -> insert ([ 'id' => 5 , 'date' => '2023-03-05' , 'clients_id' => 4 , 'adresse' => '{}' , 'created_at' => now (), 'updated_at' => now ()]);
DB :: table ( 'produits' ) -> insert ([ 'id' => 1 , 'nom' => 'Jordan' , 'taille' => '42' , 'couleur' => 'Blanc' , 'prix' => 154 , 'en_stock' => true , 'created_at' => now (), 'updated_at' => now ()]);
DB :: table ( 'produits' ) -> insert ([ 'id' => 2 , 'nom' => 'Jordan' , 'taille' => '43' , 'couleur' => 'Noir' , 'prix' => 244 , 'en_stock' => true , 'created_at' => now (), 'updated_at' => now ()]);
DB :: table ( 'produits' ) -> insert ([ 'id' => 3 , 'nom' => 'Jordan' , 'taille' => '42' , 'couleur' => 'Blanc' , 'prix' => 765 , 'en_stock' => false , 'created_at' => now (), 'updated_at' => now ()]);
DB :: table ( 'produits' ) -> insert ([ 'id' => 4 , 'nom' => 'Jordan' , 'taille' => '43' , 'couleur' => 'Noir' , 'prix' => 244 , 'en_stock' => true , 'created_at' => now (), 'updated_at' => now ()]);
DB :: table ( 'produits' ) -> insert ([ 'id' => 5 , 'nom' => 'Air Max' , 'taille' => '42' , 'couleur' => 'Blanc' , 'prix' => 124 , 'en_stock' => false , 'created_at' => now (), 'updated_at' => now ()]);
DB :: table ( 'produits' ) -> insert ([ 'id' => 6 , 'nom' => 'Air Max' , 'taille' => '43' , 'couleur' => 'Noir' , 'prix' => 530 , 'en_stock' => true , 'created_at' => now (), 'updated_at' => now ()]);
DB :: table ( 'produits' ) -> insert ([ 'id' => 7 , 'nom' => 'Air Max' , 'taille' => '42' , 'couleur' => 'Blanc' , 'prix' => 250 , 'en_stock' => false , 'created_at' => now (), 'updated_at' => now ()]);
DB :: table ( 'produits' ) -> insert ([ 'id' => 8 , 'nom' => 'Air Max' , 'taille' => '43' , 'couleur' => 'Noir' , 'prix' => 589 , 'en_stock' => true , 'created_at' => now (), 'updated_at' => now ()]);
DB :: table ( 'produits' ) -> insert ([ 'id' => 9 , 'nom' => 'FILA' , 'taille' => '42' , 'couleur' => 'Blanc' , 'prix' => 1000 , 'en_stock' => true , 'created_at' => now (), 'updated_at' => now ()]);
DB :: table ( 'produits' ) -> insert ([ 'id' => 10 , 'nom' => 'FILA' , 'taille' => '43' , 'couleur' => 'Noir' , 'prix' => 100 , 'en_stock' => true , 'created_at' => now (), 'updated_at' => now ()]);
DB :: table ( 'produits' ) -> insert ([ 'id' => 11 , 'nom' => 'FILA' , 'taille' => '42' , 'couleur' => 'Blanc' , 'prix' => 278 , 'en_stock' => false , 'created_at' => now (), 'updated_at' => now ()]);
DB :: table ( 'produits' ) -> insert ([ 'id' => 12 , 'nom' => 'FILA' , 'taille' => '43' , 'couleur' => 'Noir' , 'prix' => 864 , 'en_stock' => true , 'created_at' => now (), 'updated_at' => now ()]);
DB :: table ( 'produits' ) -> insert ([ 'id' => 13 , 'nom' => 'Timberland' , 'taille' => '42' , 'couleur' => 'Blanc' , 'prix' => 90 , 'en_stock' => true , 'created_at' => now (), 'updated_at' => now ()]);
DB :: table ( 'produits' ) -> insert ([ 'id' => 14 , 'nom' => 'Timberland' , 'taille' => '43' , 'couleur' => 'Noir' , 'prix' => 247 , 'en_stock' => true , 'created_at' => now (), 'updated_at' => now ()]);
DB :: table ( 'produits' ) -> insert ([ 'id' => 15 , 'nom' => 'Timberland' , 'taille' => '42' , 'couleur' => 'Blanc' , 'prix' => 327 , 'en_stock' => false , 'created_at' => now (), 'updated_at' => now ()]);
DB :: table ( 'produits' ) -> insert ([ 'id' => 16 , 'nom' => 'Timberland' , 'taille' => '43' , 'couleur' => 'Noir' , 'prix' => 430 , 'en_stock' => false , 'created_at' => now (), 'updated_at' => now ()]);
DB :: table ( 'produits' ) -> insert ([ 'id' => 17 , 'nom' => 'Marie Jeanes' , 'taille' => '42' , 'couleur' => 'Blanc' , 'prix' => 721 , 'en_stock' => true , 'created_at' => now (), 'updated_at' => now ()]);
DB :: table ( 'produits' ) -> insert ([ 'id' => 18 , 'nom' => 'Marie Jeanes' , 'taille' => '43' , 'couleur' => 'Noir' , 'prix' => 274 , 'en_stock' => true , 'created_at' => now (), 'updated_at' => now ()]);
DB :: table ( 'produits' ) -> insert ([ 'id' => 19 , 'nom' => 'Marie Jeanes' , 'taille' => '42' , 'couleur' => 'Blanc' , 'prix' => 564 , 'en_stock' => true , 'created_at' => now (), 'updated_at' => now ()]);
DB :: table ( 'produits' ) -> insert ([ 'id' => 20 , 'nom' => 'Marie Jeanes' , 'taille' => '43' , 'couleur' => 'Noir' , 'prix' => 666 , 'en_stock' => true , 'created_at' => now (), 'updated_at' => now ()]);
DB :: table ( 'lignes_commandes' ) -> insert ([ 'id' => 1 , 'commandes_id' => 2 , 'produits_id' => 5 , 'quantite' => 1 , 'prix_vente' => 193 , 'created_at' => now (), 'updated_at' => now ()]);
DB :: table ( 'lignes_commandes' ) -> insert ([ 'id' => 2 , 'commandes_id' => 1 , 'produits_id' => 6 , 'quantite' => 2 , 'prix_vente' => 150 , 'created_at' => now (), 'updated_at' => now ()]);
DB :: table ( 'lignes_commandes' ) -> insert ([ 'id' => 3 , 'commandes_id' => 1 , 'produits_id' => 19 , 'quantite' => 1 , 'prix_vente' => 250 , 'created_at' => now (), 'updated_at' => now ()]);
DB :: table ( 'lignes_commandes' ) -> insert ([ 'id' => 4 , 'commandes_id' => 2 , 'produits_id' => 7 , 'quantite' => 1 , 'prix_vente' => 114 , 'created_at' => now (), 'updated_at' => now ()]);
DB :: table ( 'lignes_commandes' ) -> insert ([ 'id' => 5 , 'commandes_id' => 2 , 'produits_id' => 13 , 'quantite' => 1 , 'prix_vente' => 130 , 'created_at' => now (), 'updated_at' => now ()]);
DB :: table ( 'lignes_commandes' ) -> insert ([ 'id' => 6 , 'commandes_id' => 3 , 'produits_id' => 10 , 'quantite' => 2 , 'prix_vente' => 34 , 'created_at' => now (), 'updated_at' => now ()]);
DB :: table ( 'lignes_commandes' ) -> insert ([ 'id' => 7 , 'commandes_id' => 3 , 'produits_id' => 2 , 'quantite' => 3 , 'prix_vente' => 244 , 'created_at' => now (), 'updated_at' => now ()]);
DB :: table ( 'lignes_commandes' ) -> insert ([ 'id' => 8 , 'commandes_id' => 3 , 'produits_id' => 9 , 'quantite' => 1 , 'prix_vente' => 196 , 'created_at' => now (), 'updated_at' => now ()]);
DB :: table ( 'lignes_commandes' ) -> insert ([ 'id' => 9 , 'commandes_id' => 3 , 'produits_id' => 5 , 'quantite' => 1 , 'prix_vente' => 75 , 'created_at' => now (), 'updated_at' => now ()]);
DB :: table ( 'lignes_commandes' ) -> insert ([ 'id' => 10 , 'commandes_id' => 4 , 'produits_id' => 11 , 'quantite' => 1 , 'prix_vente' => 136 , 'created_at' => now (), 'updated_at' => now ()]);
DB :: table ( 'lignes_commandes' ) -> insert ([ 'id' => 11 , 'commandes_id' => 4 , 'produits_id' => 4 , 'quantite' => 1 , 'prix_vente' => 118 , 'created_at' => now (), 'updated_at' => now ()]);
DB :: table ( 'lignes_commandes' ) -> insert ([ 'id' => 12 , 'commandes_id' => 5 , 'produits_id' => 3 , 'quantite' => 2 , 'prix_vente' => 183 , 'created_at' => now (), 'updated_at' => now ()]);
DB :: table ( 'produits_categories' ) -> insert ([ 'produits_id' => 1 , 'categories_id' => 1 ]);
DB :: table ( 'produits_categories' ) -> insert ([ 'produits_id' => 2 , 'categories_id' => 1 ]);
DB :: table ( 'produits_categories' ) -> insert ([ 'produits_id' => 3 , 'categories_id' => 1 ]);
DB :: table ( 'produits_categories' ) -> insert ([ 'produits_id' => 4 , 'categories_id' => 1 ]);
DB :: table ( 'produits_categories' ) -> insert ([ 'produits_id' => 1 , 'categories_id' => 4 ]);
DB :: table ( 'produits_categories' ) -> insert ([ 'produits_id' => 2 , 'categories_id' => 4 ]);
DB :: table ( 'produits_categories' ) -> insert ([ 'produits_id' => 3 , 'categories_id' => 4 ]);
DB :: table ( 'produits_categories' ) -> insert ([ 'produits_id' => 4 , 'categories_id' => 4 ]);
DB :: table ( 'produits_categories' ) -> insert ([ 'produits_id' => 5 , 'categories_id' => 4 ]);
DB :: table ( 'produits_categories' ) -> insert ([ 'produits_id' => 6 , 'categories_id' => 4 ]);
DB :: table ( 'produits_categories' ) -> insert ([ 'produits_id' => 7 , 'categories_id' => 4 ]);
DB :: table ( 'produits_categories' ) -> insert ([ 'produits_id' => 8 , 'categories_id' => 4 ]);
DB :: table ( 'produits_categories' ) -> insert ([ 'produits_id' => 9 , 'categories_id' => 4 ]);
DB :: table ( 'produits_categories' ) -> insert ([ 'produits_id' => 10 , 'categories_id' => 4 ]);
DB :: table ( 'produits_categories' ) -> insert ([ 'produits_id' => 11 , 'categories_id' => 4 ]);
DB :: table ( 'produits_categories' ) -> insert ([ 'produits_id' => 12 , 'categories_id' => 4 ]);
DB :: table ( 'produits_categories' ) -> insert ([ 'produits_id' => 13 , 'categories_id' => 2 ]);
DB :: table ( 'produits_categories' ) -> insert ([ 'produits_id' => 14 , 'categories_id' => 2 ]);
DB :: table ( 'produits_categories' ) -> insert ([ 'produits_id' => 15 , 'categories_id' => 2 ]);
DB :: table ( 'produits_categories' ) -> insert ([ 'produits_id' => 16 , 'categories_id' => 2 ]);
DB :: table ( 'produits_categories' ) -> insert ([ 'produits_id' => 17 , 'categories_id' => 3 ]);
DB :: table ( 'produits_categories' ) -> insert ([ 'produits_id' => 18 , 'categories_id' => 3 ]);
DB :: table ( 'produits_categories' ) -> insert ([ 'produits_id' => 19 , 'categories_id' => 3 ]);
DB :: table ( 'produits_categories' ) -> insert ([ 'produits_id' => 20 , 'categories_id' => 3 ]);
2023-03-03 08:57:07 +01:00
}
}