| Version 4 (modified by , 13 hours ago) ( diff ) |
|---|
Product Creation
Actors: Registered Boss / Employee
1. System checks if the authenticated user has permission to create a product for the store where they are registered.
SELECT CASE
WHEN EXISTS (
SELECT 1
FROM permissions
WHERE personal_ID='0010002' AND (permission_type='BOSS' OR permission_type='MANAGER')
) THEN 'Yes'
ELSE 'No'
END AS has_permission;
2. The registered user selects “Create Product”.
3. Product information is entered.
4. The application inserts the product into product.
INSERT INTO product (code, price, availability, weight, width_x_length_x_depth, aprox_production_time, description, category_id, store_id) VALUES
('00100001', 49.99, 20, 1.20, '20x15x10', 7, 'Handmade wooden box', 1, '001');
5. The colors in which the product is availabe are inseted into color.
INSERT INTO color (product_code, color) VALUES
('00100001', 'Red'),
('00100001', 'Black');
6. The images with the product are inserted into image.
INSERT INTO image (product_code, image) VALUES
('00100001', 'Wooden-box-red_front.png'),
('00100001', 'Wooden-box-red_side.png'),
('00100001', 'Wooden-box-black_side.png');
7. Product is shown publicly with the other products.
Note:
See TracWiki
for help on using the wiki.
