@@ -8,11 +8,32 @@ INSERT INTO brand (name, description, created_at, updated_at) VALUES
88(' Chanel' , ' Luxury' , NOW(), NOW()),
99(' Gucci' , ' Luxury' , NOW(), NOW()),
1010(' Zara' , ' Clothing' , NOW(), NOW()),
11- (' Uniqlo' , ' Clothing' , NOW(), NOW());
11+ (' Uniqlo' , ' Clothing' , NOW(), NOW()),
12+ (' Puma' , ' Sports Brand' , NOW(), NOW()),
13+ (' Reebok' , ' Sports Brand' , NOW(), NOW()),
14+ (' Microsoft' , ' Tech Brand' , NOW(), NOW()),
15+ (' Amazon' , ' E-commerce' , NOW(), NOW()),
16+ (' Meta' , ' Tech Brand' , NOW(), NOW()),
17+ (' Google' , ' Tech Brand' , NOW(), NOW()),
18+ (' Lenovo' , ' Electronics' , NOW(), NOW()),
19+ (' Asus' , ' Electronics' , NOW(), NOW()),
20+ (' Dell' , ' Electronics' , NOW(), NOW()),
21+ (' HP' , ' Electronics' , NOW(), NOW()),
22+ (' Prada' , ' Luxury' , NOW(), NOW()),
23+ (' Hermes' , ' Luxury' , NOW(), NOW()),
24+ (' Burberry' , ' Luxury' , NOW(), NOW()),
25+ (' Coach' , ' Luxury' , NOW(), NOW()),
26+ (' H&M' , ' Clothing' , NOW(), NOW()),
27+ (' Bershka' , ' Clothing' , NOW(), NOW()),
28+ (' Pull&Bear' , ' Clothing' , NOW(), NOW()),
29+ (' New Balance' , ' Sports Brand' , NOW(), NOW()),
30+ (' The North Face' , ' Outdoor Brand' , NOW(), NOW()),
31+ (' Columbia' , ' Outdoor Brand' , NOW(), NOW());
1232
1333DROP PROCEDURE IF EXISTS loop_insert_products;
1434
1535DELIMITER $$
36+
1637CREATE PROCEDURE loop_insert_products()
1738BEGIN
1839 DECLARE i INT DEFAULT 1 ;
@@ -24,19 +45,19 @@ BEGIN
2445 brand_id,
2546 name,
2647 description,
27- price_amount ,
48+ price ,
2849 stock,
2950 like_count,
3051 version,
3152 created_at,
3253 updated_at
3354 ) VALUES (
34- FLOOR(1 + RAND() * 10 ),
55+ FLOOR(1 + RAND() * 30 ),
3556 CONCAT(' Product Name ' , i),
36- CONCAT(' Description for product ' , i),
57+ CONCAT(' Description ' , i),
3758 FLOOR(1000 + RAND() * 99000 ),
38- FLOOR(RAND() * 100 ),
39- FLOOR(RAND() * 5000 ),
59+ FLOOR(RAND() * 1000 ),
60+ FLOOR(RAND() * 500 ),
4061 0 ,
4162 NOW(),
4263 NOW()
5273 COMMIT ;
5374 SET autocommit = 1 ;
5475END$$
76+
5577DELIMITER ;
5678
79+
5780CALL loop_insert_products();
0 commit comments