-- Initialisation du stock au niveau du Stock Central (Admin)
-- Tous les produits sont liés au stock central avec stock_type = 'admin' et store_id = 1

-- Jumpsuits
INSERT INTO stock (product_id, color_id, size_id, store_id, quantity, stock_type) VALUES
-- Jumpsuit Classic Fit Grey M/L
((SELECT id FROM products WHERE name = 'Jumpsuit Classic Fit Grey'), (SELECT id FROM colors WHERE name = 'Grey'), (SELECT id FROM sizes WHERE name = 'M/L'), 1, 1, 'admin'),
-- Jumpsuit Cut out-Blue Electric M/L
((SELECT id FROM products WHERE name = 'Jumpsuit Cut out-Blue Electric'), (SELECT id FROM colors WHERE name = 'Blue Electric'), (SELECT id FROM sizes WHERE name = 'M/L'), 1, 1, 'admin'),
-- Jumpsuit Classic Fit Black M/L
((SELECT id FROM products WHERE name = 'Jumpsuit Classic Fit Black'), (SELECT id FROM colors WHERE name = 'Black'), (SELECT id FROM sizes WHERE name = 'M/L'), 1, 1, 'admin'),
-- Jumpsuit Classic Fit Hazel S/M
((SELECT id FROM products WHERE name = 'Jumpsuit Classic Fit Hazel'), (SELECT id FROM colors WHERE name = 'Hazel'), (SELECT id FROM sizes WHERE name = 'S/M'), 1, 1, 'admin'),
-- Jumpsuit Cut Out-Re Cherry S/M
((SELECT id FROM products WHERE name = 'Jumpsuit Cut Out-Re Cherry'), (SELECT id FROM colors WHERE name = 'Cherry'), (SELECT id FROM sizes WHERE name = 'S/M'), 1, 1, 'admin'),
-- Jumpsuit Cut Out-Re Cherry M/L
((SELECT id FROM products WHERE name = 'Jumpsuit Cut Out-Re Cherry'), (SELECT id FROM colors WHERE name = 'Cherry'), (SELECT id FROM sizes WHERE name = 'M/L'), 1, 1, 'admin'),
-- Jumpsuit Open Back Beige S/M
((SELECT id FROM products WHERE name = 'Jumpsuit Open Back Beige'), (SELECT id FROM colors WHERE name = 'Beige'), (SELECT id FROM sizes WHERE name = 'S/M'), 1, 1, 'admin'),
-- Jumpsuit Open Back Brown S/M
((SELECT id FROM products WHERE name = 'Jumpsuit Open Back Brown'), (SELECT id FROM colors WHERE name = 'Brown'), (SELECT id FROM sizes WHERE name = 'S/M'), 1, 1, 'admin'),
-- Jumpsuit Flare Blue Electric S/M
((SELECT id FROM products WHERE name = 'Jumpsuit Flare Blue Electric'), (SELECT id FROM colors WHERE name = 'Blue Electric'), (SELECT id FROM sizes WHERE name = 'S/M'), 1, 1, 'admin'),
-- Jumpsuit Flare Black S/M
((SELECT id FROM products WHERE name = 'Jumpsuit Flare Black'), (SELECT id FROM colors WHERE name = 'Black'), (SELECT id FROM sizes WHERE name = 'S/M'), 1, 1, 'admin'),

-- Dress
-- Glam Fit Black S/M (dress+Short)
((SELECT id FROM products WHERE name = 'Glam Fit Black Dress+Short'), (SELECT id FROM colors WHERE name = 'Black'), (SELECT id FROM sizes WHERE name = 'S/M'), 1, 1, 'admin'),

-- Tops & T-shirts
-- Alive Fit T-Shirt -Black Xs/S
((SELECT id FROM products WHERE name = 'Alive Fit T-Shirt Black'), (SELECT id FROM colors WHERE name = 'Black'), (SELECT id FROM sizes WHERE name = 'XS/S'), 1, 1, 'admin'),
-- Asymmetrical Fit-Light Blue M/L
((SELECT id FROM products WHERE name = 'Asymmetrical Fit Light Blue'), (SELECT id FROM colors WHERE name = 'Light Blue'), (SELECT id FROM sizes WHERE name = 'M/L'), 1, 1, 'admin'),
-- Asymmetrical Fit-White-M/L
((SELECT id FROM products WHERE name = 'Asymmetrical Fit White'), (SELECT id FROM colors WHERE name = 'White'), (SELECT id FROM sizes WHERE name = 'M/L'), 1, 1, 'admin'),
-- Fashion Fit Blue S/M
((SELECT id FROM products WHERE name = 'Fashion Fit Blue'), (SELECT id FROM colors WHERE name = 'Blue Electric'), (SELECT id FROM sizes WHERE name = 'S/M'), 1, 1, 'admin'),
-- Alive Fit Midnight Blue S/M
((SELECT id FROM products WHERE name = 'Alive Fit Midnight Blue'), (SELECT id FROM colors WHERE name = 'Midnight Blue'), (SELECT id FROM sizes WHERE name = 'S/M'), 1, 1, 'admin'),
-- Alive Fit Cream M/L
((SELECT id FROM products WHERE name = 'Alive Fit Cream'), (SELECT id FROM colors WHERE name = 'Cream'), (SELECT id FROM sizes WHERE name = 'M/L'), 1, 1, 'admin'),
-- Flex Fit Brown S/M
((SELECT id FROM products WHERE name = 'Flex Fit Brown'), (SELECT id FROM colors WHERE name = 'Brown'), (SELECT id FROM sizes WHERE name = 'S/M'), 1, 1, 'admin'),
-- Flex Fit - White-XS/S
((SELECT id FROM products WHERE name = 'Flex Fit White'), (SELECT id FROM colors WHERE name = 'White'), (SELECT id FROM sizes WHERE name = 'XS/S'), 1, 1, 'admin'),
-- Alive Fit-Knot-Brown-S/M
((SELECT id FROM products WHERE name = 'Alive Fit Knot Brown'), (SELECT id FROM colors WHERE name = 'Brown'), (SELECT id FROM sizes WHERE name = 'S/M'), 1, 1, 'admin'),
-- Unique Fit Pink-S/M
((SELECT id FROM products WHERE name = 'Unique Fit Pink'), (SELECT id FROM colors WHERE name = 'Pink'), (SELECT id FROM sizes WHERE name = 'S/M'), 1, 1, 'admin'),
-- Unique Fit - Purple L/XL
((SELECT id FROM products WHERE name = 'Unique Fit Purple'), (SELECT id FROM colors WHERE name = 'Purple'), (SELECT id FROM sizes WHERE name = 'L/XL'), 1, 1, 'admin'),
-- Naya Fit Grey
((SELECT id FROM products WHERE name = 'Naya Fit Grey'), (SELECT id FROM colors WHERE name = 'Grey'), (SELECT id FROM sizes WHERE name = 'S/M'), 1, 1, 'admin'),
-- Alive Fit-Knot-Pink XS/S
((SELECT id FROM products WHERE name = 'Alive Fit Knot Pink'), (SELECT id FROM colors WHERE name = 'Pink'), (SELECT id FROM sizes WHERE name = 'XS/S'), 1, 1, 'admin'),
-- Unique Fit Black XS/S
((SELECT id FROM products WHERE name = 'Unique Fit Black'), (SELECT id FROM colors WHERE name = 'Black'), (SELECT id FROM sizes WHERE name = 'XS/S'), 1, 1, 'admin'),
-- Unique Fit Light Blue M/L
((SELECT id FROM products WHERE name = 'Unique Fit Light Blue'), (SELECT id FROM colors WHERE name = 'Light Blue'), (SELECT id FROM sizes WHERE name = 'M/L'), 1, 1, 'admin'),

-- Sets - Brassières
-- Alive Fit Rose Pink S/M
((SELECT id FROM products WHERE name = 'Alive Fit Rose Pink Bra'), (SELECT id FROM colors WHERE name = 'Rose Pink'), (SELECT id FROM sizes WHERE name = 'S/M'), 1, 1, 'admin'),
-- Crystal Cross Fit Amethyst M/L
((SELECT id FROM products WHERE name = 'Crystal Cross Fit Amethyst Bra'), (SELECT id FROM colors WHERE name = 'Amethyst'), (SELECT id FROM sizes WHERE name = 'M/L'), 1, 1, 'admin'),
-- Alive Fit Light Pink S/M
((SELECT id FROM products WHERE name = 'Alive Fit Light Pink Bra'), (SELECT id FROM colors WHERE name = 'Light Pink'), (SELECT id FROM sizes WHERE name = 'S/M'), 1, 1, 'admin'),
-- Must Fit Brown S/M
((SELECT id FROM products WHERE name = 'Must Fit Brown Bra'), (SELECT id FROM colors WHERE name = 'Brown'), (SELECT id FROM sizes WHERE name = 'S/M'), 1, 1, 'admin'),
-- Alive Fit Brown M/L
((SELECT id FROM products WHERE name = 'Alive Fit Brown Bra'), (SELECT id FROM colors WHERE name = 'Brown'), (SELECT id FROM sizes WHERE name = 'M/L'), 1, 1, 'admin'),
-- Corail Fit M/L
((SELECT id FROM products WHERE name = 'Corail Fit Bra'), (SELECT id FROM colors WHERE name = 'Corail'), (SELECT id FROM sizes WHERE name = 'M/L'), 1, 1, 'admin'),
-- The Ultimate Fit-Black-M/L
((SELECT id FROM products WHERE name = 'The Ultimate Fit Black Bra'), (SELECT id FROM colors WHERE name = 'Black'), (SELECT id FROM sizes WHERE name = 'M/L'), 1, 1, 'admin'),
-- Alive Fit White M/L
((SELECT id FROM products WHERE name = 'Alive Fit White Bra'), (SELECT id FROM colors WHERE name = 'White'), (SELECT id FROM sizes WHERE name = 'M/L'), 1, 1, 'admin'),
-- Glam Fit Black S/M One Shoulder
((SELECT id FROM products WHERE name = 'Glam Fit Black One Shoulder Bra'), (SELECT id FROM colors WHERE name = 'Black'), (SELECT id FROM sizes WHERE name = 'S/M'), 1, 1, 'admin'),

-- Sets - Leggings
-- Alive Fit Rose Pink Xs/S
((SELECT id FROM products WHERE name = 'Alive Fit Rose Pink Legging'), (SELECT id FROM colors WHERE name = 'Rose Pink'), (SELECT id FROM sizes WHERE name = 'XS/S'), 1, 1, 'admin'),
-- Crystal Cross Fit Amethyst M/L
((SELECT id FROM products WHERE name = 'Crystal Cross Fit Amethyst Legging'), (SELECT id FROM colors WHERE name = 'Amethyst'), (SELECT id FROM sizes WHERE name = 'M/L'), 1, 1, 'admin'),
-- Alive Fit Light Pink S/M
((SELECT id FROM products WHERE name = 'Alive Fit Light Pink Legging'), (SELECT id FROM colors WHERE name = 'Light Pink'), (SELECT id FROM sizes WHERE name = 'S/M'), 1, 1, 'admin'),
-- Alive Fit Brown S/M Match Must Fit bra
((SELECT id FROM products WHERE name = 'Alive Fit Brown Legging'), (SELECT id FROM colors WHERE name = 'Brown'), (SELECT id FROM sizes WHERE name = 'S/M'), 1, 1, 'admin'),
-- Alive Fit Brown M/L
((SELECT id FROM products WHERE name = 'Alive Fit Brown Legging'), (SELECT id FROM colors WHERE name = 'Brown'), (SELECT id FROM sizes WHERE name = 'M/L'), 1, 1, 'admin'),
-- Corail Fit M/L
((SELECT id FROM products WHERE name = 'Corail Fit Legging'), (SELECT id FROM colors WHERE name = 'Corail'), (SELECT id FROM sizes WHERE name = 'M/L'), 1, 1, 'admin'),
-- The Ultimate Fit-Black-M/L
((SELECT id FROM products WHERE name = 'The Ultimate Fit Black Legging'), (SELECT id FROM colors WHERE name = 'Black'), (SELECT id FROM sizes WHERE name = 'M/L'), 1, 1, 'admin'),
-- Alive Fit Fushia M/L
((SELECT id FROM products WHERE name = 'Alive Fit Fushia Legging'), (SELECT id FROM colors WHERE name = 'Fushia'), (SELECT id FROM sizes WHERE name = 'M/L'), 1, 1, 'admin'),

-- Sets - Jupe
-- Glam Fit Black S/M
((SELECT id FROM products WHERE name = 'Glam Fit Black Skirt'), (SELECT id FROM colors WHERE name = 'Black'), (SELECT id FROM sizes WHERE name = 'S/M'), 1, 1, 'admin'),

-- Jackets
-- Jacket Fit Fushia Free Size
((SELECT id FROM products WHERE name = 'Jacket Fit Fushia'), (SELECT id FROM colors WHERE name = 'Fushia'), (SELECT id FROM sizes WHERE name = 'Free Size'), 1, 1, 'admin'),
-- Jacket Fit Light Blue Free Size
((SELECT id FROM products WHERE name = 'Jacket Fit Light Blue'), (SELECT id FROM colors WHERE name = 'Light Blue'), (SELECT id FROM sizes WHERE name = 'Free Size'), 1, 1, 'admin'),
-- Jacket Fit White XS/S
((SELECT id FROM products WHERE name = 'Jacket Fit White'), (SELECT id FROM colors WHERE name = 'White'), (SELECT id FROM sizes WHERE name = 'XS/S'), 1, 1, 'admin'),

-- Accessories (quantité = 2 pour les chaussettes)
-- Socks Black
((SELECT id FROM products WHERE name = 'Socks Black'), (SELECT id FROM colors WHERE name = 'Black'), (SELECT id FROM sizes WHERE name = 'Free Size'), 1, 2, 'admin'),
-- Socks White
((SELECT id FROM products WHERE name = 'Socks White'), (SELECT id FROM colors WHERE name = 'White'), (SELECT id FROM sizes WHERE name = 'Free Size'), 1, 2, 'admin')

ON DUPLICATE KEY UPDATE 
quantity = VALUES(quantity);
