@@ -0,0 +1,2 @@ | |||||
#Tue Jul 29 15:07:46 HKT 2025 | |||||
gradle.version=8.8 |
@@ -0,0 +1 @@ | |||||
A529778372605FAC613352A2BF21BC257D08DB2AFEC2742AC2C16409AF1B84A9 |
@@ -0,0 +1,46 @@ | |||||
/* | |||||
{ | |||||
"version": "0.2.0", | |||||
"configurations": [ | |||||
{ | |||||
"type": "java", | |||||
"name": "Current File", | |||||
"request": "launch", | |||||
"mainClass": "${file}" | |||||
}, | |||||
{ | |||||
"type": "java", | |||||
"name": "Pet_App", | |||||
"request": "launch", | |||||
"mainClass": "com.ffii.fhsmsc.Pet_App", | |||||
"projectName": "PET_APP", | |||||
"console": "internalConsole", | |||||
"vmArgs": "-Djava.util.logging.SimpleFormatter.format='%1$tF %1$tT %4$s %2$s %5$s%6$s%n'" | |||||
} | |||||
] | |||||
} | |||||
*/ | |||||
{ | |||||
// Use IntelliSense to learn about possible attributes. | |||||
// Hover to view descriptions of existing attributes. | |||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |||||
"version": "0.2.0", | |||||
"configurations": [ | |||||
{ | |||||
"type": "java", | |||||
"name": "Pet_App", | |||||
"request": "launch", | |||||
"mainClass": "com.ffii.fhsmsc.Pet_App", | |||||
"projectName": "FhsmsC" | |||||
}, | |||||
{ | |||||
"type": "java", | |||||
"name": "Launch Local", | |||||
"request": "launch", | |||||
"mainClass": "com.ffii.fhsmsc.Pet_App", | |||||
"console": "internalConsole", | |||||
"projectName": "", | |||||
"args": "--spring.profiles.active=db-local,local" | |||||
} | |||||
] | |||||
} |
@@ -1,34 +0,0 @@ | |||||
JAVA version : Openjdk 17 (jdk-17.0.2) | |||||
For launch.json: | |||||
{ | |||||
// Use IntelliSense to learn about possible attributes. | |||||
// Hover to view descriptions of existing attributes. | |||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |||||
"version": "0.2.0", | |||||
"configurations": [ | |||||
{ | |||||
"type": "java", | |||||
"name": "FhsmsCApplication", | |||||
"request": "launch", | |||||
"mainClass": "com.ffii.fhsmsc.FhsmsCApplication", | |||||
"projectName": "FhsmsC" | |||||
}, | |||||
{ | |||||
"type": "java", | |||||
"name": "Launch Local", | |||||
"request": "launch", | |||||
"mainClass": "com.ffii.fhsmsc.FhsmsCApplication", | |||||
"console": "internalConsole", | |||||
"projectName": "", | |||||
"args": "--spring.profiles.active=db-local,local" | |||||
} | |||||
] | |||||
} | |||||
######################### | |||||
For build war | |||||
1. run .\gradlew clean build | |||||
2. go to path: .\build\libs | |||||
3. copy war to Tomcat server | |||||
@@ -1,7 +1,7 @@ | |||||
spring: | spring: | ||||
datasource: | datasource: | ||||
jdbc-url: jdbc:mysql://192.168.1.228:3306/fhsmscdb?useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8 | |||||
jdbc-url: jdbc:mysql://192.168.1.228:3308/fhsmscdb?useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8 | |||||
username: root | username: root | ||||
password: secret | password: secret | ||||
driver-class-name: com.mysql.cj.jdbc.Driver | driver-class-name: com.mysql.cj.jdbc.Driver | ||||
@@ -1,7 +1,7 @@ | |||||
spring: | spring: | ||||
datasource: | datasource: | ||||
jdbc-url: jdbc:mysql://127.0.0.1:3306/fhsmscdb?useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8 | |||||
jdbc-url: jdbc:mysql://127.0.0.1:3308/fhsmscdb?useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8 | |||||
username: root | username: root | ||||
password: secret | password: secret | ||||
driver-class-name: com.mysql.cj.jdbc.Driver | driver-class-name: com.mysql.cj.jdbc.Driver | ||||
@@ -1 +0,0 @@ | |||||
C:\workspace\FHSMS-C-backend\src\main\java\com\ffii\fhsmsc\modules\Menu\req\fb_menuResponsity.java |
@@ -1,8 +0,0 @@ | |||||
--liquibase formatted sql | |||||
--changeset terence:insert setting | |||||
--comment: insert setting | |||||
INSERT INTO `user` ( `id`, `created`, `createdBy`, `version`, `modified`, `modifiedBy`, `deleted`, `username`, `password`, `locked`, `expiryDate`, `name`, `locale`, `fullname`, `firstname`, `lastname`, `title`, `department`, `email`, `phone1`, `phone2`, `remarks`, `post` ) VALUES ( '2', NOW(), '2', '0', NOW(), '2', '0', '2fi2', '1234', '0', NULL, '2fi2', NULL, '2fi2', NULL, NULL, NULL, NULL, '', '', NULL, NULL, '' ); | |||||
INSERT INTO `user_group` (`groupId`, `userId`) VALUES ('2', '2'); |
@@ -1,54 +0,0 @@ | |||||
--liquibase formatted sql | |||||
--changeset terence:create-table-and-insert-data | |||||
--comment: Create table and insert data | |||||
CREATE TABLE `food1` ( | |||||
`id` int(11) NOT NULL, | |||||
`name` varchar(100) NOT NULL, | |||||
`kcal` decimal(10,2) DEFAULT NULL, | |||||
`protein` decimal(10,2) NOT NULL DEFAULT 0.00, | |||||
`fat` decimal(10,2) NOT NULL DEFAULT 0.00, | |||||
`satFat` decimal(10,2) NOT NULL DEFAULT 0.00, | |||||
`carbo` decimal(10,2) NOT NULL DEFAULT 0.00, | |||||
`sodium` decimal(10,2) NOT NULL DEFAULT 0.00, | |||||
`Ingredients` varchar(255) DEFAULT NULL, | |||||
`food_type` varchar(255) DEFAULT NULL | |||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; | |||||
INSERT INTO `food1` (`id`, `name`, `kcal`, `protein`, `fat`, `satFat`, `carbo`, `sodium`, `Ingredients`, `food_type`) VALUES | |||||
(1, 'Apple', 52.00, 0.00, 0.00, 0.00, 14.00, 0.00, NULL, 'fruit'), | |||||
(2, 'Banana', 105.00, 1.30, 0.30, 0.10, 27.00, 1.00, NULL, 'fruit'), | |||||
(3, 'Chicken breast', 165.00, 31.00, 6.10, 2.00, 1.00, 69.00, NULL, 'food'), | |||||
(4, 'Brown rice', 216.00, 5.00, 3.00, 0.40, 45.00, 0.00, NULL, 'food'), | |||||
(5, 'Yogurt', 148.00, 5.20, 6.10, 3.40, 10.00, 125.00, NULL, 'food'), | |||||
(6, 'Egg', 78.00, 6.30, 5.60, 1.60, 0.40, 62.00, NULL, 'food'), | |||||
(7, 'Avocado', 160.00, 2.00, 14.60, 2.00, 8.50, 7.00, NULL, 'fruit'), | |||||
(8, 'Salmon', 206.00, 22.00, 13.60, 3.80, 5.00, 0.00, NULL, 'food'), | |||||
(9, 'Spinach', 23.00, 2.70, 0.40, 0.10, 3.60, 79.00, NULL, 'vegetable'), | |||||
(10, 'Carrot', 41.00, 0.90, 0.20, 0.00, 9.60, 69.00, NULL, 'vegetable'), | |||||
(11, 'Broccoli', 34.00, 2.80, 0.60, 0.20, 6.60, 66.00, NULL, 'vegetable'), | |||||
(12, 'Potato', 77.00, 2.00, 0.10, 0.00, 17.30, 10.00, NULL, 'vegetable'), | |||||
(13, 'Sweet potato', 101.00, 1.60, 0.10, 0.00, 22.00, 3.00, NULL, 'vegetable'), | |||||
(14, 'Onion', 40.00, 1.40, 0.10, 0.00, 9.30, 3.00, NULL, 'vegetable'), | |||||
(15, 'Garlic', 140.00, 6.70, 15.40, 3.30, 6.20, 167.00, NULL, 'food'), | |||||
(16, 'Tomato', 18.00, 0.90, 0.20, 0.00, 3.90, 5.00, NULL, 'vegetable'), | |||||
(17, 'Cucumber', 16.00, 0.70, 0.10, 0.00, 3.80, 2.00, NULL, 'fruit'), | |||||
(18, 'Lettuce', 8.00, 0.80, 0.20, 0.10, 1.70, 5.00, NULL, 'vegetable'), | |||||
(19, 'Bread', 265.00, 9.40, 4.60, 1.30, 52.00, 150.00, NULL, 'food'), | |||||
(20, 'Pasta', 131.00, 5.50, 1.00, 0.20, 26.00, 0.00, NULL, 'food'), | |||||
(21, 'Cheese', 402.00, 20.60, 33.10, 23.20, 1.30, 0.00, NULL, 'food'), | |||||
(22, 'Milk', 50.00, 3.30, 3.30, 1.70, 4.80, 120.00, NULL, 'drink'), | |||||
(23, 'Beef', 250.00, 22.00, 21.00, 8.00, 0.00, 50.00, NULL, 'food'), | |||||
(24, 'Pork', 241.00, 15.10, 19.70, 7.30, 0.00, 49.00, NULL, 'food'), | |||||
(25, 'Lamb', 294.00, 17.50, 23.20, 9.20, 0.00, 0.00, NULL, 'food'), | |||||
(26, 'Chicken thigh', 197.00, 27.00, 14.90, 5.20, 0.00, 0.00, NULL, 'food'); | |||||
ALTER TABLE `food1` | |||||
ADD PRIMARY KEY (`id`); | |||||
ALTER TABLE `food1` | |||||
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=27; | |||||
COMMIT; |
@@ -1,19 +0,0 @@ | |||||
--liquibase formatted sql | |||||
--changeset terence:create-table-and-insert-data | |||||
--comment: Create table and insert data | |||||
CREATE TABLE `food_items` ( | |||||
`id` int(11) NOT NULL, | |||||
`name` varchar(255) NOT NULL, | |||||
`kcal` float DEFAULT NULL, | |||||
`protein` float DEFAULT NULL, | |||||
`fat` float DEFAULT NULL, | |||||
`sat_fat` float DEFAULT NULL, | |||||
`carbo` float DEFAULT NULL, | |||||
`sodium` float DEFAULT NULL, | |||||
`date` datetime DEFAULT NULL, | |||||
`size` float DEFAULT NULL, | |||||
`meal` varchar(50) DEFAULT NULL, | |||||
`user_id` int(11) DEFAULT NULL | |||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; |
@@ -1,352 +0,0 @@ | |||||
--liquibase formatted sql | |||||
--changeset terence:create-table-and-insert-data | |||||
--comment: Alter table and insert data | |||||
INSERT INTO `food_items` (`id`, `name`, `kcal`, `protein`, `fat`, `sat_fat`, `carbo`, `sodium`, `date`, `size`, `meal`, `user_id`) VALUES | |||||
(4, 'Banana', 105, 1.3, 0.3, 0.1, 27, 1, '2024-11-12 03:36:53', 100, 'breakfast', 1), | |||||
(5, 'Banana', 105, 1.3, 0.3, 0.1, 27, 1, '2024-11-10 04:04:28', 100, 'breakfast', 2), | |||||
(7, 'Banana', 9450, 117, 27, 9, 2430, 90, '2024-11-11 14:20:39', 9000, 'breakfast', 1), | |||||
(16, 'Salmon', 206, 22, 13.6, 3.8, 5, 0, '2024-11-14 02:02:19', 100, 'Dinner', 1), | |||||
(21, 'Pork', 180.8, 11.3, 14.8, 5.5, 0, 36.8, '2024-11-04 06:09:00', 75, 'Breakfast', 1), | |||||
(22, 'Pork', 337.4, 21.1, 27.6, 10.2, 0, 68.6, '2024-11-04 13:06:00', 140, 'Lunch', 1), | |||||
(23, 'Bread', 532.6, 18.9, 9.2, 2.6, 104.5, 301.5, '2024-11-04 17:28:00', 201, 'Dinner', 1), | |||||
(24, 'Garlic', 436.8, 20.9, 48, 10.3, 19.3, 521, '2024-11-04 17:28:00', 312, 'Dinner', 1), | |||||
(25, 'Bread', 1240.2, 44, 21.5, 6.1, 243.4, 702, '2024-11-05 06:40:00', 468, 'Breakfast', 1), | |||||
(26, 'Cucumber', 26.4, 1.2, 0.2, 0, 6.3, 3.3, '2024-11-05 06:40:00', 165, 'Breakfast', 1), | |||||
(27, 'Apple', 86.8, 0, 0, 0, 23.4, 0, '2024-11-05 12:35:00', 167, 'Lunch', 1), | |||||
(28, 'Bread', 638.7, 22.7, 11.1, 3.1, 125.3, 361.5, '2024-11-05 12:35:00', 241, 'Lunch', 1), | |||||
(29, 'Milk', 63.5, 4.2, 4.2, 2.2, 6.1, 152.4, '2024-11-05 17:36:00', 127, 'Dinner', 1), | |||||
(30, 'Broccoli', 31.6, 2.6, 0.6, 0.2, 6.1, 61.4, '2024-11-06 08:02:00', 93, 'Breakfast', 1), | |||||
(31, 'Potato', 184, 4.8, 0.2, 0, 41.3, 23.9, '2024-11-06 11:54:00', 239, 'Lunch', 1), | |||||
(32, 'Brown rice', 395.3, 9.2, 5.5, 0.7, 82.4, 0, '2024-11-06 11:54:00', 183, 'Lunch', 1), | |||||
(33, 'Yogurt', 130.2, 4.6, 5.4, 3, 8.8, 110, '2024-11-06 17:23:00', 88, 'Dinner', 1), | |||||
(34, 'Milk', 235, 15.5, 15.5, 8, 22.6, 564, '2024-11-07 06:00:00', 470, 'Breakfast', 1), | |||||
(35, 'Pasta', 279, 11.7, 2.1, 0.4, 55.4, 0, '2024-11-07 06:00:00', 213, 'Breakfast', 1), | |||||
(36, 'Lamb', 385.1, 22.9, 30.4, 12.1, 0, 0, '2024-11-07 13:43:00', 131, 'Lunch', 1), | |||||
(37, 'Yogurt', 497.3, 17.5, 20.5, 11.4, 33.6, 420, '2024-11-07 13:43:00', 336, 'Lunch', 1), | |||||
(38, 'Egg', 122.5, 9.9, 8.8, 2.5, 0.6, 97.3, '2024-11-07 19:13:00', 157, 'Dinner', 1), | |||||
(39, 'Carrot', 89, 2, 0.4, 0, 20.8, 149.7, '2024-11-07 19:13:00', 217, 'Dinner', 1), | |||||
(40, 'Garlic', 680.4, 32.6, 74.8, 16, 30.1, 811.6, '2024-11-08 08:52:00', 486, 'Breakfast', 1), | |||||
(41, 'Egg', 79.6, 6.4, 5.7, 1.6, 0.4, 63.2, '2024-11-08 08:52:00', 102, 'Breakfast', 1), | |||||
(42, 'Potato', 63.9, 1.7, 0.1, 0, 14.4, 8.3, '2024-11-08 13:22:00', 83, 'Lunch', 1), | |||||
(43, 'Salmon', 984.7, 105.2, 65, 18.2, 23.9, 0, '2024-11-08 19:18:00', 478, 'Dinner', 1), | |||||
(44, 'Tomato', 86, 4.3, 1, 0, 18.6, 23.9, '2024-11-09 06:19:00', 478, 'Breakfast', 1), | |||||
(45, 'Garlic', 518, 24.8, 57, 12.2, 22.9, 617.9, '2024-11-09 11:32:00', 370, 'Lunch', 1), | |||||
(46, 'Beef', 907.5, 79.9, 76.2, 29, 0, 181.5, '2024-11-09 11:32:00', 363, 'Lunch', 1), | |||||
(47, 'Beef', 517.5, 45.5, 43.5, 16.6, 0, 103.5, '2024-11-09 18:54:00', 207, 'Dinner', 1), | |||||
(48, 'Brown rice', 658.8, 15.2, 9.1, 1.2, 137.2, 0, '2024-11-09 18:54:00', 305, 'Dinner', 1), | |||||
(49, 'Egg', 69.4, 5.6, 5, 1.4, 0.4, 55.2, '2024-11-10 08:40:00', 89, 'Breakfast', 1), | |||||
(50, 'Apple', 90, 0, 0, 0, 24.2, 0, '2024-11-10 11:17:00', 173, 'Lunch', 1), | |||||
(51, 'Chicken breast', 227.7, 42.8, 8.4, 2.8, 0, 95.2, '2024-11-10 11:17:00', 138, 'Lunch', 1), | |||||
(52, 'Brown rice', 561.6, 13, 7.8, 1, 117, 0, '2024-11-10 17:05:00', 260, 'Dinner', 1), | |||||
(53, 'Spinach', 85.3, 10, 1.5, 0.4, 13.4, 293.1, '2024-11-04 08:47:00', 371, 'Breakfast', 2), | |||||
(54, 'Potato', 224.8, 5.8, 0.3, 0, 50.5, 29.2, '2024-11-04 08:47:00', 292, 'Breakfast', 2), | |||||
(55, 'Pork', 282, 17.7, 23, 8.5, 0, 57.3, '2024-11-04 13:48:00', 117, 'Lunch', 2), | |||||
(56, 'Cheese', 695.5, 35.6, 57.3, 40.1, 2.2, 0, '2024-11-04 19:05:00', 173, 'Dinner', 2), | |||||
(57, 'Cucumber', 16, 0.7, 0.1, 0, 3.8, 2, '2024-11-05 07:37:00', 100, 'Breakfast', 2), | |||||
(58, 'Cheese', 1523.6, 78.1, 125.4, 87.9, 4.9, 0, '2024-11-05 07:37:00', 379, 'Breakfast', 2), | |||||
(59, 'Chicken thigh', 374.3, 51.3, 28.3, 9.9, 0, 0, '2024-11-05 13:53:00', 190, 'Lunch', 2), | |||||
(60, 'Chicken thigh', 439.3, 60.2, 33.2, 11.6, 0, 0, '2024-11-05 13:53:00', 223, 'Lunch', 2), | |||||
(61, 'Garlic', 520.8, 24.9, 57.3, 12.3, 23.1, 621.2, '2024-11-05 18:09:00', 372, 'Dinner', 2), | |||||
(62, 'Apple', 210.6, 0, 0, 0, 56.7, 0, '2024-11-05 18:09:00', 405, 'Dinner', 2), | |||||
(63, 'Pasta', 191.3, 8, 1.5, 0.3, 38, 0, '2024-11-06 08:19:00', 146, 'Breakfast', 2), | |||||
(64, 'Yogurt', 338.9, 11.9, 14, 7.8, 22.9, 286.2, '2024-11-06 13:41:00', 229, 'Lunch', 2), | |||||
(65, 'Cucumber', 41.9, 1.8, 0.3, 0, 10, 5.2, '2024-11-06 13:41:00', 262, 'Lunch', 2), | |||||
(66, 'Potato', 170.2, 4.4, 0.2, 0, 38.2, 22.1, '2024-11-06 17:15:00', 221, 'Dinner', 2), | |||||
(67, 'Carrot', 125.5, 2.8, 0.6, 0, 29.4, 211.1, '2024-11-06 17:15:00', 306, 'Dinner', 2), | |||||
(68, 'Chicken thigh', 496.4, 68, 37.5, 13.1, 0, 0, '2024-11-07 08:03:00', 252, 'Breakfast', 2), | |||||
(69, 'Egg', 59.3, 4.8, 4.3, 1.2, 0.3, 47.1, '2024-11-07 08:03:00', 76, 'Breakfast', 2), | |||||
(70, 'Onion', 117.2, 4.1, 0.3, 0, 27.2, 8.8, '2024-11-07 12:33:00', 293, 'Lunch', 2), | |||||
(71, 'Pasta', 119.2, 5, 0.9, 0.2, 23.7, 0, '2024-11-07 12:33:00', 91, 'Lunch', 2), | |||||
(72, 'Carrot', 81.2, 1.8, 0.4, 0, 19, 136.6, '2024-11-07 17:09:00', 198, 'Dinner', 2), | |||||
(73, 'Spinach', 70.4, 8.3, 1.2, 0.3, 11, 241.7, '2024-11-08 07:29:00', 306, 'Breakfast', 2), | |||||
(74, 'Bread', 1240.2, 44, 21.5, 6.1, 243.4, 702, '2024-11-08 07:29:00', 468, 'Breakfast', 2), | |||||
(75, 'Apple', 225.7, 0, 0, 0, 60.8, 0, '2024-11-08 13:24:00', 434, 'Lunch', 2), | |||||
(76, 'Garlic', 491.4, 23.5, 54.1, 11.6, 21.8, 586.2, '2024-11-08 13:24:00', 351, 'Lunch', 2), | |||||
(77, 'Chicken breast', 183.2, 34.4, 6.8, 2.2, 0, 76.6, '2024-11-08 18:06:00', 111, 'Dinner', 2), | |||||
(78, 'Banana', 487.2, 6, 1.4, 0.5, 125.3, 4.6, '2024-11-08 18:06:00', 464, 'Dinner', 2), | |||||
(79, 'Tomato', 21.2, 1.1, 0.2, 0, 4.6, 5.9, '2024-11-09 06:11:00', 118, 'Breakfast', 2), | |||||
(80, 'Spinach', 110.9, 13, 1.9, 0.5, 17.4, 380.8, '2024-11-09 06:11:00', 482, 'Breakfast', 2), | |||||
(81, 'Cucumber', 68, 3, 0.4, 0, 16.1, 8.5, '2024-11-09 12:33:00', 425, 'Lunch', 2), | |||||
(82, 'Chicken breast', 189.7, 35.6, 7, 2.3, 0, 79.3, '2024-11-09 17:53:00', 115, 'Dinner', 2), | |||||
(83, 'Lamb', 1396.5, 83.1, 110.2, 43.7, 0, 0, '2024-11-10 08:16:00', 475, 'Breakfast', 2), | |||||
(84, 'Lamb', 1437.7, 85.6, 113.4, 45, 0, 0, '2024-11-10 12:08:00', 489, 'Lunch', 2), | |||||
(85, 'Bread', 561.8, 19.9, 9.8, 2.8, 110.2, 318, '2024-11-10 12:08:00', 212, 'Lunch', 2), | |||||
(86, 'Chicken thigh', 478.7, 65.6, 36.2, 12.6, 0, 0, '2024-11-10 18:47:00', 243, 'Dinner', 2), | |||||
(87, 'Apple', 43.2, 0, 0, 0, 11.6, 0, '2024-11-04 08:13:00', 83, 'Breakfast', 3), | |||||
(88, 'Garlic', 109.2, 5.2, 12, 2.6, 4.8, 130.3, '2024-11-04 11:22:00', 78, 'Lunch', 3), | |||||
(89, 'Broccoli', 158.8, 13.1, 2.8, 0.9, 30.8, 308.2, '2024-11-04 11:22:00', 467, 'Lunch', 3), | |||||
(90, 'Milk', 200, 13.2, 13.2, 6.8, 19.2, 480, '2024-11-04 18:25:00', 400, 'Dinner', 3), | |||||
(91, 'Cheese', 1290.4, 66.1, 106.3, 74.5, 4.2, 0, '2024-11-05 07:51:00', 321, 'Breakfast', 3), | |||||
(92, 'Tomato', 71.6, 3.6, 0.8, 0, 15.5, 19.9, '2024-11-05 07:51:00', 398, 'Breakfast', 3), | |||||
(93, 'Lamb', 308.7, 18.4, 24.4, 9.7, 0, 0, '2024-11-05 13:43:00', 105, 'Lunch', 3), | |||||
(94, 'Yogurt', 464.7, 16.3, 19.2, 10.7, 31.4, 392.5, '2024-11-05 17:15:00', 314, 'Dinner', 3), | |||||
(95, 'Lamb', 726.2, 43.2, 57.3, 22.7, 0, 0, '2024-11-06 08:12:00', 247, 'Breakfast', 3), | |||||
(96, 'Beef', 607.5, 53.5, 51, 19.4, 0, 121.5, '2024-11-06 08:12:00', 243, 'Breakfast', 3), | |||||
(97, 'Garlic', 427, 20.4, 47, 10.1, 18.9, 509.3, '2024-11-06 11:43:00', 305, 'Lunch', 3), | |||||
(98, 'Salmon', 271.9, 29, 18, 5, 6.6, 0, '2024-11-06 19:18:00', 132, 'Dinner', 3), | |||||
(99, 'Salmon', 366.7, 39.2, 24.2, 6.8, 8.9, 0, '2024-11-07 07:44:00', 178, 'Breakfast', 3), | |||||
(100, 'Sweet potato', 404, 6.4, 0.4, 0, 88, 12, '2024-11-07 12:21:00', 400, 'Lunch', 3), | |||||
(101, 'Sweet potato', 101, 1.6, 0.1, 0, 22, 3, '2024-11-07 18:45:00', 100, 'Dinner', 3), | |||||
(102, 'Lettuce', 8.6, 0.9, 0.2, 0.1, 1.8, 5.4, '2024-11-08 08:42:00', 107, 'Breakfast', 3), | |||||
(103, 'Garlic', 233.8, 11.2, 25.7, 5.5, 10.4, 278.9, '2024-11-08 08:42:00', 167, 'Breakfast', 3), | |||||
(104, 'Milk', 207.5, 13.7, 13.7, 7.1, 19.9, 498, '2024-11-08 11:06:00', 415, 'Lunch', 3), | |||||
(105, 'Cheese', 747.7, 38.3, 61.6, 43.2, 2.4, 0, '2024-11-08 11:06:00', 186, 'Lunch', 3), | |||||
(106, 'Salmon', 828.1, 88.4, 54.7, 15.3, 20.1, 0, '2024-11-08 19:08:00', 402, 'Dinner', 3), | |||||
(107, 'Yogurt', 216.1, 7.6, 8.9, 5, 14.6, 182.5, '2024-11-08 19:08:00', 146, 'Dinner', 3), | |||||
(108, 'Bread', 816.2, 29, 14.2, 4, 160.2, 462, '2024-11-09 06:17:00', 308, 'Breakfast', 3), | |||||
(109, 'Onion', 190.4, 6.7, 0.5, 0, 44.3, 14.3, '2024-11-09 13:04:00', 476, 'Lunch', 3), | |||||
(110, 'Banana', 280.3, 3.5, 0.8, 0.3, 72.1, 2.7, '2024-11-09 13:04:00', 267, 'Lunch', 3), | |||||
(111, 'Avocado', 574.4, 7.2, 52.4, 7.2, 30.5, 25.1, '2024-11-09 17:53:00', 359, 'Dinner', 3), | |||||
(112, 'Carrot', 41.4, 0.9, 0.2, 0, 9.7, 69.7, '2024-11-10 06:57:00', 101, 'Breakfast', 3), | |||||
(113, 'Cheese', 1093.4, 56, 90, 63.1, 3.5, 0, '2024-11-10 11:51:00', 272, 'Lunch', 3), | |||||
(114, 'Pork', 253.1, 15.9, 20.7, 7.7, 0, 51.5, '2024-11-10 11:51:00', 105, 'Lunch', 3), | |||||
(115, 'Lettuce', 8.6, 0.9, 0.2, 0.1, 1.8, 5.4, '2024-11-10 17:02:00', 108, 'Dinner', 3), | |||||
(116, 'Milk', 98, 6.5, 6.5, 3.3, 9.4, 235.2, '2024-11-10 17:02:00', 196, 'Dinner', 3), | |||||
(117, 'Cucumber', 69.3, 3, 0.4, 0, 16.5, 8.7, '2024-11-04 07:44:00', 433, 'Breakfast', 4), | |||||
(118, 'Pasta', 482.1, 20.2, 3.7, 0.7, 95.7, 0, '2024-11-04 07:44:00', 368, 'Breakfast', 4), | |||||
(119, 'Lamb', 358.7, 21.3, 28.3, 11.2, 0, 0, '2024-11-04 11:37:00', 122, 'Lunch', 4), | |||||
(120, 'Pork', 257.9, 16.2, 21.1, 7.8, 0, 52.4, '2024-11-04 11:37:00', 107, 'Lunch', 4), | |||||
(121, 'Banana', 269.8, 3.3, 0.8, 0.3, 69.4, 2.6, '2024-11-04 18:32:00', 257, 'Dinner', 4), | |||||
(122, 'Tomato', 24.7, 1.2, 0.3, 0, 5.3, 6.9, '2024-11-04 18:32:00', 137, 'Dinner', 4), | |||||
(123, 'Yogurt', 384.8, 13.5, 15.9, 8.8, 26, 325, '2024-11-05 06:05:00', 260, 'Breakfast', 4), | |||||
(124, 'Yogurt', 380.4, 13.4, 15.7, 8.7, 25.7, 321.2, '2024-11-05 06:05:00', 257, 'Breakfast', 4), | |||||
(125, 'Lettuce', 17, 1.7, 0.4, 0.2, 3.6, 10.6, '2024-11-05 12:17:00', 212, 'Lunch', 4), | |||||
(126, 'Milk', 214, 14.1, 14.1, 7.3, 20.5, 513.6, '2024-11-05 12:17:00', 428, 'Lunch', 4), | |||||
(127, 'Egg', 244.9, 19.8, 17.6, 5, 1.3, 194.7, '2024-11-05 17:57:00', 314, 'Dinner', 4), | |||||
(128, 'Pork', 1185.7, 74.3, 96.9, 35.9, 0, 241.1, '2024-11-05 17:57:00', 492, 'Dinner', 4), | |||||
(129, 'Yogurt', 519.5, 18.3, 21.4, 11.9, 35.1, 438.8, '2024-11-06 06:03:00', 351, 'Breakfast', 4), | |||||
(130, 'Sweet potato', 502, 8, 0.5, 0, 109.3, 14.9, '2024-11-06 06:03:00', 497, 'Breakfast', 4), | |||||
(131, 'Bread', 1017.6, 36.1, 17.7, 5, 199.7, 576, '2024-11-06 12:56:00', 384, 'Lunch', 4), | |||||
(132, 'Lamb', 1237.7, 73.7, 97.7, 38.7, 0, 0, '2024-11-06 18:02:00', 421, 'Dinner', 4), | |||||
(133, 'Avocado', 384, 4.8, 35, 4.8, 20.4, 16.8, '2024-11-07 07:48:00', 240, 'Breakfast', 4), | |||||
(134, 'Milk', 103.5, 6.8, 6.8, 3.5, 9.9, 248.4, '2024-11-07 07:48:00', 207, 'Breakfast', 4), | |||||
(135, 'Broccoli', 124.8, 10.3, 2.2, 0.7, 24.2, 242.2, '2024-11-07 13:38:00', 367, 'Lunch', 4), | |||||
(136, 'Cheese', 932.6, 47.8, 76.8, 53.8, 3, 0, '2024-11-07 13:38:00', 232, 'Lunch', 4), | |||||
(137, 'Lettuce', 19.2, 1.9, 0.5, 0.2, 4.1, 12, '2024-11-07 17:46:00', 240, 'Dinner', 4), | |||||
(138, 'Lamb', 655.6, 39, 51.7, 20.5, 0, 0, '2024-11-07 17:46:00', 223, 'Dinner', 4), | |||||
(139, 'Chicken thigh', 922, 126.4, 69.7, 24.3, 0, 0, '2024-11-08 06:52:00', 468, 'Breakfast', 4), | |||||
(140, 'Chicken thigh', 165.5, 22.7, 12.5, 4.4, 0, 0, '2024-11-08 06:52:00', 84, 'Breakfast', 4), | |||||
(141, 'Brown rice', 607, 14.1, 8.4, 1.1, 126.5, 0, '2024-11-08 11:38:00', 281, 'Lunch', 4), | |||||
(142, 'Yogurt', 627.5, 22, 25.9, 14.4, 42.4, 530, '2024-11-08 18:25:00', 424, 'Dinner', 4), | |||||
(143, 'Chicken breast', 94, 17.7, 3.5, 1.1, 0, 39.3, '2024-11-09 08:14:00', 57, 'Breakfast', 4), | |||||
(144, 'Cucumber', 64.2, 2.8, 0.4, 0, 15.2, 8, '2024-11-09 11:24:00', 401, 'Lunch', 4), | |||||
(145, 'Cucumber', 20.5, 0.9, 0.1, 0, 4.9, 2.6, '2024-11-09 19:34:00', 128, 'Dinner', 4), | |||||
(146, 'Yogurt', 569.8, 20, 23.5, 13.1, 38.5, 481.2, '2024-11-09 19:34:00', 385, 'Dinner', 4), | |||||
(147, 'Egg', 172.4, 13.9, 12.4, 3.5, 0.9, 137, '2024-11-10 06:41:00', 221, 'Breakfast', 4), | |||||
(148, 'Milk', 218.5, 14.4, 14.4, 7.4, 21, 524.4, '2024-11-10 12:55:00', 437, 'Lunch', 4), | |||||
(149, 'Brown rice', 712.8, 16.5, 9.9, 1.3, 148.5, 0, '2024-11-10 12:55:00', 330, 'Lunch', 4), | |||||
(150, 'Garlic', 324.8, 15.5, 35.7, 7.7, 14.4, 387.4, '2024-11-10 18:24:00', 232, 'Dinner', 4), | |||||
(151, 'Potato', 57.8, 1.5, 0.1, 0, 13, 7.5, '2024-11-10 18:24:00', 75, 'Dinner', 4), | |||||
(152, 'Potato', 60.8, 1.6, 0.1, 0, 13.7, 7.9, '2024-11-04 07:23:00', 79, 'Breakfast', 5), | |||||
(153, 'Tomato', 85, 4.2, 0.9, 0, 18.4, 23.6, '2024-11-04 07:23:00', 472, 'Breakfast', 5), | |||||
(154, 'Sweet potato', 484.8, 7.7, 0.5, 0, 105.6, 14.4, '2024-11-04 11:51:00', 480, 'Lunch', 5), | |||||
(155, 'Lamb', 820.3, 48.8, 64.7, 25.7, 0, 0, '2024-11-04 17:50:00', 279, 'Dinner', 5), | |||||
(156, 'Pork', 301.2, 18.9, 24.6, 9.1, 0, 61.2, '2024-11-05 06:15:00', 125, 'Breakfast', 5), | |||||
(157, 'Bread', 1057.4, 37.5, 18.4, 5.2, 207.5, 598.5, '2024-11-05 06:15:00', 399, 'Breakfast', 5), | |||||
(158, 'Tomato', 85.9, 4.3, 1, 0, 18.6, 23.8, '2024-11-05 11:50:00', 477, 'Lunch', 5), | |||||
(159, 'Pork', 819.4, 51.3, 67, 24.8, 0, 166.6, '2024-11-05 11:50:00', 340, 'Lunch', 5), | |||||
(160, 'Egg', 48.4, 3.9, 3.5, 1, 0.2, 38.4, '2024-11-05 18:51:00', 62, 'Dinner', 5), | |||||
(161, 'Cucumber', 58.1, 2.5, 0.4, 0, 13.8, 7.3, '2024-11-05 18:51:00', 363, 'Dinner', 5), | |||||
(162, 'Garlic', 642.6, 30.8, 70.7, 15.1, 28.5, 766.5, '2024-11-06 08:26:00', 459, 'Breakfast', 5), | |||||
(163, 'Lettuce', 11, 1.1, 0.3, 0.1, 2.3, 6.9, '2024-11-06 08:26:00', 137, 'Breakfast', 5), | |||||
(164, 'Garlic', 253.4, 12.1, 27.9, 6, 11.2, 302.3, '2024-11-06 11:43:00', 181, 'Lunch', 5), | |||||
(165, 'Yogurt', 389.2, 13.7, 16, 8.9, 26.3, 328.8, '2024-11-06 11:43:00', 263, 'Lunch', 5), | |||||
(166, 'Beef', 1125, 99, 94.5, 36, 0, 225, '2024-11-06 18:56:00', 450, 'Dinner', 5), | |||||
(167, 'Brown rice', 382.3, 8.8, 5.3, 0.7, 79.7, 0, '2024-11-07 07:09:00', 177, 'Breakfast', 5), | |||||
(168, 'Avocado', 540.8, 6.8, 49.3, 6.8, 28.7, 23.7, '2024-11-07 13:16:00', 338, 'Lunch', 5), | |||||
(169, 'Broccoli', 154.7, 12.7, 2.7, 0.9, 30, 300.3, '2024-11-07 13:16:00', 455, 'Lunch', 5), | |||||
(170, 'Apple', 215.8, 0, 0, 0, 58.1, 0, '2024-11-07 18:54:00', 415, 'Dinner', 5), | |||||
(171, 'Spinach', 50.1, 5.9, 0.9, 0.2, 7.8, 172.2, '2024-11-08 07:10:00', 218, 'Breakfast', 5), | |||||
(172, 'Broccoli', 24.1, 2, 0.4, 0.1, 4.7, 46.9, '2024-11-08 11:41:00', 71, 'Lunch', 5), | |||||
(173, 'Milk', 189.5, 12.5, 12.5, 6.4, 18.2, 454.8, '2024-11-08 17:13:00', 379, 'Dinner', 5), | |||||
(174, 'Cheese', 1893.4, 97, 155.9, 109.3, 6.1, 0, '2024-11-08 17:13:00', 471, 'Dinner', 5), | |||||
(175, 'Salmon', 253.4, 27.1, 16.7, 4.7, 6.2, 0, '2024-11-09 07:15:00', 123, 'Breakfast', 5), | |||||
(176, 'Lettuce', 34.6, 3.5, 0.9, 0.4, 7.3, 21.6, '2024-11-09 07:15:00', 432, 'Breakfast', 5), | |||||
(177, 'Lettuce', 7.4, 0.7, 0.2, 0.1, 1.6, 4.7, '2024-11-09 12:38:00', 93, 'Lunch', 5), | |||||
(178, 'Spinach', 57.5, 6.8, 1, 0.2, 9, 197.5, '2024-11-09 12:38:00', 250, 'Lunch', 5), | |||||
(179, 'Cucumber', 27, 1.2, 0.2, 0, 6.4, 3.4, '2024-11-09 17:59:00', 169, 'Dinner', 5), | |||||
(180, 'Egg', 81.1, 6.6, 5.8, 1.7, 0.4, 64.5, '2024-11-09 17:59:00', 104, 'Dinner', 5), | |||||
(181, 'Tomato', 45.9, 2.3, 0.5, 0, 9.9, 12.8, '2024-11-10 07:50:00', 255, 'Breakfast', 5), | |||||
(182, 'Tomato', 81.9, 4.1, 0.9, 0, 17.7, 22.8, '2024-11-10 12:02:00', 455, 'Lunch', 5), | |||||
(183, 'Salmon', 379, 40.5, 25, 7, 9.2, 0, '2024-11-10 18:02:00', 184, 'Dinner', 5), | |||||
(184, 'Lamb', 308.7, 18.4, 24.4, 9.7, 0, 0, '2024-11-04 07:46:00', 105, 'Breakfast', 6), | |||||
(185, 'Lamb', 787.9, 46.9, 62.2, 24.7, 0, 0, '2024-11-04 07:46:00', 268, 'Breakfast', 6), | |||||
(186, 'Tomato', 76, 3.8, 0.8, 0, 16.5, 21.1, '2024-11-04 12:48:00', 422, 'Lunch', 6), | |||||
(187, 'Potato', 370.4, 9.6, 0.5, 0, 83.2, 48.1, '2024-11-04 12:48:00', 481, 'Lunch', 6), | |||||
(188, 'Lettuce', 21, 2.1, 0.5, 0.3, 4.5, 13.1, '2024-11-04 18:25:00', 263, 'Dinner', 6), | |||||
(189, 'Avocado', 552, 6.9, 50.4, 6.9, 29.3, 24.2, '2024-11-05 06:11:00', 345, 'Breakfast', 6), | |||||
(190, 'Carrot', 62.7, 1.4, 0.3, 0, 14.7, 105.6, '2024-11-05 11:02:00', 153, 'Lunch', 6), | |||||
(191, 'Yogurt', 134.7, 4.7, 5.6, 3.1, 9.1, 113.8, '2024-11-05 11:02:00', 91, 'Lunch', 6), | |||||
(192, 'Tomato', 78.8, 3.9, 0.9, 0, 17.1, 21.9, '2024-11-05 19:27:00', 438, 'Dinner', 6), | |||||
(193, 'Beef', 340, 29.9, 28.6, 10.9, 0, 68, '2024-11-05 19:27:00', 136, 'Dinner', 6), | |||||
(194, 'Onion', 108.4, 3.8, 0.3, 0, 25.2, 8.1, '2024-11-06 06:42:00', 271, 'Breakfast', 6), | |||||
(195, 'Egg', 350.2, 28.3, 25.1, 7.2, 1.8, 278.4, '2024-11-06 13:46:00', 449, 'Lunch', 6), | |||||
(196, 'Sweet potato', 494.9, 7.8, 0.5, 0, 107.8, 14.7, '2024-11-06 17:34:00', 490, 'Dinner', 6), | |||||
(197, 'Tomato', 83.7, 4.2, 0.9, 0, 18.1, 23.2, '2024-11-06 17:34:00', 465, 'Dinner', 6), | |||||
(198, 'Brown rice', 110.2, 2.5, 1.5, 0.2, 22.9, 0, '2024-11-07 06:48:00', 51, 'Breakfast', 6), | |||||
(199, 'Pasta', 615.7, 25.9, 4.7, 0.9, 122.2, 0, '2024-11-07 06:48:00', 470, 'Breakfast', 6), | |||||
(200, 'Potato', 150.2, 3.9, 0.2, 0, 33.7, 19.5, '2024-11-07 13:42:00', 195, 'Lunch', 6), | |||||
(201, 'Brown rice', 708.5, 16.4, 9.8, 1.3, 147.6, 0, '2024-11-07 13:42:00', 328, 'Lunch', 6), | |||||
(202, 'Lettuce', 25.9, 2.6, 0.6, 0.3, 5.5, 16.2, '2024-11-07 19:44:00', 324, 'Dinner', 6), | |||||
(203, 'Brown rice', 490.3, 11.3, 6.8, 0.9, 102.2, 0, '2024-11-08 08:13:00', 227, 'Breakfast', 6), | |||||
(204, 'Banana', 113.4, 1.4, 0.3, 0.1, 29.2, 1.1, '2024-11-08 08:13:00', 108, 'Breakfast', 6), | |||||
(205, 'Banana', 300.3, 3.7, 0.9, 0.3, 77.2, 2.9, '2024-11-08 12:25:00', 286, 'Lunch', 6), | |||||
(206, 'Pork', 848.3, 53.2, 69.3, 25.7, 0, 172.5, '2024-11-08 18:46:00', 352, 'Dinner', 6), | |||||
(207, 'Cucumber', 75.5, 3.3, 0.5, 0, 17.9, 9.4, '2024-11-09 07:57:00', 472, 'Breakfast', 6), | |||||
(208, 'Sweet potato', 361.6, 5.7, 0.4, 0, 78.8, 10.7, '2024-11-09 12:22:00', 358, 'Lunch', 6), | |||||
(209, 'Lettuce', 8.3, 0.8, 0.2, 0.1, 1.8, 5.2, '2024-11-09 12:22:00', 104, 'Lunch', 6), | |||||
(210, 'Pasta', 200.4, 8.4, 1.5, 0.3, 39.8, 0, '2024-11-09 17:26:00', 153, 'Dinner', 6), | |||||
(211, 'Pasta', 117.9, 5, 0.9, 0.2, 23.4, 0, '2024-11-10 07:29:00', 90, 'Breakfast', 6), | |||||
(212, 'Brown rice', 738.7, 17.1, 10.3, 1.4, 153.9, 0, '2024-11-10 07:29:00', 342, 'Breakfast', 6), | |||||
(213, 'Onion', 55.6, 1.9, 0.1, 0, 12.9, 4.2, '2024-11-10 11:18:00', 139, 'Lunch', 6), | |||||
(214, 'Potato', 338.8, 8.8, 0.4, 0, 76.1, 44, '2024-11-10 18:58:00', 440, 'Dinner', 6), | |||||
(215, 'Bread', 339.2, 12, 5.9, 1.7, 66.6, 192, '2024-11-10 18:58:00', 128, 'Dinner', 6), | |||||
(216, 'Carrot', 145.5, 3.2, 0.7, 0, 34.1, 244.9, '2024-11-04 06:16:00', 355, 'Breakfast', 7), | |||||
(217, 'Bread', 667.8, 23.7, 11.6, 3.3, 131, 378, '2024-11-04 13:58:00', 252, 'Lunch', 7), | |||||
(218, 'Tomato', 39.4, 2, 0.4, 0, 8.5, 10.9, '2024-11-04 13:58:00', 219, 'Lunch', 7), | |||||
(219, 'Cheese', 1234.1, 63.2, 101.6, 71.2, 4, 0, '2024-11-04 18:34:00', 307, 'Dinner', 7), | |||||
(220, 'Chicken thigh', 933.8, 128, 70.6, 24.6, 0, 0, '2024-11-04 18:34:00', 474, 'Dinner', 7), | |||||
(221, 'Banana', 155.4, 1.9, 0.4, 0.1, 40, 1.5, '2024-11-05 07:24:00', 148, 'Breakfast', 7), | |||||
(222, 'Yogurt', 464.7, 16.3, 19.2, 10.7, 31.4, 392.5, '2024-11-05 11:29:00', 314, 'Lunch', 7), | |||||
(223, 'Beef', 367.5, 32.3, 30.9, 11.8, 0, 73.5, '2024-11-05 11:29:00', 147, 'Lunch', 7), | |||||
(224, 'Yogurt', 122.8, 4.3, 5.1, 2.8, 8.3, 103.8, '2024-11-05 17:20:00', 83, 'Dinner', 7), | |||||
(225, 'Apple', 144, 0, 0, 0, 38.8, 0, '2024-11-06 07:30:00', 277, 'Breakfast', 7), | |||||
(226, 'Beef', 840, 73.9, 70.6, 26.9, 0, 168, '2024-11-06 07:30:00', 336, 'Breakfast', 7), | |||||
(227, 'Garlic', 522.2, 25, 57.4, 12.3, 23.1, 622.9, '2024-11-06 12:35:00', 373, 'Lunch', 7), | |||||
(228, 'Chicken thigh', 823.5, 112.9, 62.3, 21.7, 0, 0, '2024-11-06 12:35:00', 418, 'Lunch', 7), | |||||
(229, 'Salmon', 115.4, 12.3, 7.6, 2.1, 2.8, 0, '2024-11-06 17:54:00', 56, 'Dinner', 7), | |||||
(230, 'Tomato', 37.1, 1.9, 0.4, 0, 8, 10.3, '2024-11-07 06:25:00', 206, 'Breakfast', 7), | |||||
(231, 'Avocado', 537.6, 6.7, 49.1, 6.7, 28.6, 23.5, '2024-11-07 12:48:00', 336, 'Lunch', 7), | |||||
(232, 'Broccoli', 32, 2.6, 0.6, 0.2, 6.2, 62, '2024-11-07 12:48:00', 94, 'Lunch', 7), | |||||
(233, 'Brown rice', 477.4, 11.1, 6.6, 0.9, 99.5, 0, '2024-11-07 17:31:00', 221, 'Dinner', 7), | |||||
(234, 'Cucumber', 72.3, 3.2, 0.5, 0, 17.2, 9, '2024-11-08 07:09:00', 452, 'Breakfast', 7), | |||||
(235, 'Garlic', 512.4, 24.5, 56.4, 12.1, 22.7, 611.2, '2024-11-08 11:58:00', 366, 'Lunch', 7), | |||||
(236, 'Chicken thigh', 240.3, 32.9, 18.2, 6.3, 0, 0, '2024-11-08 11:58:00', 122, 'Lunch', 7), | |||||
(237, 'Onion', 137.2, 4.8, 0.3, 0, 31.9, 10.3, '2024-11-08 19:26:00', 343, 'Dinner', 7), | |||||
(238, 'Pork', 607.3, 38.1, 49.6, 18.4, 0, 123.5, '2024-11-08 19:26:00', 252, 'Dinner', 7), | |||||
(239, 'Banana', 297.2, 3.7, 0.8, 0.3, 76.4, 2.8, '2024-11-09 07:33:00', 283, 'Breakfast', 7), | |||||
(240, 'Chicken breast', 790.4, 148.5, 29.2, 9.6, 0, 330.5, '2024-11-09 07:33:00', 479, 'Breakfast', 7), | |||||
(241, 'Lamb', 311.6, 18.6, 24.6, 9.8, 0, 0, '2024-11-09 13:15:00', 106, 'Lunch', 7), | |||||
(242, 'Chicken thigh', 784.1, 107.5, 59.3, 20.7, 0, 0, '2024-11-09 13:15:00', 398, 'Lunch', 7), | |||||
(243, 'Apple', 116, 0, 0, 0, 31.2, 0, '2024-11-09 18:17:00', 223, 'Dinner', 7), | |||||
(244, 'Salmon', 945.5, 101, 62.4, 17.4, 22.9, 0, '2024-11-09 18:17:00', 459, 'Dinner', 7), | |||||
(245, 'Banana', 498.8, 6.2, 1.4, 0.5, 128.2, 4.8, '2024-11-10 06:40:00', 475, 'Breakfast', 7), | |||||
(246, 'Lamb', 1111.3, 66.1, 87.7, 34.8, 0, 0, '2024-11-10 11:17:00', 378, 'Lunch', 7), | |||||
(247, 'Avocado', 475.2, 5.9, 43.4, 5.9, 25.2, 20.8, '2024-11-10 11:17:00', 297, 'Lunch', 7), | |||||
(248, 'Banana', 183.8, 2.3, 0.5, 0.2, 47.2, 1.8, '2024-11-10 17:29:00', 175, 'Dinner', 7), | |||||
(249, 'Onion', 119.6, 4.2, 0.3, 0, 27.8, 9, '2024-11-04 07:58:00', 299, 'Breakfast', 8), | |||||
(250, 'Beef', 465, 40.9, 39.1, 14.9, 0, 93, '2024-11-04 13:10:00', 186, 'Lunch', 8), | |||||
(251, 'Bread', 871.9, 30.9, 15.1, 4.3, 171.1, 493.5, '2024-11-04 19:57:00', 329, 'Dinner', 8), | |||||
(252, 'Lamb', 884.9, 52.7, 69.8, 27.7, 0, 0, '2024-11-05 06:10:00', 301, 'Breakfast', 8), | |||||
(253, 'Milk', 230, 15.2, 15.2, 7.8, 22.1, 552, '2024-11-05 06:10:00', 460, 'Breakfast', 8), | |||||
(254, 'Lettuce', 35.8, 3.6, 0.9, 0.4, 7.6, 22.4, '2024-11-05 11:42:00', 448, 'Lunch', 8), | |||||
(255, 'Salmon', 786.9, 84, 52, 14.5, 19.1, 0, '2024-11-05 11:42:00', 382, 'Lunch', 8), | |||||
(256, 'Beef', 535, 47.1, 44.9, 17.1, 0, 107, '2024-11-05 19:16:00', 214, 'Dinner', 8), | |||||
(257, 'Cucumber', 71.2, 3.1, 0.4, 0, 16.9, 8.9, '2024-11-06 08:21:00', 445, 'Breakfast', 8), | |||||
(258, 'Chicken thigh', 396, 54.3, 29.9, 10.5, 0, 0, '2024-11-06 08:21:00', 201, 'Breakfast', 8), | |||||
(259, 'Chicken breast', 513.1, 96.4, 19, 6.2, 0, 214.6, '2024-11-06 12:27:00', 311, 'Lunch', 8), | |||||
(260, 'Sweet potato', 212.1, 3.4, 0.2, 0, 46.2, 6.3, '2024-11-06 18:02:00', 210, 'Dinner', 8), | |||||
(261, 'Chicken thigh', 439.3, 60.2, 33.2, 11.6, 0, 0, '2024-11-06 18:02:00', 223, 'Dinner', 8), | |||||
(262, 'Sweet potato', 211.1, 3.3, 0.2, 0, 46, 6.3, '2024-11-07 07:56:00', 209, 'Breakfast', 8), | |||||
(263, 'Pasta', 94.3, 4, 0.7, 0.1, 18.7, 0, '2024-11-07 07:56:00', 72, 'Breakfast', 8), | |||||
(264, 'Spinach', 74.5, 8.7, 1.3, 0.3, 11.7, 256, '2024-11-07 11:35:00', 324, 'Lunch', 8), | |||||
(265, 'Chicken breast', 669.9, 125.9, 24.8, 8.1, 0, 280.1, '2024-11-07 18:49:00', 406, 'Dinner', 8), | |||||
(266, 'Cheese', 888.4, 45.5, 73.2, 51.3, 2.9, 0, '2024-11-08 07:19:00', 221, 'Breakfast', 8), | |||||
(267, 'Potato', 168.6, 4.4, 0.2, 0, 37.9, 21.9, '2024-11-08 07:19:00', 219, 'Breakfast', 8), | |||||
(268, 'Banana', 203.7, 2.5, 0.6, 0.2, 52.4, 1.9, '2024-11-08 12:42:00', 194, 'Lunch', 8), | |||||
(269, 'Yogurt', 284.2, 10, 11.7, 6.5, 19.2, 240, '2024-11-08 12:42:00', 192, 'Lunch', 8), | |||||
(270, 'Sweet potato', 403, 6.4, 0.4, 0, 87.8, 12, '2024-11-08 18:37:00', 399, 'Dinner', 8), | |||||
(271, 'Chicken breast', 785.4, 147.6, 29, 9.5, 0, 328.4, '2024-11-09 07:08:00', 476, 'Breakfast', 8), | |||||
(272, 'Avocado', 612.8, 7.7, 55.9, 7.7, 32.6, 26.8, '2024-11-09 07:08:00', 383, 'Breakfast', 8), | |||||
(273, 'Egg', 131, 10.6, 9.4, 2.7, 0.7, 104.2, '2024-11-09 12:47:00', 168, 'Lunch', 8), | |||||
(274, 'Lettuce', 20.7, 2.1, 0.5, 0.3, 4.4, 12.9, '2024-11-09 12:47:00', 259, 'Lunch', 8), | |||||
(275, 'Salmon', 222.5, 23.8, 14.7, 4.1, 5.4, 0, '2024-11-09 18:20:00', 108, 'Dinner', 8), | |||||
(276, 'Spinach', 111.3, 13.1, 1.9, 0.5, 17.4, 382.4, '2024-11-10 06:56:00', 484, 'Breakfast', 8), | |||||
(277, 'Garlic', 460.6, 22, 50.7, 10.9, 20.4, 549.4, '2024-11-10 11:47:00', 329, 'Lunch', 8), | |||||
(278, 'Lamb', 643.9, 38.3, 50.8, 20.1, 0, 0, '2024-11-10 19:54:00', 219, 'Dinner', 8), | |||||
(279, 'Beef', 1125, 99, 94.5, 36, 0, 225, '2024-11-10 19:54:00', 450, 'Dinner', 8), | |||||
(280, 'Lamb', 929, 55.3, 73.3, 29.1, 0, 0, '2024-11-04 07:54:00', 316, 'Breakfast', 9), | |||||
(281, 'Pork', 443.4, 27.8, 36.2, 13.4, 0, 90.2, '2024-11-04 12:05:00', 184, 'Lunch', 9), | |||||
(282, 'Beef', 885, 77.9, 74.3, 28.3, 0, 177, '2024-11-04 12:05:00', 354, 'Lunch', 9), | |||||
(283, 'Brown rice', 276.5, 6.4, 3.8, 0.5, 57.6, 0, '2024-11-04 18:57:00', 128, 'Dinner', 9), | |||||
(284, 'Banana', 265.6, 3.3, 0.8, 0.3, 68.3, 2.5, '2024-11-04 18:57:00', 253, 'Dinner', 9), | |||||
(285, 'Bread', 1298.5, 46.1, 22.5, 6.4, 254.8, 735, '2024-11-05 07:40:00', 490, 'Breakfast', 9), | |||||
(286, 'Milk', 105, 6.9, 6.9, 3.6, 10.1, 252, '2024-11-05 07:40:00', 210, 'Breakfast', 9), | |||||
(287, 'Pasta', 531.9, 22.3, 4.1, 0.8, 105.6, 0, '2024-11-05 12:21:00', 406, 'Lunch', 9), | |||||
(288, 'Sweet potato', 169.7, 2.7, 0.2, 0, 37, 5, '2024-11-05 12:21:00', 168, 'Lunch', 9), | |||||
(289, 'Onion', 198.8, 7, 0.5, 0, 46.2, 14.9, '2024-11-05 19:11:00', 497, 'Dinner', 9), | |||||
(290, 'Avocado', 140.8, 1.8, 12.8, 1.8, 7.5, 6.2, '2024-11-05 19:11:00', 88, 'Dinner', 9), | |||||
(291, 'Lamb', 423.4, 25.2, 33.4, 13.2, 0, 0, '2024-11-06 07:39:00', 144, 'Breakfast', 9), | |||||
(292, 'Bread', 800.3, 28.4, 13.9, 3.9, 157, 453, '2024-11-06 13:54:00', 302, 'Lunch', 9), | |||||
(293, 'Carrot', 37.3, 0.8, 0.2, 0, 8.7, 62.8, '2024-11-06 13:54:00', 91, 'Lunch', 9), | |||||
(294, 'Broccoli', 49.3, 4.1, 0.9, 0.3, 9.6, 95.7, '2024-11-06 17:03:00', 145, 'Dinner', 9), | |||||
(295, 'Carrot', 123.4, 2.7, 0.6, 0, 28.9, 207.7, '2024-11-06 17:03:00', 301, 'Dinner', 9), | |||||
(296, 'Chicken thigh', 855, 117.2, 64.7, 22.6, 0, 0, '2024-11-07 08:12:00', 434, 'Breakfast', 9), | |||||
(297, 'Chicken breast', 585.8, 110, 21.7, 7.1, 0, 244.9, '2024-11-07 08:12:00', 355, 'Breakfast', 9), | |||||
(298, 'Salmon', 931.1, 99.4, 61.5, 17.2, 22.6, 0, '2024-11-07 12:45:00', 452, 'Lunch', 9), | |||||
(299, 'Bread', 556.5, 19.7, 9.7, 2.7, 109.2, 315, '2024-11-07 12:45:00', 210, 'Lunch', 9), | |||||
(300, 'Carrot', 96.8, 2.1, 0.5, 0, 22.7, 162.8, '2024-11-07 17:14:00', 236, 'Dinner', 9), | |||||
(301, 'Chicken thigh', 382.2, 52.4, 28.9, 10.1, 0, 0, '2024-11-08 06:20:00', 194, 'Breakfast', 9), | |||||
(302, 'Yogurt', 679.3, 23.9, 28, 15.6, 45.9, 573.8, '2024-11-08 06:20:00', 459, 'Breakfast', 9), | |||||
(303, 'Lettuce', 23.2, 2.3, 0.6, 0.3, 4.9, 14.5, '2024-11-08 13:27:00', 290, 'Lunch', 9), | |||||
(304, 'Lettuce', 28.4, 2.8, 0.7, 0.4, 6, 17.8, '2024-11-08 13:27:00', 355, 'Lunch', 9), | |||||
(305, 'Spinach', 77.7, 9.1, 1.4, 0.3, 12.2, 267, '2024-11-08 19:43:00', 338, 'Dinner', 9), | |||||
(306, 'Banana', 420, 5.2, 1.2, 0.4, 108, 4, '2024-11-09 06:39:00', 400, 'Breakfast', 9), | |||||
(307, 'Banana', 475.7, 5.9, 1.4, 0.5, 122.3, 4.5, '2024-11-09 12:24:00', 453, 'Lunch', 9), | |||||
(308, 'Beef', 1110, 97.7, 93.2, 35.5, 0, 222, '2024-11-09 17:23:00', 444, 'Dinner', 9), | |||||
(309, 'Lettuce', 36.2, 3.6, 0.9, 0.5, 7.7, 22.6, '2024-11-09 17:23:00', 452, 'Dinner', 9), | |||||
(310, 'Chicken thigh', 979.1, 134.2, 74.1, 25.8, 0, 0, '2024-11-10 07:24:00', 497, 'Breakfast', 9), | |||||
(311, 'Broccoli', 154.7, 12.7, 2.7, 0.9, 30, 300.3, '2024-11-10 07:24:00', 455, 'Breakfast', 9), | |||||
(312, 'Egg', 84.2, 6.8, 6, 1.7, 0.4, 67, '2024-11-10 12:42:00', 108, 'Lunch', 9), | |||||
(313, 'Pork', 903.8, 56.6, 73.9, 27.4, 0, 183.8, '2024-11-10 17:50:00', 375, 'Dinner', 9), | |||||
(314, 'Avocado', 348.8, 4.4, 31.8, 4.4, 18.5, 15.3, '2024-11-04 07:54:00', 218, 'Breakfast', 10), | |||||
(315, 'Spinach', 87.9, 10.3, 1.5, 0.4, 13.8, 301.8, '2024-11-04 07:54:00', 382, 'Breakfast', 10), | |||||
(316, 'Carrot', 203.4, 4.5, 1, 0, 47.6, 342.2, '2024-11-04 12:17:00', 496, 'Lunch', 10), | |||||
(317, 'Cucumber', 47.8, 2.1, 0.3, 0, 11.4, 6, '2024-11-04 12:17:00', 299, 'Lunch', 10), | |||||
(318, 'Yogurt', 217.6, 7.6, 9, 5, 14.7, 183.8, '2024-11-04 19:25:00', 147, 'Dinner', 10), | |||||
(319, 'Avocado', 281.6, 3.5, 25.7, 3.5, 15, 12.3, '2024-11-04 19:25:00', 176, 'Dinner', 10), | |||||
(320, 'Sweet potato', 168.7, 2.7, 0.2, 0, 36.7, 5, '2024-11-05 08:55:00', 167, 'Breakfast', 10), | |||||
(321, 'Milk', 187, 12.3, 12.3, 6.4, 18, 448.8, '2024-11-05 13:51:00', 374, 'Lunch', 10), | |||||
(322, 'Sweet potato', 95.9, 1.5, 0.1, 0, 20.9, 2.8, '2024-11-05 18:32:00', 95, 'Dinner', 10), | |||||
(323, 'Salmon', 883.7, 94.4, 58.3, 16.3, 21.4, 0, '2024-11-06 06:57:00', 429, 'Breakfast', 10), | |||||
(324, 'Yogurt', 125.8, 4.4, 5.2, 2.9, 8.5, 106.2, '2024-11-06 06:57:00', 85, 'Breakfast', 10), | |||||
(325, 'Cheese', 1949.7, 99.9, 160.5, 112.5, 6.3, 0, '2024-11-06 11:31:00', 485, 'Lunch', 10), | |||||
(326, 'Broccoli', 32, 2.6, 0.6, 0.2, 6.2, 62, '2024-11-06 11:31:00', 94, 'Lunch', 10), | |||||
(327, 'Sweet potato', 99, 1.6, 0.1, 0, 21.6, 2.9, '2024-11-06 18:01:00', 98, 'Dinner', 10), | |||||
(328, 'Broccoli', 133.3, 11, 2.4, 0.8, 25.9, 258.7, '2024-11-06 18:01:00', 392, 'Dinner', 10), | |||||
(329, 'Pasta', 615.7, 25.9, 4.7, 0.9, 122.2, 0, '2024-11-07 06:30:00', 470, 'Breakfast', 10), | |||||
(330, 'Banana', 113.4, 1.4, 0.3, 0.1, 29.2, 1.1, '2024-11-07 06:30:00', 108, 'Breakfast', 10), | |||||
(331, 'Bread', 429.3, 15.2, 7.5, 2.1, 84.2, 243, '2024-11-07 11:27:00', 162, 'Lunch', 10), | |||||
(332, 'Bread', 927.5, 32.9, 16.1, 4.5, 182, 525, '2024-11-07 11:27:00', 350, 'Lunch', 10), | |||||
(333, 'Brown rice', 995.8, 23.1, 13.8, 1.8, 207.5, 0, '2024-11-07 19:52:00', 461, 'Dinner', 10), | |||||
(334, 'Potato', 325.7, 8.5, 0.4, 0, 73.2, 42.3, '2024-11-08 06:05:00', 423, 'Breakfast', 10), | |||||
(335, 'Egg', 43.7, 3.5, 3.1, 0.9, 0.2, 34.7, '2024-11-08 12:47:00', 56, 'Lunch', 10), | |||||
(336, 'Potato', 139.4, 3.6, 0.2, 0, 31.3, 18.1, '2024-11-08 12:47:00', 181, 'Lunch', 10), | |||||
(337, 'Yogurt', 722.2, 25.4, 29.8, 16.6, 48.8, 610, '2024-11-08 19:02:00', 488, 'Dinner', 10), | |||||
(338, 'Egg', 373.6, 30.2, 26.8, 7.7, 1.9, 297, '2024-11-08 19:02:00', 479, 'Dinner', 10), | |||||
(339, 'Pasta', 313.1, 13.1, 2.4, 0.5, 62.1, 0, '2024-11-09 06:07:00', 239, 'Breakfast', 10), | |||||
(340, 'Egg', 213.7, 17.3, 15.3, 4.4, 1.1, 169.9, '2024-11-09 06:07:00', 274, 'Breakfast', 10), | |||||
(341, 'Garlic', 254.8, 12.2, 28, 6, 11.3, 303.9, '2024-11-09 11:31:00', 182, 'Lunch', 10), | |||||
(342, 'Sweet potato', 388.9, 6.2, 0.4, 0, 84.7, 11.6, '2024-11-09 11:31:00', 385, 'Lunch', 10), | |||||
(343, 'Banana', 158.6, 2, 0.5, 0.2, 40.8, 1.5, '2024-11-09 19:46:00', 151, 'Dinner', 10), | |||||
(344, 'Tomato', 15.7, 0.8, 0.2, 0, 3.4, 4.3, '2024-11-10 08:40:00', 87, 'Breakfast', 10), | |||||
(345, 'Carrot', 44.7, 1, 0.2, 0, 10.5, 75.2, '2024-11-10 12:45:00', 109, 'Lunch', 10), | |||||
(346, 'Sweet potato', 170.7, 2.7, 0.2, 0, 37.2, 5.1, '2024-11-10 19:16:00', 169, 'Dinner', 10), | |||||
(347, 'Egg', 624, 50.4, 44.8, 12.8, 3.2, 496, '2024-11-14 08:57:54', 800, 'Breakfast', 11), | |||||
(348, 'Spinach', 690, 81, 12, 3, 108, 2370, '2024-11-14 08:58:17', 3000, 'Dinner', 11), | |||||
(349, 'Chicken breast', 1650, 310, 61, 20, 10, 690, '2024-11-28 11:05:49', 1000, 'Breakfast', 1), | |||||
(350, 'Chicken breast', 1725.9, 324.26, 63.806, 20.92, 10.46, 721.74, '2024-11-28 15:04:46', 1046, 'Breakfast', 1); | |||||
ALTER TABLE `food_items` | |||||
ADD PRIMARY KEY (`id`), | |||||
ADD KEY `user_id` (`user_id`); | |||||
ALTER TABLE `food_items` | |||||
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=351; | |||||
/* | |||||
ALTER TABLE `food_items` | |||||
ADD CONSTRAINT `food_items_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`); | |||||
*/ |
@@ -1,11 +0,0 @@ | |||||
--liquibase formatted sql | |||||
--changeset terence:alter-food_items-table | |||||
--comment: Alter table | |||||
Alter TABLE `fhsmscdb`.`food_items` | |||||
add `created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, | |||||
add `createdBy` int DEFAULT NULL, | |||||
add `version` int NOT NULL DEFAULT '0', | |||||
add `modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, | |||||
add `modifiedBy` int DEFAULT NULL, | |||||
add `deleted` tinyint(1) NOT NULL DEFAULT '0'; |
@@ -1,12 +0,0 @@ | |||||
--liquibase formatted sql | |||||
--changeset terence:alter-food_items-table | |||||
--comment: Alter table | |||||
ALTER TABLE `food_items` | |||||
CHANGE COLUMN `kcal` `kcal` DECIMAL(14,2) NULL DEFAULT NULL , | |||||
CHANGE COLUMN `protein` `protein` DECIMAL(14,2) NULL DEFAULT NULL , | |||||
CHANGE COLUMN `fat` `fat` DECIMAL(14,2) NULL DEFAULT NULL , | |||||
CHANGE COLUMN `sat_fat` `sat_fat` DECIMAL(14,2) NULL DEFAULT NULL , | |||||
CHANGE COLUMN `carbo` `carbo` DECIMAL(14,2) NULL DEFAULT NULL , | |||||
CHANGE COLUMN `sodium` `sodium` DECIMAL(14,2) NULL DEFAULT NULL , | |||||
CHANGE COLUMN `size` `size` DECIMAL(14,2) NULL DEFAULT NULL ; |
@@ -1,12 +0,0 @@ | |||||
--liquibase formatted sql | |||||
--changeset cyril:alter food items | |||||
--comment: alter food items | |||||
ALTER TABLE `food_items` | |||||
CHANGE COLUMN `created` `created` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP AFTER `id`, | |||||
CHANGE COLUMN `createdBy` `createdBy` INT NULL DEFAULT NULL AFTER `created`, | |||||
CHANGE COLUMN `version` `version` INT NOT NULL DEFAULT '0' AFTER `createdBy`, | |||||
CHANGE COLUMN `modified` `modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP AFTER `version`, | |||||
CHANGE COLUMN `modifiedBy` `modifiedBy` INT NULL DEFAULT NULL AFTER `modified`, | |||||
CHANGE COLUMN `deleted` `deleted` TINYINT(1) NOT NULL DEFAULT '0' AFTER `modifiedBy`; |
@@ -1,18 +0,0 @@ | |||||
--liquibase formatted sql | |||||
--changeset terence:create-table-and-insert-data | |||||
--comment: Create table and insert data | |||||
CREATE TABLE `user_information` ( | |||||
`id` int(11) NOT NULL, | |||||
`user_id` int(11) NOT NULL, | |||||
`gender` varchar(10) DEFAULT NULL, | |||||
`name` varchar(50) DEFAULT NULL, | |||||
`date_of_birth` date DEFAULT NULL, | |||||
`height` varchar(20) DEFAULT NULL, | |||||
`weight` varchar(20) DEFAULT NULL, | |||||
`allergy` varchar(50) DEFAULT NULL, | |||||
`goal` varchar(20) DEFAULT NULL, | |||||
`experience` varchar(20) DEFAULT NULL, | |||||
`created_at` timestamp NOT NULL DEFAULT current_timestamp() | |||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; |
@@ -1,20 +0,0 @@ | |||||
--liquibase formatted sql | |||||
--changeset terence:create-table-and-insert-data | |||||
--comment: Alter table and insert data | |||||
INSERT INTO `user_information` (`id`, `user_id`, `gender`, `name`, `date_of_birth`, `height`, `weight`, `allergy`, `goal`, `experience`, `created_at`) VALUES | |||||
(2, 1, 'Male', 'test', '2000-01-01', '175 cm', '61 kg', 'Peanuts', 'Muscle Gain', 'Expert', '2024-11-13 09:23:46'), | |||||
(3, 3, 'Male', 'm2', '2003-01-01', '162 cm', '80 kg', 'Egg', 'Muscle Gain', 'Intermediate', '2024-11-13 17:18:38'), | |||||
(4, 2, 'Male', 'm1', '2000-01-01', '162 cm', '53 kg', 'Fish', 'Muscle Gain', 'Expert', '2024-11-13 17:25:06'), | |||||
(5, 4, 'Male', 'm3', '2018-01-01', '164 cm', '125 lbs', 'Fish, Peanuts, Wheat', 'Muscle Gain', 'Intermediate', '2024-11-13 17:28:51'), | |||||
(6, 5, 'Male', 'm4', '2008-12-15', '169 cm', '108 kg', 'Peanuts, Fish', 'Nutrition', 'Beginner', '2024-11-13 17:32:53'), | |||||
(7, 6, 'Female', 'g1', '2015-01-01', '158 cm', '46 kg', 'Egg, Fish, Peanuts, Wheat, Soy, Milk', 'Muscle Gain', 'Expert', '2024-11-13 17:35:00'), | |||||
(8, 10, 'Female', 'g5', '1992-05-01', '213 cm', '140 kg', 'None', 'Muscle Gain', 'Beginner', '2024-11-13 17:37:00'), | |||||
(9, 9, 'Female', 'g4', '1989-01-01', '4 ft 11 in', '54 kg', 'Wheat', 'Nutrition', 'Beginner', '2024-11-13 17:37:25'), | |||||
(10, 8, 'Female', 'g3', '2006-06-03', '6 ft 4 in', '89 lbs', 'Egg', 'Diet', 'Intermediate', '2024-11-13 17:38:21'), | |||||
(11, 7, 'Female', 'g2', '2000-01-01', '170 cm', '60 kg', 'None', 'Diet', 'Beginner', '2024-11-13 17:38:46'), | |||||
(12, 11, 'Male', 'example', '2022-07-01', '171 cm', '54 kg', 'Peanuts, Wheat', 'Diet', 'Intermediate', '2024-11-14 08:58:59'); | |||||
ALTER TABLE `user_information` | |||||
ADD PRIMARY KEY (`id`), | |||||
ADD KEY `user_id` (`user_id`); |
@@ -1,6 +0,0 @@ | |||||
--liquibase formatted sql | |||||
--changeset terence:alter-user-table | |||||
--comment: Alter table | |||||
ALTER TABLE `fhsmscdb`.`user` | |||||
ADD `has_information` TINYINT NOT NULL DEFAULT 0; |
@@ -1,11 +0,0 @@ | |||||
--liquibase formatted sql | |||||
--changeset terence:alter-user_information-table | |||||
--comment: Alter table | |||||
Alter TABLE `fhsmscdb`.`user_information` | |||||
add `created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, | |||||
add `createdBy` int DEFAULT NULL, | |||||
add `version` int NOT NULL DEFAULT '0', | |||||
add `modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, | |||||
add `modifiedBy` int DEFAULT NULL, | |||||
add `deleted` tinyint(1) NOT NULL DEFAULT '0'; |
@@ -1,6 +0,0 @@ | |||||
--liquibase formatted sql | |||||
--changeset terence:alter-user_information-table | |||||
--comment: Alter table | |||||
Alter TABLE `fhsmscdb`.`user_information` | |||||
DROP COLUMN `created_at`; |
@@ -1,6 +0,0 @@ | |||||
--liquibase formatted sql | |||||
--changeset terence:alter-user_information-table | |||||
--comment: Alter table | |||||
Alter TABLE `fhsmscdb`.`user_information` | |||||
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=27; |
@@ -1,7 +0,0 @@ | |||||
--liquibase formatted sql | |||||
--changeset terence:alter-user_information-table | |||||
--comment: Alter table | |||||
Alter TABLE `fhsmscdb`.`user_information` | |||||
MODIFY `age` int DEFAULT NULL, | |||||
add `activityLevel` varchar(20) DEFAULT NULL; |
@@ -1,6 +0,0 @@ | |||||
--liquibase formatted sql | |||||
--changeset terence:alter-user_information-table | |||||
--comment: Alter table | |||||
Alter TABLE `fhsmscdb`.`user_information` | |||||
MODIFY `activityLevel` varchar(20) DEFAULT NULL; |
@@ -1,7 +0,0 @@ | |||||
--liquibase formatted sql | |||||
--changeset terence:alter-user_information-table | |||||
--comment: Alter table | |||||
Alter TABLE `fhsmscdb`.`user_information` | |||||
MODIFY COLUMN `age` int DEFAULT NULL AFTER `gender`, | |||||
MODIFY COLUMN `activityLevel` varchar(20) DEFAULT NULL AFTER `experience`; |
@@ -1,25 +0,0 @@ | |||||
--liquibase formatted sql | |||||
--changeset terence:alter-food1-table | |||||
--comment: Alter table | |||||
Alter TABLE `fhsmscdb`.`food1` | |||||
ADD COLUMN `Weight (g)` decimal(10,2) DEFAULT NULL, | |||||
ADD COLUMN `contains_egg` tinyint DEFAULT 3, -- 0:●(使用) 1:○(油) 2:▲(接触) 3:×(未使用) | |||||
ADD COLUMN `contains_milk` tinyint DEFAULT 3, | |||||
ADD COLUMN `contains_wheat` tinyint DEFAULT 3, | |||||
ADD COLUMN `contains_shrimp` tinyint DEFAULT 3, | |||||
ADD COLUMN `contains_crab` tinyint DEFAULT 3, | |||||
ADD COLUMN `contains_buckwheat` tinyint DEFAULT 3, | |||||
ADD COLUMN `contains_peanut` tinyint DEFAULT 3, | |||||
ADD COLUMN `contains_walnut` tinyint DEFAULT 3; | |||||
ALTER TABLE `fhsmscdb`.`food1` | |||||
CHANGE COLUMN `kcal` `Calories (kcal)` decimal(10,2), | |||||
CHANGE COLUMN `protein` `Protein (g)` decimal(10,2), | |||||
CHANGE COLUMN `fat` `Fat (g)` decimal(10,2), | |||||
DROP COLUMN `satFat`, | |||||
CHANGE COLUMN `carbo` `Carbohydrate (g)` decimal(10,2), | |||||
CHANGE COLUMN `sodium` `Sodium (mg)` decimal(10,2); | |||||
@@ -1,11 +0,0 @@ | |||||
--liquibase formatted sql | |||||
--changeset terence:alter-food_items-table | |||||
--comment: Alter table | |||||
ALTER TABLE `fhsmscdb`.`food_items` | |||||
DROP COLUMN `sat_fat`; | |||||
@@ -1,16 +0,0 @@ | |||||
--liquibase formatted sql | |||||
--changeset terence:alter-food1-table | |||||
--comment: Alter table | |||||
Alter TABLE `fhsmscdb`.`food1` | |||||
ADD COLUMN `Postassium (mg)` decimal(10,2) DEFAULT 0, -- 0:●(使用) 1:○(油) 2:▲(接触) 3:×(未使用) | |||||
ADD COLUMN `Calcium (mg)`decimal(10,2) DEFAULT 0, | |||||
ADD COLUMN `Phosphorus (mg)` decimal(10,2) DEFAULT 0, | |||||
ADD COLUMN `Iron (mg)` decimal(10,2) DEFAULT 0, | |||||
ADD COLUMN `Vitamin A (μg)` decimal(10,2) DEFAULT 0, | |||||
ADD COLUMN `Vitamin B1 (mg)` decimal(10,2) DEFAULT 0, | |||||
ADD COLUMN `Vitamin B2 (mg)` decimal(10,2) DEFAULT 0, | |||||
ADD COLUMN `Niacin (mg)` decimal(10,2) DEFAULT 0, | |||||
ADD COLUMN `Vitamin C (mg)` decimal(10,2) DEFAULT 0; | |||||
@@ -1,17 +0,0 @@ | |||||
--liquibase formatted sql | |||||
--changeset terence:alter-food1-table | |||||
--comment: Alter table | |||||
Alter TABLE `fhsmscdb`.`food1` | |||||
DROP COLUMN `Ingredients`; | |||||
ALTER TABLE `fhsmscdb`.`food1` | |||||
MODIFY COLUMN `Postassium (mg)` decimal(10,2) DEFAULT 0 AFTER `Sodium (mg)`, | |||||
MODIFY COLUMN `Calcium (mg)` decimal(10,2) DEFAULT 0 AFTER `Postassium (mg)`, | |||||
MODIFY COLUMN `Phosphorus (mg)` decimal(10,2) DEFAULT 0 AFTER `Calcium (mg)`, | |||||
MODIFY COLUMN `Iron (mg)` decimal(10,2) DEFAULT 0 AFTER `Phosphorus (mg)`, | |||||
MODIFY COLUMN `Vitamin A (μg)` decimal(10,2) DEFAULT 0 AFTER `Iron (mg)`, | |||||
MODIFY COLUMN `Vitamin B1 (mg)` decimal(10,2) DEFAULT 0 AFTER `Vitamin A (μg)`, | |||||
MODIFY COLUMN `Vitamin B2 (mg)` decimal(10,2) DEFAULT 0 AFTER `Vitamin B1 (mg)`, | |||||
MODIFY COLUMN `Niacin (mg)` decimal(10,2) DEFAULT 0 AFTER `Vitamin B2 (mg)`, | |||||
MODIFY COLUMN `Vitamin C (mg)` decimal(10,2)DEFAULT 0 AFTER `Niacin (mg)`; |
@@ -1,27 +0,0 @@ | |||||
--liquibase formatted sql | |||||
--changeset terence:alter-food_items-table | |||||
--comment: Alter table | |||||
/* | |||||
Alter TABLE `fhsmscdb`.`food_items` | |||||
ADD COLUMN `potassium` decimal(10,2) DEFAULT 0, -- 0:●(使用) 1:○(油) 2:▲(接触) 3:×(未使用) | |||||
ADD COLUMN `calcium`decimal(10,2) DEFAULT 0, | |||||
ADD COLUMN `phosphorus` decimal(10,2) DEFAULT 0, | |||||
ADD COLUMN `iron` decimal(10,2) DEFAULT 0, | |||||
ADD COLUMN `vitaminA` decimal(10,2) DEFAULT 0, | |||||
ADD COLUMN `vitaminB1` decimal(10,2) DEFAULT 0, | |||||
ADD COLUMN `vitaminB2` decimal(10,2) DEFAULT 0, | |||||
ADD COLUMN `niacin` decimal(10,2) DEFAULT 0, | |||||
ADD COLUMN `vitaminC` decimal(10,2) DEFAULT 0; | |||||
*/ | |||||
ALTER TABLE `fhsmscdb`.`food_items` | |||||
MODIFY COLUMN `potassium` decimal(10,2) DEFAULT 0 AFTER `sodium`, | |||||
MODIFY COLUMN `calcium` decimal(10,2) DEFAULT 0 AFTER `potassium`, | |||||
MODIFY COLUMN `phosphorus` decimal(10,2) DEFAULT 0 AFTER `calcium`, | |||||
MODIFY COLUMN `iron` decimal(10,2) DEFAULT 0 AFTER `phosphorus`, | |||||
MODIFY COLUMN `vitaminA` decimal(10,2) DEFAULT 0 AFTER `iron`, | |||||
MODIFY COLUMN `vitaminB1` decimal(10,2) DEFAULT 0 AFTER `vitaminA`, | |||||
MODIFY COLUMN `vitaminB2` decimal(10,2) DEFAULT 0 AFTER `vitaminB1`, | |||||
MODIFY COLUMN `niacin` decimal(10,2) DEFAULT 0 AFTER `vitaminB2`, | |||||
MODIFY COLUMN `vitaminC` decimal(10,2)DEFAULT 0 AFTER `niacin`; |
@@ -1,40 +0,0 @@ | |||||
--liquibase formatted sql | |||||
--changeset terence:create-table-and-insert-data | |||||
--comment: Create table and insert data | |||||
CREATE TABLE `Nutrients` ( | |||||
`nutrient_id` int NOT NULL AUTO_INCREMENT, | |||||
`nutrient_name` varchar(50) NOT NULL, | |||||
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, | |||||
PRIMARY KEY (`nutrient_id`), | |||||
UNIQUE KEY `idx_nutrient_name` (`nutrient_name`) | |||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; | |||||
CREATE TABLE `Nutrient_Impacts` ( | |||||
`impact_id` int NOT NULL AUTO_INCREMENT, | |||||
`nutrient_id` int NOT NULL, | |||||
`organ_affected` varchar(100) NOT NULL, | |||||
`impact_type` ENUM('Positive', 'Negative') NOT NULL, | |||||
`impact_description` text NOT NULL, | |||||
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, | |||||
PRIMARY KEY (`impact_id`), | |||||
FOREIGN KEY (`nutrient_id`) REFERENCES `Nutrients`(`nutrient_id`) | |||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; | |||||
INSERT INTO `Nutrients` (nutrient_name) VALUES | |||||
('Calories'), | |||||
('Protein'), | |||||
('Fat'), | |||||
('Carbohydrate'), | |||||
('Sodium'), | |||||
('Potassium'), | |||||
('Calcium'), | |||||
('Phosphorus'), | |||||
('Iron'), | |||||
('Vitamin A'), | |||||
('Vitamin B1'), | |||||
('Vitamin B2'), | |||||
('Niacin'), | |||||
('Vitamin C'); |
@@ -1,26 +0,0 @@ | |||||
--liquibase formatted sql | |||||
--changeset terence:create-table-and-insert-data | |||||
--comment: Create table and insert data | |||||
INSERT INTO `Nutrient_Impacts` | |||||
(nutrient_id, organ_affected, impact_type, impact_description) | |||||
VALUES | |||||
(2, 'Muscles', 'Positive', 'Essential for muscle growth and repair'), | |||||
(2, 'Bones', 'Positive', 'Helps maintain bone mass'), | |||||
(2, 'Immune System', 'Positive', 'Supports immune system function'), | |||||
(14, 'Immune System', 'Positive', 'Strengthens immune system and fights infections'), | |||||
(14, 'Skin', 'Positive', 'Promotes collagen production for healthy skin'), | |||||
(14, 'Blood Vessels', 'Positive', 'Supports blood vessel health'), | |||||
(9, 'Blood', 'Positive', 'Essential for red blood cell production'), | |||||
(9, 'Brain', 'Positive', 'Supports cognitive function'), | |||||
(9, 'Immune System', 'Positive', 'Helps maintain immune system'), | |||||
(7, 'Bones', 'Positive', 'Essential for bone strength and density'), | |||||
(7, 'Teeth', 'Positive', 'Maintains dental health'), | |||||
(7, 'Muscles', 'Positive', 'Required for proper muscle function'); |
@@ -1,49 +0,0 @@ | |||||
/* | |||||
--liquibase formatted sql | |||||
--changeset terence:create-table-and-insert-data | |||||
--comment: Create table and insert data | |||||
CREATE TABLE `Allergies` ( | |||||
`allergy_id` int NOT NULL AUTO_INCREMENT, | |||||
`allergy_name` varchar(50) NOT NULL, | |||||
`description` text, | |||||
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, | |||||
PRIMARY KEY (`allergy_id`), | |||||
UNIQUE KEY `idx_allergy_name` (`allergy_name`) | |||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; | |||||
CREATE TABLE `User_Allergies` ( | |||||
`user_allergy_id` int NOT NULL AUTO_INCREMENT, | |||||
`user_id` int NOT NULL, | |||||
`allergy_id` int NOT NULL, | |||||
`diagnosed_date` date, | |||||
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, | |||||
PRIMARY KEY (`user_allergy_id`), | |||||
UNIQUE KEY `idx_user_allergy` (`user_id`, `allergy_id`), | |||||
FOREIGN KEY (`user_id`) REFERENCES `users`(`id`), | |||||
FOREIGN KEY (`allergy_id`) REFERENCES `Allergies`(`allergy_id`) | |||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; | |||||
INSERT INTO `Allergies` (allergy_name, description) VALUES | |||||
('Peanuts', 'Common legume that can cause severe allergic reactions'), | |||||
('Tree Nuts', 'Including almonds, walnuts, cashews, etc.'), | |||||
('Milk', 'Dairy products and lactose'), | |||||
('Eggs', 'Both egg whites and yolks'), | |||||
('Soy', 'Soybeans and soy-based products'), | |||||
('Wheat', 'Including gluten sensitivity'), | |||||
('Fish', 'Various types of fish'), | |||||
('Shellfish', 'Crustaceans and mollusks'), | |||||
('Sesame', 'Seeds and sesame oil'), | |||||
('Sulfites', 'Common food preservative'); | |||||
INSERT INTO `User_Allergies` | |||||
(user_id, allergy_id, severity_level, symptoms, diagnosed_date) | |||||
VALUES | |||||
(1, 1, 'Severe', 'Anaphylaxis, difficulty breathing, swelling', '2023-01-15'), | |||||
(1, 3, 'Moderate', 'Digestive issues, skin rash', '2023-02-20'), | |||||
(2, 4, 'Mild', 'Mild skin irritation', '2023-03-10'), | |||||
(2, 8, 'Severe', 'Severe rash, breathing difficulties', '2023-04-05'); | |||||
*/ |
@@ -1,7 +0,0 @@ | |||||
--liquibase formatted sql | |||||
--changeset terence:create-table-and-insert-data | |||||
--comment: Create table and insert data | |||||
Alter TABLE `fhsmscdb`.`food1` | |||||
ADD COLUMN `Restaurant_ID` int(11) DEFAULT NULL; |
@@ -1,7 +0,0 @@ | |||||
--liquibase formatted sql | |||||
--changeset terence:create-table-and-insert-data | |||||
--comment: Create table and insert data | |||||
INSERT INTO `food1` (`name`, `Calories (kcal)`, `Protein (g)`, `Fat (g)`, `Carbohydrate (g)`, `Sodium (mg)`, `Postassium (mg)`, `Calcium (mg)`, `Phosphorus (mg)`,`Iron (mg)`,`Vitamin A (μg)`,`Vitamin B1 (mg)`,`Vitamin B2 (mg)`,`Niacin (mg)`,`Vitamin C (mg)`,`food_type`,`Weight (g)`,`contains_egg`, `contains_milk`, `contains_wheat`, `contains_shrimp`,`contains_crab`,`contains_buckwheat`,`contains_peanut`,`contains_walnut`,`Restaurant_ID`) VALUES | |||||
('N.Y. Barbecue Sausage & Cheese McMuffin',504,16.6,32.9,35.1,952,263,162,190,1.1,60,0.2,0.21,6,3,'food',152,0,0,0,3,3,3,3,3,1); |
@@ -1,15 +0,0 @@ | |||||
--liquibase formatted sql | |||||
--changeset terence:create-table-and-insert-data | |||||
--comment: Create table and insert data | |||||
CREATE TABLE `Nutrients_Need` ( | |||||
`id` int NOT NULL, | |||||
`bmr` DECIMAL(10,2) NOT NULL, | |||||
`tdee` DECIMAL(10,2) NOT NULL, | |||||
`protein_need` DECIMAL(10,2) NOT NULL, | |||||
`fat_need` DECIMAL(10,2) NOT NULL, | |||||
`carbo_need` DECIMAL(10,2) NOT NULL, | |||||
`last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, | |||||
PRIMARY KEY (`id`), | |||||
FOREIGN KEY (`id`) REFERENCES `user` (`id`) | |||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; |
@@ -1,64 +0,0 @@ | |||||
--liquibase formatted sql | |||||
--changeset terence:create-update-trigger splitStatements:false | |||||
--comment: Create update trigger | |||||
CREATE TRIGGER update_user_Nutrients_Need | |||||
AFTER UPDATE ON user_information | |||||
FOR EACH ROW | |||||
BEGIN | |||||
DECLARE calculated_bmr DECIMAL(10,2); | |||||
DECLARE calculated_tdee DECIMAL(10,2); | |||||
DECLARE user_age INT; | |||||
DECLARE weight_kg DECIMAL(5,2); | |||||
DECLARE height_cm DECIMAL(5,2); | |||||
-- Extract numeric values from weight and height | |||||
SET weight_kg = CAST(REPLACE(NEW.weight, ' kg', '') AS DECIMAL(5,2)); | |||||
SET height_cm = CAST(REPLACE(NEW.height, ' cm', '') AS DECIMAL(5,2)); | |||||
-- Calculate age | |||||
SET user_age = FLOOR(DATEDIFF(CURRENT_DATE, FROM_UNIXTIME(NEW.date_of_birth/1000)) / 365); | |||||
-- Calculate BMR based on gender | |||||
IF NEW.gender = 'Male' THEN | |||||
SET calculated_bmr = 88.362 + (13.397 * weight_kg) + (4.799 * height_cm) - (5.677 * user_age); | |||||
ELSE | |||||
SET calculated_bmr = 447.593 + (9.247 * weight_kg) + (3.098 * height_cm) - (4.330 * user_age); | |||||
END IF; | |||||
-- Calculate TDEE based on activity level | |||||
SET calculated_tdee = calculated_bmr * | |||||
CASE NEW.activitylevel | |||||
WHEN 'Sedentary' THEN 1.2 | |||||
WHEN '1-2 times' THEN 1.375 | |||||
WHEN '3-5 times' THEN 1.55 | |||||
WHEN '6-7 times' THEN 1.725 | |||||
WHEN 'Professional' THEN 1.9 | |||||
ELSE 1.2 | |||||
END; | |||||
-- Insert or update TDEE record | |||||
INSERT INTO User_TDEE ( | |||||
user_id, | |||||
bmr, | |||||
tdee, | |||||
protein_need, | |||||
fat_need, | |||||
carbo_need | |||||
) | |||||
VALUES ( | |||||
NEW.user_id, | |||||
calculated_bmr, | |||||
calculated_tdee, | |||||
weight_kg * 2, | |||||
(calculated_tdee * 0.25) / 9, | |||||
(calculated_tdee - (weight_kg * 2 * 4) - (calculated_tdee * 0.25)) / 4 | |||||
) | |||||
ON DUPLICATE KEY UPDATE | |||||
bmr = calculated_bmr, | |||||
tdee = calculated_tdee, | |||||
protein_need = weight_kg * 2, | |||||
fat_need = (calculated_tdee * 0.25) / 9, | |||||
carbo_need = (calculated_tdee - (weight_kg * 2 * 4) - (calculated_tdee * 0.25)) / 4, | |||||
last_updated = CURRENT_TIMESTAMP; | |||||
END; |
@@ -1,64 +0,0 @@ | |||||
--liquibase formatted sql | |||||
--changeset terence:create-update-trigger splitStatements:false | |||||
--comment: Create update trigger | |||||
CREATE TRIGGER update_user_Nutrients_Need | |||||
AFTER UPDATE ON user_information | |||||
FOR EACH ROW | |||||
BEGIN | |||||
DECLARE calculated_bmr DECIMAL(10,2); | |||||
DECLARE calculated_tdee DECIMAL(10,2); | |||||
DECLARE user_age INT; | |||||
DECLARE weight_kg DECIMAL(5,2); | |||||
DECLARE height_cm DECIMAL(5,2); | |||||
-- Extract numeric values from weight and height | |||||
SET weight_kg = CAST(REPLACE(NEW.weight, ' kg', '') AS DECIMAL(5,2)); | |||||
SET height_cm = CAST(REPLACE(NEW.height, ' cm', '') AS DECIMAL(5,2)); | |||||
-- Calculate age | |||||
SET user_age = FLOOR(DATEDIFF(CURRENT_DATE, FROM_UNIXTIME(NEW.date_of_birth/1000)) / 365); | |||||
-- Calculate BMR based on gender | |||||
IF NEW.gender = 'Male' THEN | |||||
SET calculated_bmr = 88.362 + (13.397 * weight_kg) + (4.799 * height_cm) - (5.677 * user_age); | |||||
ELSE | |||||
SET calculated_bmr = 447.593 + (9.247 * weight_kg) + (3.098 * height_cm) - (4.330 * user_age); | |||||
END IF; | |||||
-- Calculate TDEE based on activity level | |||||
SET calculated_tdee = calculated_bmr * | |||||
CASE NEW.activitylevel | |||||
WHEN 'Sedentary' THEN 1.2 | |||||
WHEN '1-2 times' THEN 1.375 | |||||
WHEN '3-5 times' THEN 1.55 | |||||
WHEN '6-7 times' THEN 1.725 | |||||
WHEN 'Professional' THEN 1.9 | |||||
ELSE 1.2 | |||||
END; | |||||
-- Insert or update TDEE record | |||||
INSERT INTO nutrients_need ( | |||||
user_id, | |||||
bmr, | |||||
tdee, | |||||
protein_need, | |||||
fat_need, | |||||
carbo_need | |||||
) | |||||
VALUES ( | |||||
NEW.user_id, | |||||
calculated_bmr, | |||||
calculated_tdee, | |||||
weight_kg * 2, | |||||
(calculated_tdee * 0.25) / 9, | |||||
(calculated_tdee - (weight_kg * 2 * 4) - (calculated_tdee * 0.25)) / 4 | |||||
) | |||||
ON DUPLICATE KEY UPDATE | |||||
bmr = calculated_bmr, | |||||
tdee = calculated_tdee, | |||||
protein_need = weight_kg * 2, | |||||
fat_need = (calculated_tdee * 0.25) / 9, | |||||
carbo_need = (calculated_tdee - (weight_kg * 2 * 4) - (calculated_tdee * 0.25)) / 4, | |||||
last_updated = CURRENT_TIMESTAMP; | |||||
END; |
@@ -1,44 +0,0 @@ | |||||
--liquibase formatted sql | |||||
--changeset terence:create-table-and-insert-data | |||||
--comment: Create table and insert data | |||||
/* | |||||
CREATE TABLE `Allergies` ( | |||||
`allergy_id` int NOT NULL AUTO_INCREMENT, | |||||
`allergy_name` varchar(50) NOT NULL, | |||||
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, | |||||
PRIMARY KEY (`allergy_id`), | |||||
UNIQUE KEY `idx_allergy_name` (`allergy_name`) | |||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; | |||||
*/ | |||||
CREATE TABLE `User_Allergies` ( | |||||
`user_allergy_id` int NOT NULL AUTO_INCREMENT, | |||||
`user_id` int NOT NULL, | |||||
`allergy_id` int NOT NULL, | |||||
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, | |||||
PRIMARY KEY (`user_allergy_id`), | |||||
UNIQUE KEY `idx_user_allergy` (`user_id`, `allergy_id`), | |||||
FOREIGN KEY (`user_id`) REFERENCES `user`(`id`), | |||||
FOREIGN KEY (`allergy_id`) REFERENCES `Allergies`(`allergy_id`) | |||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; | |||||
INSERT INTO `Allergies` (allergy_name) VALUES | |||||
('Peanuts'), | |||||
('Tree Nuts'), | |||||
('Milk'), | |||||
('Eggs'), | |||||
('Soy' ), | |||||
('Wheat'), | |||||
('Fish'), | |||||
('Shellfish'), | |||||
('Sesame'), | |||||
('Sulfites'); | |||||
INSERT INTO `User_Allergies` | |||||
(user_id, allergy_id ) | |||||
VALUES | |||||
(1, 1), | |||||
(1, 3), | |||||
(2, 4), | |||||
(2, 8); |
@@ -1,19 +0,0 @@ | |||||
--liquibase formatted sql | |||||
--changeset terence:create-table-and-insert-data | |||||
--comment: Create table and insert data | |||||
Alter TABLE `fhsmscdb`.`food1` | |||||
CHANGE `Calories (kcal)` Calories decimal(10,2), | |||||
CHANGE `Protein (g)` Protein decimal(10,2), | |||||
CHANGE `Fat (g)` Fat decimal(10,2), | |||||
CHANGE `Carbohydrate (g)` Carbohydrate decimal(10,2), | |||||
CHANGE `Sodium (mg)` Sodium decimal(10,2), | |||||
CHANGE `Postassium (mg)` Potassium decimal(10,2), | |||||
CHANGE `Calcium (mg)` Calcium decimal(10,2), | |||||
CHANGE `Phosphorus (mg)` Phosphorus decimal(10,2), | |||||
CHANGE `Iron (mg)` Iron decimal(10,2), | |||||
CHANGE `Vitamin A (μg)` VitaminA decimal(10,2), | |||||
CHANGE `Vitamin B1 (mg)` VitaminB1 decimal(10,2), | |||||
CHANGE `Vitamin B2 (mg)` VitaminB2 decimal(10,2), | |||||
CHANGE `Niacin (mg)` Niacin decimal(10,2), | |||||
CHANGE `Vitamin C (mg)` VitaminC decimal(10,2), | |||||
CHANGE `Weight (g)` Weight decimal(10,2); |
@@ -1,6 +0,0 @@ | |||||
--liquibase formatted sql | |||||
--changeset terence:create-table-and-insert-data | |||||
--comment: Create table and insert data | |||||
Alter TABLE `fhsmscdb`.`user_information` | |||||
drop column `allergy`; | |||||
@@ -1,13 +0,0 @@ | |||||
--liquibase formatted sql | |||||
--changeset terence:create-table-and-insert-data | |||||
--comment: Create table and insert data | |||||
CREATE TABLE `FB_Operator` ( | |||||
`FB_id` int NOT NULL AUTO_INCREMENT, | |||||
`FB_name` varchar(50) NOT NULL, | |||||
`FB_type` varchar(255) NOT NULL, | |||||
`FB_cuisine` varchar(20) NOT NULL, | |||||
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, | |||||
PRIMARY KEY (`FB_id`) | |||||
)ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; |
@@ -1,17 +0,0 @@ | |||||
--liquibase formatted sql | |||||
--changeset terence:create-table-and-insert-data | |||||
--comment: Create table and insert data | |||||
INSERT INTO `FB_Operator` | |||||
(FB_id, FB_name, FB_type, FB_cuisine) | |||||
VALUES | |||||
(1, 'KFC', 'Fast Food', 'Fast Food'), | |||||
(2, 'McDonald', 'Fast Food', 'Fast Food'), | |||||
(3, '大家樂', 'Cha Chaan Teng', 'Hong Kong Style'), | |||||
(4, '翠華餐廳', 'Cha Chaan Teng', 'Hong Kong Style'), | |||||
(5, '美心', 'Chinese Restaurant', 'Cantonese'), | |||||
(6, '點點心', 'Dim Sum', 'Cantonese'), | |||||
(7, '吉野家', 'Fast Food', 'Japanese'), | |||||
(8, '壽司郎', 'Japanese Restaurant', 'Japanese'), | |||||
(9, '譚仔雲南米線', 'Noodle Shop', 'Chinese'), | |||||
(10, '大快活', 'Fast Food', 'Hong Kong Style') |
@@ -1,14 +0,0 @@ | |||||
--liquibase formatted sql | |||||
--changeset terence:create-table-and-insert-data | |||||
--comment: Create table and insert data | |||||
CREATE TABLE `FB_Outlets` ( | |||||
`FB_id` int NOT NULL AUTO_INCREMENT, | |||||
`FB_outlet_id` int NOT NULL, | |||||
`FB_outlet_district` varchar(255) NOT NULL, | |||||
`FB_outlet_address` varchar(255) NOT NULL, | |||||
`FB_outlet_phone` varchar(255) NOT NULL, | |||||
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, | |||||
PRIMARY KEY (`FB_id`) | |||||
)ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; |
@@ -1,14 +0,0 @@ | |||||
--liquibase formatted sql | |||||
--changeset terence:create-table-and-insert-data | |||||
--comment: Create table and insert data | |||||
ALTER TABLE `FB_Outlets` MODIFY COLUMN `FB_id` int NOT NULL; | |||||
ALTER TABLE `FB_Outlets` DROP PRIMARY KEY; | |||||
ALTER TABLE `FB_Outlets` ADD PRIMARY KEY (`FB_outlet_id`); | |||||
ALTER TABLE `FB_Outlets` ADD CONSTRAINT `fk_fb_outlets_operator` | |||||
FOREIGN KEY (`FB_id`) REFERENCES `fb_operator`(`FB_id`); | |||||
ALTER TABLE `FB_Outlets` ADD INDEX `idx_fb_id` (`FB_id`); |
@@ -1,7 +0,0 @@ | |||||
--liquibase formatted sql | |||||
--changeset terence:create-table-and-insert-data | |||||
--comment: Create table and insert data | |||||
ALTER TABLE `FB_Outlets` MODIFY COLUMN `FB_outlet_id` int NOT NULL FIRST; | |||||
ALTER TABLE `FB_Outlets` MODIFY COLUMN `FB_id` int NOT NULL AFTER `FB_outlet_id`; |
@@ -1,20 +0,0 @@ | |||||
--liquibase formatted sql | |||||
--changeset terence:create-table-and-insert-data | |||||
--comment: Create table and insert data | |||||
DROP TABLE `FB_Outlets`; | |||||
CREATE TABLE `FB_Outlets` ( | |||||
`id` int NOT NULL AUTO_INCREMENT, | |||||
`FB_outlet_id` int NOT NULL, | |||||
`FB_id` int NOT NULL, | |||||
`FB_outlet_district` varchar(255), | |||||
`FB_outlet_address` varchar(255), | |||||
`FB_outlet_phone` varchar(255), | |||||
`created_at` timestamp, | |||||
PRIMARY KEY (`id`), | |||||
INDEX `idx_fb_outlet_id` (`FB_outlet_id`), | |||||
INDEX `idx_fb_id` (`FB_id`), | |||||
CONSTRAINT `fk_fb_outlets_operator` FOREIGN KEY (`FB_id`) | |||||
REFERENCES `fb_operator` (`FB_id`) | |||||
); |
@@ -1,13 +0,0 @@ | |||||
--liquibase formatted sql | |||||
--changeset terence:create-table-and-insert-data | |||||
--comment: Create table and insert data | |||||
INSERT INTO `FB_Outlets` (FB_outlet_id, FB_id, FB_outlet_district, FB_outlet_address, FB_outlet_phone, created_at) | |||||
VALUES | |||||
(201, 2, '金鐘', '夏愨道18號海富中心地下1-41號舖A部份', '2520 1329', CURRENT_TIMESTAMP), | |||||
(202, 2, '灣仔', '軒尼詩道302-308號集成中心Shop G11-17 ,G/F', '2893 9503', CURRENT_TIMESTAMP); | |||||
INSERT INTO FB_Outlets (FB_outlet_id, FB_id, FB_outlet_district, FB_outlet_address, FB_outlet_phone, created_at) | |||||
VALUES | |||||
(301, 3, '銅鑼灣', '波斯富街48號軒尼詩大廈3樓', '2808 0139', CURRENT_TIMESTAMP), | |||||
(302, 3, '銅鑼灣', '地下英皇道6-8 號香港天后百利大廈', '2807 3864', CURRENT_TIMESTAMP); |
@@ -1,8 +0,0 @@ | |||||
--liquibase formatted sql | |||||
--changeset terence:create-table-and-insert-data | |||||
--comment: Create table and insert data | |||||
INSERT INTO `fb_outlets` (FB_outlet_id, FB_id, FB_outlet_district, FB_outlet_address, FB_outlet_phone, created_at) | |||||
VALUES | |||||
(201, 2, '金鐘', '夏愨道18號海富中心地下1-41號舖A部份', '2520 1329', CURRENT_TIMESTAMP), | |||||
(202, 2, '灣仔', '軒尼詩道302-308號集成中心Shop G11-17 ,G/F', '2893 9503', CURRENT_TIMESTAMP); | |||||
@@ -1,71 +0,0 @@ | |||||
--liquibase formatted sql | |||||
--changeset terence:create-table-and-insert-data | |||||
--comment: Create table and insert data | |||||
CREATE TABLE `FB_Menu` ( | |||||
`FB_id` int NOT NULL AUTO_INCREMENT, | |||||
`FB_menu_id` int NOT NULL, | |||||
`Menu_Item_Description` varchar(255) NOT NULL, | |||||
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, | |||||
PRIMARY KEY (`FB_id`), | |||||
UNIQUE KEY `UK_FB_menu_id` (`FB_menu_id`) | |||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; | |||||
CREATE TABLE `FB_Menu_Item_Ingredient` ( | |||||
`id` int NOT NULL AUTO_INCREMENT, | |||||
`FB_menu_id` int NOT NULL, | |||||
`Ingredient_id` int NOT NULL, | |||||
`Ingredient_Volume` decimal(10,2) NOT NULL, | |||||
`Ingredient_Volume_Unit` varchar(50) NOT NULL, | |||||
`Allergy_Substance_ID` int, | |||||
`Nutrient_ID` int, | |||||
`Nutrient_Volume` decimal(10,2), | |||||
`Nutrient_Volume_Unit` varchar(50), | |||||
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, | |||||
PRIMARY KEY (`id`), | |||||
KEY `FK_FB_menu_id` (`FB_menu_id`), | |||||
CONSTRAINT `FK_FB_menu_id` FOREIGN KEY (`FB_menu_id`) REFERENCES `FB_Menu` (`FB_menu_id`) ON DELETE CASCADE | |||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; | |||||
CREATE TABLE `FB_Menu_and_Outlet_Relationship` ( | |||||
`id` int NOT NULL AUTO_INCREMENT, | |||||
`FB_id` int NOT NULL, | |||||
`FB_outlet_id` int NOT NULL, | |||||
`FB_menu_id` int NOT NULL, | |||||
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, | |||||
PRIMARY KEY (`id`), | |||||
KEY `FK_FB_menu_rel_id` (`FB_menu_id`), | |||||
CONSTRAINT `FK_FB_menu_rel_id` FOREIGN KEY (`FB_menu_id`) REFERENCES `FB_Menu` (`FB_menu_id`) ON DELETE CASCADE | |||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; | |||||
CREATE TABLE `daily_nutrition_summary` ( | |||||
`id` int NOT NULL AUTO_INCREMENT, | |||||
`user_id` int NOT NULL, | |||||
`date` date NOT NULL, | |||||
`total_calories` decimal(10,2) DEFAULT 0, | |||||
`total_protein` decimal(10,2) DEFAULT 0, | |||||
`total_fat` decimal(10,2) DEFAULT 0, | |||||
`total_carbs` decimal(10,2) DEFAULT 0, | |||||
`total_sodium` decimal(10,2) DEFAULT 0, | |||||
`total_potassium` decimal(10,2) DEFAULT 0, | |||||
`total_calcium` decimal(10,2) DEFAULT 0, | |||||
`total_phosphorus` decimal(10,2) DEFAULT 0, | |||||
`total_iron` decimal(10,2) DEFAULT 0, | |||||
`total_vitamin_a` decimal(10,2) DEFAULT 0, | |||||
`total_vitamin_b1` decimal(10,2) DEFAULT 0, | |||||
`total_vitamin_b2` decimal(10,2) DEFAULT 0, | |||||
`total_niacin` decimal(10,2) DEFAULT 0, | |||||
`total_vitamin_c` decimal(10,2) DEFAULT 0, | |||||
`breakfast_calories` decimal(10,2) DEFAULT 0, | |||||
`lunch_calories` decimal(10,2) DEFAULT 0, | |||||
`dinner_calories` decimal(10,2) DEFAULT 0, | |||||
`snack_calories` decimal(10,2) DEFAULT 0, | |||||
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, | |||||
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, | |||||
PRIMARY KEY (`id`), | |||||
UNIQUE KEY `UK_user_date` (`user_id`, `date`) | |||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; |
@@ -1,43 +0,0 @@ | |||||
--liquibase formatted sql | |||||
--changeset terence:create-table-and-insert-data | |||||
--comment: Create table and insert data | |||||
/* | |||||
CREATE TABLE `FB_Menu_Item_Nutrition` ( | |||||
`id` int NOT NULL AUTO_INCREMENT, | |||||
`FB_menu_id` int NOT NULL, | |||||
`Calories` decimal(10,2) DEFAULT 0, | |||||
`Protein` decimal(10,2) DEFAULT 0, | |||||
`Fat` decimal(10,2) DEFAULT 0, | |||||
`Carbohydrate` decimal(10,2) DEFAULT 0, | |||||
`Sodium` decimal(10,2) DEFAULT 0, | |||||
`Potassium` decimal(10,2) DEFAULT 0, | |||||
`Calcium` decimal(10,2) DEFAULT 0, | |||||
`Phosphorus` decimal(10,2) DEFAULT 0, | |||||
`Iron` decimal(10,2) DEFAULT 0, | |||||
`VitaminA` decimal(10,2) DEFAULT 0, | |||||
`VitaminB1` decimal(10,2) DEFAULT 0, | |||||
`VitaminB2` decimal(10,2) DEFAULT 0, | |||||
`Niacin` decimal(10,2) DEFAULT 0, | |||||
`VitaminC` decimal(10,2) DEFAULT 0, | |||||
`Nutrient_Volume` decimal(10,2) DEFAULT 0, | |||||
`Nutrient_Volume_Unit` varchar(50) NOT NULL, | |||||
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, | |||||
PRIMARY KEY (`id`), | |||||
KEY `UK_FB_menu_id` (`FB_menu_id`), | |||||
CONSTRAINT `FK_FB_menu_nutrition_id` FOREIGN KEY (`FB_menu_id`) REFERENCES `FB_Menu` (`FB_menu_id`) ON DELETE CASCADE | |||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; | |||||
*/ | |||||
CREATE TABLE `Ingredient` ( | |||||
`Ingredient_id` int NOT NULL AUTO_INCREMENT, | |||||
`Ingredient_Name` varchar(255) NOT NULL, | |||||
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, | |||||
PRIMARY KEY (`Ingredient_id`) | |||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; | |||||
ALTER TABLE `fhsmscdb`.`fb_menu_item_ingredient` | |||||
DROP COLUMN `Nutrient_ID`, | |||||
DROP COLUMN `Nutrient_Volume`, | |||||
DROP COLUMN `Nutrient_Volume_Unit`; | |||||
@@ -1,175 +0,0 @@ | |||||
--liquibase formatted sql | |||||
--changeset terence:create-table-and-insert-data | |||||
--comment: Create table and insert data | |||||
DROP TABLE IF EXISTS fb_menu_and_outlet_relationship; | |||||
DROP TABLE IF EXISTS fb_menu_item_ingredient; | |||||
DROP TABLE IF EXISTS fb_menu_item_nutrition; | |||||
DROP TABLE IF EXISTS fb_menu; | |||||
DROP TABLE IF EXISTS ingredient; | |||||
CREATE TABLE `ingredient` ( | |||||
`Ingredient_id` int NOT NULL AUTO_INCREMENT, | |||||
`Ingredient_Name` varchar(255) NOT NULL, | |||||
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, | |||||
PRIMARY KEY (`Ingredient_id`) | |||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; | |||||
CREATE TABLE `fb_menu` ( | |||||
`FB_id` int NOT NULL, | |||||
`FB_menu_id` int NOT NULL AUTO_INCREMENT, | |||||
`Menu_Item_Description` varchar(255) NOT NULL, | |||||
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, | |||||
PRIMARY KEY (`FB_menu_id`), | |||||
INDEX `idx_FB_id` (`FB_id`) | |||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; | |||||
CREATE TABLE `fb_menu_item_nutrition` ( | |||||
`id` int NOT NULL AUTO_INCREMENT, | |||||
`FB_menu_id` int NOT NULL, | |||||
`Calories` decimal(10,2) DEFAULT 0, | |||||
`Protein` decimal(10,2) DEFAULT 0, | |||||
`Fat` decimal(10,2) DEFAULT 0, | |||||
`Carbohydrate` decimal(10,2) DEFAULT 0, | |||||
`Sodium` decimal(10,2) DEFAULT 0, | |||||
`Potassium` decimal(10,2) DEFAULT 0, | |||||
`Calcium` decimal(10,2) DEFAULT 0, | |||||
`Phosphorus` decimal(10,2) DEFAULT 0, | |||||
`Iron` decimal(10,2) DEFAULT 0, | |||||
`VitaminA` decimal(10,2) DEFAULT 0, | |||||
`VitaminB1` decimal(10,2) DEFAULT 0, | |||||
`VitaminB2` decimal(10,2) DEFAULT 0, | |||||
`Niacin` decimal(10,2) DEFAULT 0, | |||||
`VitaminC` decimal(10,2) DEFAULT 0, | |||||
`Nutrient_Volume` decimal(10,2) DEFAULT 0, | |||||
`Nutrient_Volume_Unit` varchar(50) NOT NULL, | |||||
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, | |||||
PRIMARY KEY (`id`), | |||||
KEY `FK_FB_menu_nutrition_id` (`FB_menu_id`), | |||||
CONSTRAINT `FK_FB_menu_nutrition_id` FOREIGN KEY (`FB_menu_id`) REFERENCES `fb_menu` (`FB_menu_id`) ON DELETE CASCADE | |||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; | |||||
CREATE TABLE `fb_menu_item_ingredient` ( | |||||
`id` int NOT NULL AUTO_INCREMENT, | |||||
`FB_menu_id` int NOT NULL, | |||||
`Ingredient_id` int NOT NULL, | |||||
`Ingredient_Volume` decimal(10,2) NOT NULL, | |||||
`Ingredient_Volume_Unit` varchar(50) NOT NULL, | |||||
`Allergy_Substance_ID` int, | |||||
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, | |||||
PRIMARY KEY (`id`), | |||||
KEY `FK_FB_menu_id` (`FB_menu_id`), | |||||
KEY `FK_Ingredient_id` (`Ingredient_id`), | |||||
CONSTRAINT `FK_FB_menu_id` FOREIGN KEY (`FB_menu_id`) REFERENCES `fb_menu` (`FB_menu_id`) ON DELETE CASCADE, | |||||
CONSTRAINT `FK_Ingredient_id` FOREIGN KEY (`Ingredient_id`) REFERENCES `ingredient` (`Ingredient_id`) ON DELETE CASCADE | |||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; | |||||
CREATE TABLE `fb_menu_and_outlet_relationship` ( | |||||
`id` int NOT NULL AUTO_INCREMENT, | |||||
`FB_id` int NOT NULL, | |||||
`FB_outlet_id` int NOT NULL, | |||||
`FB_menu_id` int NOT NULL, | |||||
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, | |||||
PRIMARY KEY (`id`), | |||||
KEY `FK_FB_menu_rel_id` (`FB_menu_id`), | |||||
CONSTRAINT `FK_FB_menu_rel_id` FOREIGN KEY (`FB_menu_id`) REFERENCES `fb_menu` (`FB_menu_id`) ON DELETE CASCADE | |||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; | |||||
INSERT INTO fb_menu (FB_id, FB_menu_id, Menu_Item_Description, created_at) VALUES | |||||
(1, 101, '香煎三文鱼配时蔬', NOW()), | |||||
(1, 102, '黑椒牛排配蘑菇酱', NOW()), | |||||
(1, 103, '泰式青咖喱鸡', NOW()), | |||||
(1, 104, '意式肉酱面配帕玛森芝士', NOW()), | |||||
(1, 105, '地中海风味沙拉', NOW()), | |||||
(2, 201, '清蒸鲈鱼配姜葱', NOW()), | |||||
(2, 202, '红烧狮子头', NOW()), | |||||
(2, 203, '宫保鸡丁配花生米', NOW()); | |||||
INSERT INTO fb_menu_item_nutrition (FB_menu_id, Calories, Protein, Fat, Carbohydrate, Sodium, Potassium, Calcium, Phosphorus, Iron, VitaminA, VitaminB1, VitaminB2, Niacin, VitaminC, Nutrient_Volume, Nutrient_Volume_Unit, created_at) VALUES | |||||
(101, 275.00, 25.00, 15.00, 10.00, 150.00, 450.00, 30.00, 250.00, 1.80, 120.00, 0.15, 0.20, 5.00, 15.00, 350.00, 'g', NOW()), | |||||
(102, 320.00, 30.00, 20.00, 5.00, 200.00, 500.00, 20.00, 200.00, 3.50, 50.00, 0.10, 0.15, 7.00, 5.00, 300.00, 'g', NOW()), | |||||
(103, 310.00, 22.00, 18.00, 15.00, 300.00, 400.00, 50.00, 180.00, 2.00, 80.00, 0.12, 0.18, 6.00, 20.00, 350.00, 'g', NOW()), | |||||
(104, 480.00, 20.00, 15.00, 65.00, 800.00, 350.00, 150.00, 200.00, 2.50, 100.00, 0.20, 0.25, 4.00, 10.00, 400.00, 'g', NOW()), | |||||
(105, 200.00, 8.00, 12.00, 15.00, 120.00, 300.00, 100.00, 120.00, 1.20, 150.00, 0.08, 0.12, 2.00, 45.00, 250.00, 'g', NOW()); | |||||
INSERT INTO ingredient (Ingredient_id, Ingredient_Name, created_at) VALUES | |||||
(1, '三文鱼', NOW()), | |||||
(2, '橄榄油', NOW()), | |||||
(3, '西兰花', NOW()), | |||||
(4, '胡萝卜', NOW()), | |||||
(5, '牛排', NOW()), | |||||
(6, '黑胡椒', NOW()), | |||||
(7, '蘑菇', NOW()), | |||||
(8, '鸡胸肉', NOW()), | |||||
(9, '青咖喱酱', NOW()), | |||||
(10, '椰奶', NOW()), | |||||
(11, '意大利面', NOW()), | |||||
(12, '番茄', NOW()), | |||||
(13, '牛肉碎', NOW()), | |||||
(14, '帕玛森芝士', NOW()), | |||||
(15, '生菜', NOW()), | |||||
(16, '黄瓜', NOW()), | |||||
(17, '橄榄', NOW()), | |||||
(18, '羊奶芝士', NOW()); | |||||
INSERT INTO fb_menu_item_ingredient (FB_menu_id, Ingredient_id, Ingredient_Volume, Ingredient_Volume_Unit, Allergy_Substance_ID, created_at) VALUES | |||||
(101, 1, 200.00, 'g', 7, NOW()), -- 三文鱼 (鱼类过敏 | |||||
(101, 2, 15.00, 'ml', NULL, NOW()), | |||||
(101, 3, 100.00, 'g', NULL, NOW()), | |||||
(101, 4, 50.00, 'g', NULL, NOW()), | |||||
(102, 5, 250.00, 'g', NULL, NOW()), | |||||
(102, 6, 5.00, 'g', NULL, NOW()), | |||||
(102, 7, 100.00, 'g', NULL, NOW()), | |||||
(102, 2, 10.00, 'ml', NULL, NOW()), | |||||
(103, 8, 180.00, 'g', NULL, NOW()), | |||||
(103, 9, 30.00, 'g', 5, NOW()), -- 咖喱酱 (可能含大豆) | |||||
(103, 10, 150.00, 'ml', 3, NOW()), -- 椰奶 (可能含乳制品) | |||||
(103, 3, 80.00, 'g', NULL, NOW()), | |||||
(104, 11, 120.00, 'g', 6, NOW()), -- 意大利面 (含麦麸) | |||||
(104, 12, 150.00, 'g', NULL, NOW()), | |||||
(104, 13, 100.00, 'g', NULL, NOW()), | |||||
(104, 14, 20.00, 'g', 3, NOW()), -- 帕玛森芝士 (含乳制品) | |||||
(105, 15, 100.00, 'g', NULL, NOW()), | |||||
(105, 16, 80.00, 'g', NULL, NOW()), | |||||
(105, 17, 30.00, 'g', NULL, NOW()), | |||||
(105, 18, 40.00, 'g', 3, NOW()), -- 羊奶芝士 (含乳制品) | |||||
(105, 2, 15.00, 'ml', NULL, NOW()); | |||||
INSERT INTO fb_menu_and_outlet_relationship (FB_id, FB_outlet_id, FB_menu_id, created_at) VALUES | |||||
(1, 1001, 101, NOW()), | |||||
(1, 1001, 102, NOW()), | |||||
(1, 1001, 103, NOW()), | |||||
(1, 1002, 101, NOW()), | |||||
(1, 1002, 104, NOW()), | |||||
(1, 1002, 105, NOW()), | |||||
(2, 2001, 201, NOW()), | |||||
(2, 2001, 202, NOW()), | |||||
(2, 2001, 203, NOW()), | |||||
(2, 2002, 201, NOW()), | |||||
(2, 2002, 202, NOW()); |
@@ -1,17 +0,0 @@ | |||||
--liquibase formatted sql | |||||
--changeset terence:create-table-and-insert-data | |||||
--comment: Create table and insert data | |||||
/* | |||||
INSERT INTO fb_operator (FB_id, FB_name, FB_type, FB_cuisine, created_at) VALUES | |||||
(1, 'Healthy Eater', 'Fast Food', 'Chinese', NOW()), | |||||
(2, 'Seafood World', 'Dinner', 'Cantonese', NOW()), | |||||
*/ | |||||
INSERT INTO fb_outlets (FB_outlet_id, FB_id, FB_outlet_district, FB_outlet_address, FB_outlet_phone, created_at) VALUES | |||||
(1001, 1, 'Central', 'Central Financial Street 88, 1st Floor', '2345-6789', NOW()), | |||||
(1002, 1, 'Causeway Bay', 'Causeway Bay Times Square 2nd Floor', '2345-6790', NOW()), | |||||
(2001, 2, 'Tsim Sha Tsui', 'Tsim Sha Tsui Guangdong Road 30', '3456-7890', NOW()), | |||||
(2002, 2, 'Sha Tin', 'Sha Tin New City Plaza 5th Floor', '3456-7891', NOW()); |
@@ -1,85 +0,0 @@ | |||||
--liquibase formatted sql | |||||
--changeset terence:create-organization-tables | |||||
--comment: Create organization related tables | |||||
DROP TABLE daily_nutrition_summary; | |||||
CREATE TABLE User_Group_Organization ( | |||||
User_Grp_Org_ID INT AUTO_INCREMENT PRIMARY KEY, | |||||
User_Grp_Org_Name VARCHAR(100) NOT NULL, | |||||
Creator_User_ID INT NOT NULL, | |||||
Creation_Date_Time TIMESTAMP DEFAULT CURRENT_TIMESTAMP | |||||
); | |||||
CREATE TABLE User_Group_Members ( | |||||
User_Grp_Org_ID INT NOT NULL, | |||||
User_ID INT NOT NULL, | |||||
R_Ship_Creator VARCHAR(50), | |||||
Creation_Date_Time TIMESTAMP DEFAULT CURRENT_TIMESTAMP, | |||||
PRIMARY KEY (User_Grp_Org_ID, User_ID), | |||||
FOREIGN KEY (User_Grp_Org_ID) REFERENCES User_Group_Organization(User_Grp_Org_ID) | |||||
); | |||||
CREATE TABLE User_Group_Admin ( | |||||
User_Grp_Org_ID INT NOT NULL, | |||||
Admin_User_ID INT NOT NULL, | |||||
Organization_Role VARCHAR(50) NOT NULL, | |||||
Creation_Date_Time TIMESTAMP DEFAULT CURRENT_TIMESTAMP, | |||||
PRIMARY KEY (User_Grp_Org_ID, Admin_User_ID), | |||||
FOREIGN KEY (User_Grp_Org_ID) REFERENCES User_Group_Organization(User_Grp_Org_ID) | |||||
); | |||||
CREATE TABLE User_Delegation ( | |||||
User_ID INT NOT NULL, | |||||
Delegate_To_User_ID INT NOT NULL, | |||||
Data_Group_ID INT NOT NULL, | |||||
Delegation_Start_Date DATE NOT NULL, | |||||
Delegation_Expiry_Date DATE NOT NULL, | |||||
Creation_Date_Time TIMESTAMP DEFAULT CURRENT_TIMESTAMP, | |||||
PRIMARY KEY (User_ID, Delegate_To_User_ID, Data_Group_ID) | |||||
); | |||||
CREATE TABLE daily_nutrition_summary ( | |||||
id INT AUTO_INCREMENT PRIMARY KEY, | |||||
user_id INT NOT NULL, | |||||
User_Grp_Org_ID INT, | |||||
date DATE NOT NULL, | |||||
visibility_level INT DEFAULT 1, | |||||
data_category VARCHAR(50) DEFAULT 'regular', | |||||
reference_group_id INT, | |||||
health_metrics_reference_id INT, | |||||
total_calories DECIMAL(10,2) DEFAULT 0, | |||||
total_protein DECIMAL(10,2) DEFAULT 0, | |||||
total_fat DECIMAL(10,2) DEFAULT 0, | |||||
total_carbs DECIMAL(10,2) DEFAULT 0, | |||||
total_sodium DECIMAL(10,2) DEFAULT 0, | |||||
total_potassium DECIMAL(10,2) DEFAULT 0, | |||||
total_calcium DECIMAL(10,2) DEFAULT 0, | |||||
total_phosphorus DECIMAL(10,2) DEFAULT 0, | |||||
total_iron DECIMAL(10,2) DEFAULT 0, | |||||
total_vitamin_a DECIMAL(10,2) DEFAULT 0, | |||||
total_vitamin_b1 DECIMAL(10,2) DEFAULT 0, | |||||
total_vitamin_b2 DECIMAL(10,2) DEFAULT 0, | |||||
total_niacin DECIMAL(10,2) DEFAULT 0, | |||||
total_vitamin_c DECIMAL(10,2) DEFAULT 0, | |||||
breakfast_calories DECIMAL(10,2) DEFAULT 0, | |||||
lunch_calories DECIMAL(10,2) DEFAULT 0, | |||||
dinner_calories DECIMAL(10,2) DEFAULT 0, | |||||
snack_calories DECIMAL(10,2) DEFAULT 0, | |||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, | |||||
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, | |||||
FOREIGN KEY (User_Grp_Org_ID) REFERENCES User_Group_Organization(User_Grp_Org_ID) | |||||
); | |||||
CREATE INDEX idx_daily_nutrition_user_date ON daily_nutrition_summary(user_id, date); | |||||
CREATE INDEX idx_daily_nutrition_org_date ON daily_nutrition_summary(User_Grp_Org_ID, date); | |||||
@@ -1,71 +0,0 @@ | |||||
--liquibase formatted sql | |||||
--changeset terence:create-organization-tables | |||||
--comment: Create organization related tables | |||||
INSERT INTO User_Group_Organization (User_Grp_Org_ID, User_Grp_Org_Name, Creator_User_ID, Creation_Date_Time) | |||||
VALUES | |||||
(1, 'Aschool', 1001, NOW()), | |||||
(2, 'Bschool', 1002, NOW()), | |||||
(3, 'Cschool', 1003, NOW()), | |||||
(4, 'Dschool', 1004, NOW()), | |||||
(5, 'Eschool', 1005, NOW()); | |||||
INSERT INTO User_Group_Members (User_Grp_Org_ID, User_ID, R_Ship_Creator, Creation_Date_Time) | |||||
VALUES | |||||
(1, 1001, 'Creator', NOW()), | |||||
(1, 1010, 'Student', NOW()), | |||||
(1, 1011, 'Student', NOW()), | |||||
(1, 1012, 'Teacher', NOW()), | |||||
(1, 1013, 'Teacher', NOW()), | |||||
(2, 1002, 'Creator', NOW()), | |||||
(2, 1020, 'Student', NOW()), | |||||
(2, 1021, 'Student', NOW()), | |||||
(2, 1022, 'Teacher', NOW()), | |||||
(3, 1003, 'Creator', NOW()), | |||||
(3, 1030, 'Student', NOW()), | |||||
(3, 1031, 'Student', NOW()), | |||||
(4, 1004, 'Creator', NOW()), | |||||
(4, 1040, 'Student', NOW()), | |||||
(5, 1005, 'Creator', NOW()), | |||||
(5, 1050, 'Student', NOW()); | |||||
INSERT INTO User_Group_Admin (User_Grp_Org_ID, Admin_User_ID, Organization_Role, Creation_Date_Time) | |||||
VALUES | |||||
(1, 1001, 'President', NOW()), | |||||
(1, 1012, 'Dean', NOW()), | |||||
(1, 1013, 'Dean', NOW()), | |||||
(2, 1002, 'President', NOW()), | |||||
(2, 1022, 'Dean', NOW()), | |||||
(3, 1003, 'President', NOW()), | |||||
(3, 1031, 'President', NOW()), | |||||
(4, 1004, 'President', NOW()), | |||||
(5, 1005, 'President', NOW()); | |||||
INSERT INTO User_Delegation (User_ID, Delegate_To_User_ID, Data_Group_ID, Delegation_Start_Date, Delegation_Expiry_Date, Creation_Date_Time) | |||||
VALUES | |||||
(1001, 1012, 1, CURDATE(), DATE_ADD(CURDATE(), INTERVAL 1 YEAR), NOW()), | |||||
(1001, 1013, 2, CURDATE(), DATE_ADD(CURDATE(), INTERVAL 6 MONTH), NOW()), | |||||
(1002, 1022, 1, CURDATE(), DATE_ADD(CURDATE(), INTERVAL 1 YEAR), NOW()), | |||||
(1002, 1022, 2, CURDATE(), DATE_ADD(CURDATE(), INTERVAL 1 YEAR), NOW()), | |||||
(1003, 1031, 3, CURDATE(), DATE_ADD(CURDATE(), INTERVAL 3 MONTH), NOW()), | |||||
(1010, 1011, 4, CURDATE(), DATE_ADD(CURDATE(), INTERVAL 7 DAY), NOW()); |
@@ -1,11 +0,0 @@ | |||||
--liquibase formatted sql | |||||
--changeset terence:insert-sample-data | |||||
--comment: Insert sample data for testing | |||||
ALTER TABLE `fhsmscdb`.`daily_nutrition_summary` | |||||
CHANGE COLUMN `created_at` `created` datetime, | |||||
CHANGE COLUMN `updated_at` `modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, | |||||
ADD COLUMN `createdBy` bigint DEFAULT NULL, | |||||
ADD COLUMN `version` int NOT NULL DEFAULT '0', | |||||
ADD COLUMN `modifiedBy` bigint DEFAULT NULL, | |||||
ADD COLUMN `deleted` tinyint(1) NOT NULL DEFAULT '0'; |
@@ -1,35 +0,0 @@ | |||||
--liquibase formatted sql | |||||
--changeset terence:create-i18n-table | |||||
--comment: Create i18n table | |||||
UPDATE fb_menu SET Menu_Item_Description = CASE FB_menu_id | |||||
WHEN 101 THEN 'Pan-fried Salmon with Seasonal Vegetables' | |||||
WHEN 102 THEN 'Black Pepper Steak with Mushroom Sauce' | |||||
WHEN 103 THEN 'Thai Green Curry Chicken' | |||||
WHEN 104 THEN 'Spaghetti Bolognese with Parmesan Cheese' | |||||
WHEN 105 THEN 'Mediterranean Salad' | |||||
WHEN 201 THEN 'Steamed Sea Bass with Ginger and Spring Onion' | |||||
WHEN 202 THEN 'Braised Lion Head Meatballs' | |||||
WHEN 203 THEN 'Kung Pao Chicken with Peanuts' | |||||
END | |||||
WHERE FB_menu_id IN (101,102,103,104,105,201,202,203); | |||||
INSERT INTO i18n (table_name, field_name, record_id, language, value) VALUES | |||||
('fb_menu', 'Menu_Item_Description', 101, 'zh', '香煎鮭魚配時蔬'), | |||||
('fb_menu', 'Menu_Item_Description', 102, 'zh', '黑椒牛排佐蘑菇醬'), | |||||
('fb_menu', 'Menu_Item_Description', 103, 'zh', '泰國青咖哩雞'), | |||||
('fb_menu', 'Menu_Item_Description', 104, 'zh', '義式肉醬麵配帕瑪森起司'), | |||||
('fb_menu', 'Menu_Item_Description', 105, 'zh', '地中海風味沙拉'), | |||||
('fb_menu', 'Menu_Item_Description', 201, 'zh', '清蒸鱸魚配薑蔥'), | |||||
('fb_menu', 'Menu_Item_Description', 202, 'zh', '紅燒獅子頭'), | |||||
('fb_menu', 'Menu_Item_Description', 203, 'zh', '宮保雞丁配花生米'); | |||||
INSERT INTO i18n (table_name, field_name, record_id, language, value) VALUES | |||||
('fb_menu', 'Menu_Item_Description', 101, 'en', 'Pan-fried Salmon with Seasonal Vegetables'), | |||||
('fb_menu', 'Menu_Item_Description', 102, 'en', 'Black Pepper Steak with Mushroom Sauce'), | |||||
('fb_menu', 'Menu_Item_Description', 103, 'en', 'Thai Green Curry Chicken'), | |||||
('fb_menu', 'Menu_Item_Description', 104, 'en', 'Spaghetti Bolognese with Parmesan Cheese'), | |||||
('fb_menu', 'Menu_Item_Description', 105, 'en', 'Mediterranean Salad'), | |||||
('fb_menu', 'Menu_Item_Description', 201, 'en', 'Steamed Sea Bass with Ginger and Spring Onion'), | |||||
('fb_menu', 'Menu_Item_Description', 202, 'en', 'Braised Lion Head Meatballs'), | |||||
('fb_menu', 'Menu_Item_Description', 203, 'en', 'Kung Pao Chicken with Peanuts'); |
@@ -1,20 +0,0 @@ | |||||
--liquibase formatted sql | |||||
--changeset terence:create-i18n-table | |||||
--comment: Create i18n table | |||||
CREATE TABLE `I18n` ( | |||||
`id` int NOT NULL AUTO_INCREMENT, | |||||
`table_name` varchar(50) NOT NULL, | |||||
`field_name` varchar(50) NOT NULL , | |||||
`record_id` int NOT NULL, | |||||
`language` varchar(10) NOT NULL, | |||||
`value` text NOT NULL, | |||||
`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, | |||||
`modified` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, | |||||
`createdBy` int DEFAULT NULL, | |||||
`modifiedBy` int DEFAULT NULL, | |||||
PRIMARY KEY (`id`), | |||||
UNIQUE KEY `UK_translation` (`table_name`, `field_name`, `record_id`, `language`), | |||||
KEY `IDX_table_field` (`table_name`, `field_name`), | |||||
KEY `IDX_language` (`language`) | |||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; |
@@ -1,31 +0,0 @@ | |||||
--liquibase formatted sql | |||||
--changeset terence:create-i18n-table | |||||
--comment: Create i18n table | |||||
UPDATE fb_outlets SET FB_outlet_district = CASE id | |||||
WHEN 1 THEN 'Admiralty' | |||||
WHEN 2 THEN 'Wan Chai' | |||||
WHEN 3 THEN 'Kwun Tong' | |||||
WHEN 4 THEN 'Kwun Tong' | |||||
END | |||||
WHERE id IN (1,2,3,4); | |||||
UPDATE fb_outlets SET FB_outlet_address = CASE id | |||||
WHEN 1 THEN 'Shop A, No.1-41, G/F, Admiralty Centre, 18 Harcourt Road' | |||||
WHEN 2 THEN 'Shop G11-17 ,G/F, C.c. Wu Building,11-17, 302-308, Hennessy Road' | |||||
WHEN 3 THEN 'Speedy Industrial Building, 2nd Floor, Room B, 114, Kwun Tong Road' | |||||
WHEN 4 THEN 'Shop No. L2-1 Level 2, apm, 418 Kwun Tong Rd' | |||||
END | |||||
WHERE id IN (1,2,3,4); | |||||
INSERT INTO i18n (table_name, field_name, record_id, language, value) VALUES | |||||
('fb_outlets', 'FB_outlet_district', 1, 'zh', '中環'), | |||||
('fb_outlets', 'FB_outlet_district', 2, 'zh', '灣仔'), | |||||
('fb_outlets', 'FB_outlet_district', 3, 'zh', '觀塘'), | |||||
('fb_outlets', 'FB_outlet_district', 4, 'zh', '觀塘'); | |||||
INSERT INTO i18n (table_name, field_name, record_id, language, value) VALUES | |||||
('fb_outlets', 'FB_outlet_address', 1, 'en', 'Shop A, No.1-41, G/F, Admiralty Centre, 18 Harcourt Road'), | |||||
('fb_outlets', 'FB_outlet_address', 2, 'en', 'Shop G11-17 ,G/F, C.c. Wu Building,11-17, 302-308, Hennessy Road'), | |||||
('fb_outlets', 'FB_outlet_address', 3, 'en', 'Speedy Industrial Building, 2nd Floor, Room B, 114, Kwun Tong Road'), | |||||
('fb_outlets', 'FB_outlet_address', 4, 'en', 'Shop No. L2-1 Level 2, apm, 418 Kwun Tong Rd'); |
@@ -1,15 +0,0 @@ | |||||
--liquibase formatted sql | |||||
--changeset terence:create-i18n-table | |||||
--comment: Create i18n table | |||||
INSERT INTO i18n (table_name, field_name, record_id, language, value) VALUES | |||||
('fb_outlets', 'FB_outlet_district', 1, 'en', 'Admiralty'), | |||||
('fb_outlets', 'FB_outlet_district', 2, 'en', 'Wan Chai'), | |||||
('fb_outlets', 'FB_outlet_district', 3, 'en', 'Kwun Tong'), | |||||
('fb_outlets', 'FB_outlet_district', 4, 'en', 'Kwun Tong'); | |||||
INSERT INTO i18n (table_name, field_name, record_id, language, value) VALUES | |||||
('fb_outlets', 'FB_outlet_address', 1, 'zh', '夏愨道18號海富中心地下1-41號A鋪'), | |||||
('fb_outlets', 'FB_outlet_address', 2, 'zh', '灣仔軒尼詩道302-308號皇后大廈地下G11-17號鋪'), | |||||
('fb_outlets', 'FB_outlet_address', 3, 'zh', '觀塘鯉魚門道114號迅達工業大廈2樓B室'), | |||||
('fb_outlets', 'FB_outlet_address', 4, 'zh', '觀塘鯉魚門道418號apm2樓L2-1號鋪'); |
@@ -1,24 +0,0 @@ | |||||
--liquibase formatted sql | |||||
--changeset terence:create-i18n-table | |||||
--comment: Create i18n table | |||||
INSERT INTO i18n (table_name, field_name, record_id, language, value) VALUES | |||||
('fb_outlets', 'FB_outlet_district', 7, 'en', 'Central'), | |||||
('fb_outlets', 'FB_outlet_district', 8, 'en', 'Causeway Bay'), | |||||
('fb_outlets', 'FB_outlet_district', 9, 'en', 'Tsim Sha Tsui'), | |||||
('fb_outlets', 'FB_outlet_district', 10, 'en', 'Sha Tin'), | |||||
('fb_outlets', 'FB_outlet_district', 7, 'zh', '中環'), | |||||
('fb_outlets', 'FB_outlet_district', 8, 'zh', '銅鑼灣'), | |||||
('fb_outlets', 'FB_outlet_district', 9, 'zh', '尖沙咀'), | |||||
('fb_outlets', 'FB_outlet_district', 10, 'zh', '沙田'), | |||||
('fb_outlets', 'FB_outlet_address', 7, 'en', 'Central Financial Street 88, 1st Floor'), | |||||
('fb_outlets', 'FB_outlet_address', 8, 'en', 'Causeway Bay Times Square 2nd Floor'), | |||||
('fb_outlets', 'FB_outlet_address', 9, 'en', 'Tsim Sha Tsui Guangdong Road 30'), | |||||
('fb_outlets', 'FB_outlet_address', 10, 'en', 'Sha Tin New City Plaza 5th Floor'), | |||||
('fb_outlets', 'FB_outlet_address', 7, 'zh', '金融街88號1樓'), | |||||
('fb_outlets', 'FB_outlet_address', 8, 'zh', '時代廣場2樓'), | |||||
('fb_outlets', 'FB_outlet_address', 9, 'zh', '廣東道30號'), | |||||
('fb_outlets', 'FB_outlet_address', 10, 'zh', '新城市廣場52樓'); |
@@ -1,15 +0,0 @@ | |||||
--liquibase formatted sql | |||||
--changeset terence:create-i18n-table | |||||
--comment: Create i18n table | |||||
CREATE TABLE `UserAccessControl` ( | |||||
`UserId` int NOT NULL AUTO_INCREMENT, | |||||
`FunctionId` int NOT NULL, | |||||
`Created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, | |||||
`Modified` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, | |||||
`CreatedBy` int DEFAULT NULL, | |||||
`ModifiedBy` int DEFAULT NULL, | |||||
PRIMARY KEY (`UserId`, `FunctionId`) | |||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; |
@@ -1,63 +0,0 @@ | |||||
--liquibase formatted sql | |||||
--changeset terence:create-i18n-table | |||||
--comment: Create i18n table | |||||
drop table if exists authority; | |||||
CREATE TABLE `authority` ( | |||||
`id` int NOT NULL AUTO_INCREMENT, | |||||
`authority` varchar(100) NOT NULL, | |||||
`name` varchar(255) NOT NULL, | |||||
`module` varchar(100) DEFAULT NULL, | |||||
`description` varchar(500) DEFAULT NULL, | |||||
PRIMARY KEY (`id`), | |||||
UNIQUE KEY `uk_authority` (`authority`) | |||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; | |||||
INSERT INTO authority (id, authority, name, module, description) VALUES | |||||
(1, 'MAINTAIN_USER', 'Maintain User', 'USER_MANAGEMENT', 'Maintain user master data'), | |||||
(2, 'VIEW_USER', 'View User', 'USER_MANAGEMENT', 'View user master data'), | |||||
(3, 'MAINTAIN_GROUP', 'Maintain User Group', 'USER_MANAGEMENT', 'Maintain user group master data'), | |||||
(4, 'VIEW_USER_GROUP', 'View User Group', 'USER_MANAGEMENT', 'View user group master data'), | |||||
(5, 'MAINTAIN_FOOD_MENU', 'Maintain Food Menu', 'FOOD_MANAGEMENT', 'Maintain food and menu data'), | |||||
(6, 'VIEW_FOOD_MENU', 'View Food Menu', 'FOOD_MANAGEMENT', 'View food and menu data'), | |||||
(7, 'MAINTAIN_FOOD_INTAKE', 'Maintain Food Intake', 'FOOD_MANAGEMENT', 'Maintain food intake records'), | |||||
(8, 'VIEW_FOOD_INTAKE', 'View Food Intake', 'FOOD_MANAGEMENT', 'View food intake records'), | |||||
(9, 'MAINTAIN_NUTRITION_STANDARD', 'Maintain Nutrition Standard', 'NUTRITION_MANAGEMENT', 'Maintain nutrition standards'), | |||||
(10, 'VIEW_NUTRITION_STANDARD', 'View Nutrition Standard', 'NUTRITION_MANAGEMENT', 'View nutrition standards'), | |||||
(11, 'MAINTAIN_NUTRITION_ANALYSIS', 'Maintain Nutrition Analysis', 'NUTRITION_MANAGEMENT', 'Maintain nutrition analysis'), | |||||
(12, 'VIEW_NUTRITION_ANALYSIS', 'View Nutrition Analysis', 'NUTRITION_MANAGEMENT', 'View nutrition analysis'), | |||||
(13, 'MAINTAIN_HEALTH_DATA', 'Maintain Health Data', 'HEALTH_MANAGEMENT', 'Maintain health development data'), | |||||
(14, 'VIEW_HEALTH_DATA', 'View Health Data', 'HEALTH_MANAGEMENT', 'View health development data'), | |||||
(15, 'MAINTAIN_ALLERGY_DATA', 'Maintain Allergy Data', 'HEALTH_MANAGEMENT', 'Maintain allergy data'), | |||||
(16, 'VIEW_ALLERGY_DATA', 'View Allergy Data', 'HEALTH_MANAGEMENT', 'View allergy data'), | |||||
(17, 'MAINTAIN_AI_MODEL', 'Maintain AI Model', 'AI_MANAGEMENT', 'Maintain food AI models'), | |||||
(18, 'VIEW_AI_MODEL', 'View AI Model', 'AI_MANAGEMENT', 'View food AI models'), | |||||
(19, 'G_NUTRITION_TREND_REPORT', 'Generate Nutrition Trend Report', 'REPORT_MANAGEMENT', 'Generate nutrition trend analysis reports'), | |||||
(20, 'G_HEALTH_STATISTICS_REPORT', 'Generate Health Statistics Report', 'REPORT_MANAGEMENT', 'Generate health statistics reports'), | |||||
(21, 'G_FOOD_LEFTOVER_REPORT', 'Generate Food Leftover Report', 'REPORT_MANAGEMENT', 'Generate food leftover analysis reports'), | |||||
(22, 'MAINTAIN_FB_OPERATOR', 'Maintain Food Operator', 'FB_MANAGEMENT', 'Maintain F&B operator data'), | |||||
(23, 'VIEW_FB_OPERATOR', 'View Food Operator', 'FB_MANAGEMENT', 'View F&B operator data'), | |||||
(24, 'MAINTAIN_FB_OUTLET', 'Maintain Food Outlet', 'FB_MANAGEMENT', 'Maintain F&B outlet data'), | |||||
(25, 'VIEW_FB_OUTLET', 'View Food Outlet', 'FB_MANAGEMENT', 'View F&B outlet data'), | |||||
(26, 'MAINTAIN_DIETARY_ADVICE', 'Maintain Dietary Advice', 'ADVICE_MANAGEMENT', 'Maintain dietary advice data'), | |||||
(27, 'VIEW_DIETARY_ADVICE', 'View Dietary Advice', 'ADVICE_MANAGEMENT', 'View dietary advice data'), | |||||
(28, 'MAINTAIN_ACCESS_CONTROL', 'Maintain Access Control', 'ACCESS_MANAGEMENT', 'Maintain access control settings'), | |||||
(29, 'VIEW_ACCESS_CONTROL', 'View Access Control', 'ACCESS_MANAGEMENT', 'View access control settings'), | |||||
(30, 'MAINTAIN_ACCESS_DELEGATION', 'Maintain Access Delegation', 'ACCESS_MANAGEMENT', 'Maintain access delegation settings'), | |||||
(31, 'VIEW_ACCESS_DELEGATION', 'View Access Delegation', 'ACCESS_MANAGEMENT', 'View access delegation settings'); |
@@ -1,63 +0,0 @@ | |||||
--liquibase formatted sql | |||||
--changeset terence:create-i18n-table | |||||
--comment: Create i18n table | |||||
drop table if exists authority; | |||||
CREATE TABLE `authority` ( | |||||
`id` int NOT NULL AUTO_INCREMENT, | |||||
`authority` varchar(100) NOT NULL, | |||||
`name` varchar(255) NOT NULL, | |||||
`module` varchar(100) DEFAULT NULL, | |||||
`description` varchar(500) DEFAULT NULL, | |||||
PRIMARY KEY (`id`), | |||||
UNIQUE KEY `uk_authority` (`authority`) | |||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; | |||||
INSERT INTO authority (id, authority, name, module, description) VALUES | |||||
(1, 'MAINTAIN_USER', 'Maintain User', null, null), | |||||
(2, 'VIEW_USER', 'View User', null, null), | |||||
(3, 'MAINTAIN_GROUP', 'Maintain User Group', null, null), | |||||
(4, 'VIEW_USER_GROUP', 'View User Group', null, null), | |||||
(5, 'MAINTAIN_FOOD_MENU', 'Maintain Food Menu' , null, null), | |||||
(6, 'VIEW_FOOD_MENU', 'View Food Menu', null, null), | |||||
(7, 'MAINTAIN_FOOD_INTAKE', 'Maintain Food Intake', null, null), | |||||
(8, 'VIEW_FOOD_INTAKE', 'View Food Intake', null, null), | |||||
(9, 'MAINTAIN_NUTRITION_STANDARD', 'Maintain Nutrition Standard', null, null), | |||||
(10, 'VIEW_NUTRITION_STANDARD', 'View Nutrition Standard', null, null), | |||||
(11, 'MAINTAIN_NUTRITION_ANALYSIS', 'Maintain Nutrition Analysis', null, null), | |||||
(12, 'VIEW_NUTRITION_ANALYSIS', 'View Nutrition Analysis', null, null), | |||||
(13, 'MAINTAIN_HEALTH_DATA', 'Maintain Health Data', null, null), | |||||
(14, 'VIEW_HEALTH_DATA', 'View Health Data', null, null), | |||||
(15, 'MAINTAIN_ALLERGY_DATA', 'Maintain Allergy Data', null, null), | |||||
(16, 'VIEW_ALLERGY_DATA', 'View Allergy Data', null, null), | |||||
(17, 'MAINTAIN_AI_MODEL', 'Maintain AI Model', null, null), | |||||
(18, 'VIEW_AI_MODEL', 'View AI Model', null, null), | |||||
(19, 'G_NUTRITION_TREND_REPORT', 'Generate Nutrition Trend Report', null, null), | |||||
(20, 'G_HEALTH_STATISTICS_REPORT', 'Generate Health Statistics Report', null, null), | |||||
(21, 'G_FOOD_LEFTOVER_REPORT', 'Generate Food Leftover Report', null, null), | |||||
(22, 'MAINTAIN_FB_OPERATOR', 'Maintain Food Operator', null, null), | |||||
(23, 'VIEW_FB_OPERATOR', 'View Food Operator', null, null), | |||||
(24, 'MAINTAIN_FB_OUTLET', 'Maintain Food Outlet', null, null), | |||||
(25, 'VIEW_FB_OUTLET', 'View Food Outlet', null, null), | |||||
(26, 'MAINTAIN_DIETARY_ADVICE', 'Maintain Dietary Advice', null, null), | |||||
(27, 'VIEW_DIETARY_ADVICE', 'View Dietary Advice', null, null), | |||||
(28, 'MAINTAIN_ACCESS_CONTROL', 'Maintain Access Control', null, null), | |||||
(29, 'VIEW_ACCESS_CONTROL', 'View Access Control', null, null), | |||||
(30, 'MAINTAIN_ACCESS_DELEGATION', 'Maintain Access Delegation', null, null), | |||||
(31, 'VIEW_ACCESS_DELEGATION', 'View Access Delegation', null, null); |
@@ -1,67 +0,0 @@ | |||||
--liquibase formatted sql | |||||
--changeset terence:create-i18n-table | |||||
--comment: Insert user authority mapping | |||||
INSERT INTO user_authority (userId, authId) VALUES | |||||
(2, 1), -- MAINTAIN_USER | |||||
(1, 2), -- VIEW_USER | |||||
(1, 3), -- MAINTAIN_GROUP | |||||
(1, 4), -- VIEW_USER_GROUP | |||||
(1, 28), -- MAINTAIN_ACCESS_CONTROL | |||||
(1, 29), -- VIEW_ACCESS_CONTROL | |||||
(1, 30), -- MAINTAIN_ACCESS_DELEGATION | |||||
(1, 31), -- VIEW_ACCESS_DELEGATION | |||||
(1, 17), -- MAINTAIN_AI_MODEL | |||||
(1, 18), -- VIEW_AI_MODEL | |||||
(1, 22), -- MAINTAIN_FB_OPERATOR | |||||
(1, 23), -- VIEW_FB_OPERATOR | |||||
(1, 24), -- MAINTAIN_FB_OUTLET | |||||
(1, 25); -- VIEW_FB_OUTLET | |||||
INSERT INTO user_authority (userId, authId) VALUES | |||||
(2, 2), -- VIEW_USER | |||||
(2, 4), -- VIEW_USER_GROUP | |||||
(2, 29), -- VIEW_ACCESS_CONTROL | |||||
(2, 19), -- G_NUTRITION_TREND_REPORT | |||||
(2, 20), -- G_HEALTH_STATISTICS_REPORT | |||||
(2, 21), -- G_FOOD_LEFTOVER_REPORT | |||||
(2, 6), -- VIEW_FOOD_MENU | |||||
(2, 23), -- VIEW_FB_OPERATOR | |||||
(2, 25); -- VIEW_FB_OUTLET | |||||
INSERT INTO user_authority (userId, authId) VALUES | |||||
(9, 7), -- MAINTAIN_FOOD_INTAKE | |||||
(9, 8), -- VIEW_FOOD_INTAKE | |||||
(9, 13), -- MAINTAIN_HEALTH_DATA | |||||
(9, 14), -- VIEW_HEALTH_DATA | |||||
(9, 15), -- MAINTAIN_ALLERGY_DATA | |||||
(9, 16), -- VIEW_ALLERGY_DATA | |||||
(9, 6), -- VIEW_FOOD_MENU | |||||
(9, 10), -- VIEW_NUTRITION_STANDARD | |||||
(9, 12), -- VIEW_NUTRITION_ANALYSIS | |||||
(9, 27); -- VIEW_DIETARY_ADVICE | |||||
INSERT INTO user_authority (userId, authId) VALUES | |||||
(8, 11), -- MAINTAIN_NUTRITION_ANALYSIS | |||||
(8, 12), -- VIEW_NUTRITION_ANALYSIS | |||||
(8, 26), -- MAINTAIN_DIETARY_ADVICE | |||||
(8, 27), -- VIEW_DIETARY_ADVICE | |||||
(8, 14), -- VIEW_HEALTH_DATA | |||||
(8, 16), -- VIEW_ALLERGY_DATA | |||||
(8, 8), -- VIEW_FOOD_INTAKE | |||||
(8, 19), -- G_NUTRITION_TREND_REPORT | |||||
(8, 20); -- G_HEALTH_STATISTICS_REPORT |
@@ -1,12 +0,0 @@ | |||||
--liquibase formatted sql | |||||
--changeset terence:create-i18n-table | |||||
--comment: Create i18n table | |||||
INSERT INTO authority (id, authority, name, module, description) VALUES | |||||
(32, 'MAINTAIN_MENU_ITEM', 'Maintain Menu Item', null, null), | |||||
(33, 'VIEW_MENU_ITEM', 'View Menu Item', null, null), | |||||
(34, 'MAINTAIN_INGREDIENT', 'Maintain Ingredient', null, null), | |||||
(35, 'VIEW_INGREDIENT', 'View Ingredient', null, null), | |||||
(36, 'MAINTAIN_MENU_OUTLET', 'Maintain Menu Outlet', null, null), | |||||
(37, 'VIEW_MENU_OUTLET', 'View Menu Outlet', null, null); |
@@ -1,61 +0,0 @@ | |||||
--liquibase formatted sql | |||||
--changeset terence:62-insert-fb-permissions | |||||
--comment: Insert F&B related permissions and user authorities | |||||
INSERT INTO authority (id, authority, name, module, description) | |||||
SELECT 38, 'MAINTAIN_FB_OPERATOR', 'Maintain F&B Operator', 'F&B', 'Permission to maintain F&B operator information' | |||||
WHERE NOT EXISTS (SELECT 1 FROM authority WHERE authority = 'MAINTAIN_FB_OPERATOR'); | |||||
INSERT INTO authority (id, authority, name, module, description) | |||||
SELECT 39, 'VIEW_FB_OPERATOR', 'View F&B Operator', 'F&B', 'Permission to view F&B operator information' | |||||
WHERE NOT EXISTS (SELECT 1 FROM authority WHERE authority = 'VIEW_FB_OPERATOR'); | |||||
INSERT INTO authority (id, authority, name, module, description) | |||||
SELECT 40, 'MAINTAIN_FB_OUTLET', 'Maintain F&B Outlet', 'F&B', 'Permission to maintain F&B outlet information' | |||||
WHERE NOT EXISTS (SELECT 1 FROM authority WHERE authority = 'MAINTAIN_FB_OUTLET'); | |||||
INSERT INTO authority (id, authority, name, module, description) | |||||
SELECT 41, 'VIEW_FB_OUTLET', 'View F&B Outlet', 'F&B', 'Permission to view F&B outlet information' | |||||
WHERE NOT EXISTS (SELECT 1 FROM authority WHERE authority = 'VIEW_FB_OUTLET'); | |||||
INSERT INTO authority (id, authority, name, module, description) | |||||
SELECT 42, 'MAINTAIN_MENU_OUTLET', 'Maintain Menu Outlet', 'F&B', 'Permission to maintain menu-outlet relationship' | |||||
WHERE NOT EXISTS (SELECT 1 FROM authority WHERE authority = 'MAINTAIN_MENU_OUTLET'); | |||||
INSERT INTO authority (id, authority, name, module, description) | |||||
SELECT 43, 'VIEW_MENU_OUTLET', 'View Menu Outlet', 'F&B', 'Permission to view menu-outlet relationship' | |||||
WHERE NOT EXISTS (SELECT 1 FROM authority WHERE authority = 'VIEW_MENU_OUTLET'); | |||||
INSERT INTO user_authority (userId, authId) | |||||
SELECT 6, 38 | |||||
WHERE NOT EXISTS (SELECT 1 FROM user_authority WHERE userId = 6 AND authId = 38); | |||||
INSERT INTO user_authority (userId, authId) | |||||
SELECT 6, 39 | |||||
WHERE NOT EXISTS (SELECT 1 FROM user_authority WHERE userId = 6 AND authId = 39); | |||||
INSERT INTO user_authority (userId, authId) | |||||
SELECT 6, 40 | |||||
WHERE NOT EXISTS (SELECT 1 FROM user_authority WHERE userId = 6 AND authId = 40); | |||||
INSERT INTO user_authority (userId, authId) | |||||
SELECT 6, 41 | |||||
WHERE NOT EXISTS (SELECT 1 FROM user_authority WHERE userId = 6 AND authId = 41); | |||||
INSERT INTO user_authority (userId, authId) | |||||
SELECT 6, 42 | |||||
WHERE NOT EXISTS (SELECT 1 FROM user_authority WHERE userId = 6 AND authId = 42); | |||||
INSERT INTO user_authority (userId, authId) | |||||
SELECT 6, 43 | |||||
WHERE NOT EXISTS (SELECT 1 FROM user_authority WHERE userId = 6 AND authId = 43); | |||||
INSERT INTO user_authority (userId, authId) | |||||
SELECT 6, 32 | |||||
WHERE NOT EXISTS (SELECT 1 FROM user_authority WHERE userId = 6 AND authId = 32); | |||||
INSERT INTO user_authority (userId, authId) | |||||
SELECT 6, 33 | |||||
WHERE NOT EXISTS (SELECT 1 FROM user_authority WHERE userId = 6 AND authId = 33); |
@@ -1,25 +0,0 @@ | |||||
--liquibase formatted sql | |||||
--changeset terence:62-insert-fb-permissions | |||||
--comment: Insert F&B related permissions and user authorities | |||||
INSERT IGNORE INTO authority (id, authority, name, module, description) | |||||
VALUES | |||||
(38, 'MAINTAIN_FB_OPERATOR', 'Maintain F&B Operator', 'F&B', 'Permission to maintain F&B operator information'), | |||||
(39, 'VIEW_FB_OPERATOR', 'View F&B Operator', 'F&B', 'Permission to view F&B operator information'), | |||||
(40, 'MAINTAIN_FB_OUTLET', 'Maintain F&B Outlet', 'F&B', 'Permission to maintain F&B outlet information'), | |||||
(41, 'VIEW_FB_OUTLET', 'View F&B Outlet', 'F&B', 'Permission to view F&B outlet information'), | |||||
(42, 'MAINTAIN_MENU_OUTLET', 'Maintain Menu Outlet', 'F&B', 'Permission to maintain menu-outlet relationship'), | |||||
(43, 'VIEW_MENU_OUTLET', 'View Menu Outlet', 'F&B', 'Permission to view menu-outlet relationship'); | |||||
INSERT IGNORE INTO user_authority (userId, authId) | |||||
VALUES | |||||
(6, 38), | |||||
(6, 39), | |||||
(6, 40), | |||||
(6, 41), | |||||
(6, 42), | |||||
(6, 43), | |||||
(6, 32), | |||||
(6, 33); |
@@ -1,66 +0,0 @@ | |||||
--liquibase formatted sql | |||||
--changeset terence:62-insert-fb-permissions | |||||
--comment: Insert F&B related permissions and user authorities | |||||
drop table if exists authority; | |||||
CREATE TABLE `authority` ( | |||||
`id` int NOT NULL AUTO_INCREMENT, | |||||
`authority` varchar(100) NOT NULL, | |||||
`name` varchar(255) NOT NULL, | |||||
`module` varchar(100) DEFAULT NULL, | |||||
`description` varchar(500) DEFAULT NULL, | |||||
PRIMARY KEY (`id`), | |||||
UNIQUE KEY `uk_authority` (`authority`) | |||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; | |||||
INSERT INTO authority (id, authority, name, module, description) VALUES | |||||
(1, 'MAINTAIN_USER', 'Maintain User', null, null), | |||||
(2, 'VIEW_USER', 'View User', null, null), | |||||
(3, 'MAINTAIN_GROUP', 'Maintain User Group', null, null), | |||||
(4, 'VIEW_USER_GROUP', 'View User Group', null, null), | |||||
(5, 'MAINTAIN_FOOD_MENU', 'Maintain Food Menu' , null, null), | |||||
(6, 'VIEW_FOOD_MENU', 'View Food Menu', null, null), | |||||
(7, 'MAINTAIN_FOOD_INTAKE', 'Maintain Food Intake', null, null), | |||||
(8, 'VIEW_FOOD_INTAKE', 'View Food Intake', null, null), | |||||
(9, 'MAINTAIN_NUTRITION_STANDARD', 'Maintain Nutrition Standard', null, null), | |||||
(10, 'VIEW_NUTRITION_STANDARD', 'View Nutrition Standard', null, null), | |||||
(11, 'MAINTAIN_NUTRITION_ANALYSIS', 'Maintain Nutrition Analysis', null, null), | |||||
(12, 'VIEW_NUTRITION_ANALYSIS', 'View Nutrition Analysis', null, null), | |||||
(13, 'MAINTAIN_HEALTH_DATA', 'Maintain Health Data', null, null), | |||||
(14, 'VIEW_HEALTH_DATA', 'View Health Data', null, null), | |||||
(15, 'MAINTAIN_ALLERGY_DATA', 'Maintain Allergy Data', null, null), | |||||
(16, 'VIEW_ALLERGY_DATA', 'View Allergy Data', null, null), | |||||
(17, 'MAINTAIN_AI_MODEL', 'Maintain AI Model', null, null), | |||||
(18, 'VIEW_AI_MODEL', 'View AI Model', null, null), | |||||
(19, 'G_NUTRITION_TREND_REPORT', 'Generate Nutrition Trend Report', null, null), | |||||
(20, 'G_HEALTH_STATISTICS_REPORT', 'Generate Health Statistics Report', null, null), | |||||
(21, 'G_FOOD_LEFTOVER_REPORT', 'Generate Food Leftover Report', null, null), | |||||
(22, 'MAINTAIN_FB_OPERATOR', 'Maintain Food Operator', null, null), | |||||
(23, 'VIEW_FB_OPERATOR', 'View Food Operator', null, null), | |||||
(24, 'MAINTAIN_FB_OUTLET', 'Maintain Food Outlet', null, null), | |||||
(25, 'VIEW_FB_OUTLET', 'View Food Outlet', null, null), | |||||
(26, 'MAINTAIN_DIETARY_ADVICE', 'Maintain Dietary Advice', null, null), | |||||
(27, 'VIEW_DIETARY_ADVICE', 'View Dietary Advice', null, null), | |||||
(28, 'MAINTAIN_ACCESS_CONTROL', 'Maintain Access Control', null, null), | |||||
(29, 'VIEW_ACCESS_CONTROL', 'View Access Control', null, null), | |||||
(30, 'MAINTAIN_ACCESS_DELEGATION', 'Maintain Access Delegation', null, null), | |||||
(31, 'VIEW_ACCESS_DELEGATION', 'View Access Delegation', null, null); | |||||