diff --git a/backend/src/main/resources/db/migration/V2__seed_data.sql b/backend/src/main/resources/db/migration/V2__seed_data.sql index befa56fa..33505a84 100644 --- a/backend/src/main/resources/db/migration/V2__seed_data.sql +++ b/backend/src/main/resources/db/migration/V2__seed_data.sql @@ -2259,27 +2259,27 @@ SET imageUrl = REPLACE(imageUrl, 'https://images.petshop.local/stores/', '/store WHERE imageUrl LIKE 'https://images.petshop.local/stores/%'; INSERT IGNORE INTO appointment (appointmentId, serviceId, petId, customerId, storeId, employeeId, appointmentDate, appointmentTime, appointmentStatus) VALUES -(91, 1, NULL, 16, 1, 3, '2026-03-08', '09:00:00', 'COMPLETED'), -(92, 2, NULL, 17, 2, 8, '2026-03-10', '10:30:00', 'COMPLETED'), -(93, 3, NULL, 18, 3, 13, '2026-03-12', '13:00:00', 'MISSED'), -(94, 4, NULL, 19, 1, 6, '2026-03-14', '14:30:00', 'COMPLETED'), -(95, 5, NULL, 20, 2, 7, '2026-03-16', '09:00:00', 'COMPLETED'), -(96, 6, NULL, 21, 3, 12, '2026-03-18', '10:30:00', 'COMPLETED'), -(97, 7, NULL, 22, 1, 5, '2026-03-20', '13:00:00', 'CANCELLED'), -(98, 8, NULL, 23, 2, 10, '2026-03-22', '14:30:00', 'COMPLETED'), -(99, 1, NULL, 24, 3, 11, '2026-03-24', '09:00:00', 'COMPLETED'), -(100, 2, NULL, 25, 1, 4, '2026-03-26', '10:30:00', 'MISSED'), -(101, 3, NULL, 26, 2, 9, '2026-03-28', '13:00:00', 'COMPLETED'), -(102, 4, NULL, 27, 3, 14, '2026-03-30', '14:30:00', 'COMPLETED'), -(103, 5, NULL, 28, 1, 3, '2026-04-01', '09:00:00', 'COMPLETED'), -(104, 6, NULL, 29, 2, 8, '2026-04-03', '10:30:00', 'COMPLETED'), -(105, 7, NULL, 30, 3, 13, '2026-04-05', '13:00:00', 'MISSED'), -(106, 8, NULL, 31, 1, 6, '2026-04-07', '14:30:00', 'COMPLETED'), -(107, 1, NULL, 32, 2, 7, '2026-04-09', '09:00:00', 'COMPLETED'), -(108, 2, NULL, 33, 3, 12, '2026-04-11', '10:30:00', 'CANCELLED'), -(109, 3, NULL, 34, 1, 5, '2026-04-13', '13:00:00', 'COMPLETED'), -(110, 4, NULL, 35, 2, 10, '2026-04-15', '10:00:00', 'SCHEDULED'), -(111, 5, NULL, 36, 3, 11, '2026-04-16', '14:00:00', 'SCHEDULED'); +(91, 7, 37, 16, 1, 3, '2026-03-08', '09:00:00', 'COMPLETED'), +(92, 8, 38, 17, 2, 8, '2026-03-10', '10:30:00', 'COMPLETED'), +(93, 8, 39, 18, 3, 13, '2026-03-12', '13:00:00', 'MISSED'), +(94, 4, 40, 19, 1, 6, '2026-03-14', '14:30:00', 'COMPLETED'), +(95, 5, 41, 20, 2, 7, '2026-03-16', '09:00:00', 'COMPLETED'), +(96, 8, 42, 21, 3, 12, '2026-03-18', '10:30:00', 'COMPLETED'), +(97, 2, 43, 22, 1, 5, '2026-03-20', '13:00:00', 'CANCELLED'), +(98, 8, 44, 23, 2, 10, '2026-03-22', '14:30:00', 'COMPLETED'), +(99, 8, 45, 24, 3, 11, '2026-03-24', '09:00:00', 'COMPLETED'), +(100, 8, 46, 25, 1, 4, '2026-03-26', '10:30:00', 'MISSED'), +(101, 6, 47, 26, 2, 9, '2026-03-28', '13:00:00', 'COMPLETED'), +(102, 4, 48, 27, 3, 14, '2026-03-30', '14:30:00', 'COMPLETED'), +(103, 7, 49, 28, 1, 3, '2026-04-01', '09:00:00', 'COMPLETED'), +(104, 6, 50, 29, 2, 8, '2026-04-03', '10:30:00', 'COMPLETED'), +(105, 1, 51, 30, 3, 13, '2026-04-05', '13:00:00', 'MISSED'), +(106, 4, 52, 31, 1, 6, '2026-04-07', '14:30:00', 'COMPLETED'), +(107, 1, 53, 32, 2, 7, '2026-04-09', '09:00:00', 'COMPLETED'), +(108, 2, 54, 33, 3, 12, '2026-04-11', '10:30:00', 'CANCELLED'), +(109, 3, 55, 34, 1, 5, '2026-04-13', '13:00:00', 'COMPLETED'), +(110, 4, 56, 35, 2, 10, '2026-04-15', '10:00:00', 'SCHEDULED'), +(111, 5, 57, 36, 3, 11, '2026-04-16', '14:00:00', 'SCHEDULED'); INSERT IGNORE INTO sale (saleId, saleDate, totalAmount, paymentMethod, employeeId, storeId, customerId, isRefund, originalSaleId, channel, cartId, couponId, subtotalAmount, couponDiscountAmount, employeeDiscountAmount, pointsEarned) VALUES (111, '2026-03-08 09:15:00', 87.50, 'Cash', 3, 1, 3, 0, NULL, 'IN_STORE', NULL, NULL, 87.50, 0.00, 0.00, 8), @@ -2435,7 +2435,21 @@ INSERT INTO activityLog (userId, storeId, usernameSnapshot, fullNameSnapshot, ro (4, 1, 'sara.smith', 'Sara Smith', 'STAFF', 'Downtown Branch', 'Updated appointment #60 | PUT /api/v1/appointments/60 → 200', '2026-04-14 14:20:00'), (25, NULL,'alex.adams', 'Alex Adams', 'CUSTOMER', NULL, 'Logged in | POST /api/v1/auth/login → 200', '2026-04-15 11:00:00'), (25, NULL,'alex.adams', 'Alex Adams', 'CUSTOMER', NULL, 'Added an item to cart | POST /api/v1/cart/add → 200', '2026-04-15 11:10:22'), -(25, NULL,'alex.adams', 'Alex Adams', 'CUSTOMER', NULL, 'Sent a message to the AI assistant | POST /api/v1/ai-chat/message → 200','2026-04-15 11:30:00'); +(25, NULL,'alex.adams', 'Alex Adams', 'CUSTOMER', NULL, 'Sent a message to the AI assistant | POST /api/v1/ai-chat/message → 200','2026-04-15 11:30:00'), +(3, 1, 'staff', 'Staff User', 'STAFF', 'Downtown Branch', 'Logged in | POST /api/v1/auth/login → 200', '2026-04-16 09:00:00'), +(3, 1, 'staff', 'Staff User', 'STAFF', 'Downtown Branch', 'Completed a purchase | POST /api/v1/cart/checkout/complete → 200', '2026-04-16 09:45:22'), +(26, NULL,'alex.baker', 'Alex Baker', 'CUSTOMER', NULL, 'Logged in | POST /api/v1/auth/login → 200', '2026-04-16 14:00:00'), +(26, NULL,'alex.baker', 'Alex Baker', 'CUSTOMER', NULL, 'Added an item to cart | POST /api/v1/cart/add → 200', '2026-04-16 14:10:15'), +(7, 2, 'michael.johnson', 'Michael Johnson', 'STAFF', 'North Branch', 'Logged in | POST /api/v1/auth/login → 200', '2026-04-17 09:00:00'), +(7, 2, 'michael.johnson', 'Michael Johnson', 'STAFF', 'North Branch', 'Updated appointment #110 | PUT /api/v1/appointments/110 → 200', '2026-04-17 09:30:44'), +(7, 2, 'michael.johnson', 'Michael Johnson', 'STAFF', 'North Branch', 'Completed a purchase | POST /api/v1/cart/checkout/complete → 200', '2026-04-17 10:45:00'), +(1, 1, 'admin', 'Admin User', 'ADMIN', 'Downtown Branch', 'Logged in | POST /api/v1/auth/login → 200', '2026-04-18 08:00:00'), +(1, 1, 'admin', 'Admin User', 'ADMIN', 'Downtown Branch', 'Updated product #12 | PUT /api/v1/products/12 → 200', '2026-04-18 08:25:30'), +(27, NULL,'alex.hall', 'Alex Hall', 'CUSTOMER', NULL, 'Logged in | POST /api/v1/auth/login → 200', '2026-04-18 16:00:00'), +(27, NULL,'alex.hall', 'Alex Hall', 'CUSTOMER', NULL, 'Sent a message to the AI assistant | POST /api/v1/ai-chat/message → 200','2026-04-18 16:08:33'), +(11, 3, 'lisa.williams', 'Lisa Williams', 'STAFF', 'West Side Store', 'Logged in | POST /api/v1/auth/login → 200', '2026-04-19 09:00:00'), +(11, 3, 'lisa.williams', 'Lisa Williams', 'STAFF', 'West Side Store', 'Completed a purchase | POST /api/v1/cart/checkout/complete → 200', '2026-04-19 10:15:00'), +(11, 3, 'lisa.williams', 'Lisa Williams', 'STAFF', 'West Side Store', 'Created a new appointment | POST /api/v1/appointments → 201', '2026-04-19 11:00:22'); INSERT IGNORE INTO sale (saleId, saleDate, totalAmount, paymentMethod, employeeId, storeId, customerId, isRefund, originalSaleId, channel, cartId, couponId, subtotalAmount, couponDiscountAmount, employeeDiscountAmount, pointsEarned) VALUES (134, '2026-04-10 09:15:00', 57.67, 'Cash', 4, 1, 16, 0, NULL, 'IN_STORE', NULL, NULL, 57.67, 0.00, 0.00, 5), @@ -2453,7 +2467,15 @@ INSERT IGNORE INTO sale (saleId, saleDate, totalAmount, paymentMethod, employeeI (146, '2026-04-15 10:45:00', 80.62, 'Cash', 5, 1, 28, 0, NULL, 'IN_STORE', NULL, NULL, 80.62, 0.00, 0.00, 8), (147, '2026-04-15 13:00:00', 141.28, 'Card', 8, 2, 29, 0, NULL, 'ONLINE', NULL, NULL, 141.28, 0.00, 0.00, 14), (148, '2026-04-16 09:30:00', 97.85, 'Cash', 12, 3, 30, 0, NULL, 'IN_STORE', NULL, NULL, 97.85, 0.00, 0.00, 9), -(149, '2026-04-16 11:45:00', 89.36, 'Card', 6, 1, 31, 0, NULL, 'ONLINE', NULL, NULL, 89.36, 0.00, 0.00, 8); +(149, '2026-04-16 11:45:00', 89.36, 'Card', 6, 1, 31, 0, NULL, 'ONLINE', NULL, NULL, 89.36, 0.00, 0.00, 8), +(150, '2026-04-17 09:15:00', 112.38, 'Cash', 13, 3, 32, 0, NULL, 'IN_STORE', NULL, NULL, 112.38, 0.00, 0.00, 11), +(151, '2026-04-17 11:30:00', 67.49, 'Card', 5, 1, 33, 0, NULL, 'ONLINE', NULL, NULL, 67.49, 0.00, 0.00, 6), +(152, '2026-04-17 14:45:00', 158.20, 'Cash', 9, 2, 34, 0, NULL, 'IN_STORE', NULL, NULL, 158.20, 0.00, 0.00, 15), +(153, '2026-04-18 09:30:00', 84.76, 'Card', 14, 3, 35, 0, NULL, 'ONLINE', NULL, NULL, 84.76, 0.00, 0.00, 8), +(154, '2026-04-18 12:00:00', 203.15, 'Cash', 4, 1, 36, 0, NULL, 'IN_STORE', NULL, NULL, 203.15, 0.00, 0.00, 20), +(155, '2026-04-18 15:15:00', 45.93, 'Card', 7, 2, 37, 0, NULL, 'ONLINE', NULL, NULL, 45.93, 0.00, 0.00, 4), +(156, '2026-04-19 10:00:00', 129.84, 'Cash', 11, 3, 38, 0, NULL, 'IN_STORE', NULL, NULL, 129.84, 0.00, 0.00, 12), +(157, '2026-04-19 13:30:00', 76.50, 'Card', 6, 1, 39, 0, NULL, 'ONLINE', NULL, NULL, 76.50, 0.00, 0.00, 7); INSERT IGNORE INTO saleItem (saleItemId, saleId, prodId, quantity, unitPrice) VALUES (264, 134, 1, 2, 25.09), @@ -2487,4 +2509,20 @@ INSERT IGNORE INTO saleItem (saleItemId, saleId, prodId, quantity, unitPrice) VA (292, 148, 10, 1, 73.89), (293, 148, 24, 1, 23.96), (294, 149, 31, 2, 21.29), -(295, 149, 5, 1, 46.78); +(295, 149, 5, 1, 46.78), +(296, 150, 20, 2, 27.49), +(297, 150, 33, 1, 57.40), +(298, 151, 2, 1, 30.51), +(299, 151, 16, 2, 18.49), +(300, 152, 34, 2, 59.42), +(301, 152, 11, 1, 39.36), +(302, 153, 23, 2, 19.60), +(303, 153, 9, 1, 45.56), +(304, 154, 37, 1, 97.56), +(305, 154, 28, 1, 105.59), +(306, 155, 26, 1, 32.67), +(307, 155, 12, 1, 13.26), +(308, 156, 19, 3, 25.27), +(309, 156, 30, 1, 54.03), +(310, 157, 6, 1, 52.20), +(311, 157, 14, 2, 12.15);