CREATE DATABASE shoe_store_db;
USE shoe_store_db;

CREATE TABLE products (
    id INT AUTO_INCREMENT PRIMARY KEY,
    name VARCHAR(255) NOT NULL,
    category VARCHAR(100) NOT NULL,
    price DECIMAL(10, 2) NOT NULL,
    quantity INT NOT NULL,
    description TEXT
);

CREATE TABLE IF NOT EXISTS customers (
    id INT AUTO_INCREMENT PRIMARY KEY,
    username VARCHAR(100) NOT NULL,
    password_hash VARCHAR(255) NOT NULL,
    is_admin BOOLEAN DEFAULT 0
);


-- username cus1 password cus1pw                                            
INSERT INTO customers (username, password_hash, is_admin) VALUES ('cus1', '$2y$10$1J6tiE0OHJW8Gr1MBkXPxuG0x615mTqw5RPiiedaSnLsRgGmzO81W', 0);

-- username admin1 password admin1pw 
INSERT INTO customers (username, password_hash, is_admin) VALUES ('admin1', '$2y$10$YAY7SPF3Go8ok1yLWOnJSeXON9uZnMbFqHPDTQKad1w5RGh7S05Bq', 1);



INSERT INTO products (name, category, price, quantity, description) VALUES
('Ladies Stylish Shoe', 'ladies', 50.00, 10, 'Stylish ladies shoe with comfortable fit'),
('Ladies Casual Shoe', 'ladies', 60.00, 8, 'Casual ladies shoe with breathable material'),
('Ladies High Heel', 'ladies', 70.00, 12, 'Elegant high heel shoe for formal occasions');



INSERT INTO products (name, category, price, quantity, description) VALUES
('Gents Leather Shoe', 'gents', 70.00, 10, 'Classic leather shoe for gentlemen'),
('Gents Loafers', 'gents', 80.00, 8, 'Comfortable loafers for casual wear'),
('Gents Hiking Boot', 'gents', 65.00, 15, 'Durable hiking boot for outdoor adventures');


INSERT INTO products (name, category, price, quantity, description) VALUES
('Kids Sneaker', 'kids', 30.00, 10, 'Colorful and fun sneaker for boys and girls'),
('Kids School Shoe', 'kids', 25.00, 15, 'Durable school shoe with velcro straps'),
('Kids Sporty Shoe', 'kids', 45.00, 20, 'Sporty shoe for active kids');