You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 rivejä
763 B

3 vuotta sitten
3 vuotta sitten
3 vuotta sitten
  1. -- use DeliveryTakingSystem;
  2. CREATE TABLE `user` (
  3. `id` int(11) NOT NULL AUTO_INCREMENT,
  4. `username` varchar(20) DEFAULT NULL,
  5. `password` varchar(20) DEFAULT NULL,
  6. `phone` varchar(20) DEFAULT NULL,
  7. PRIMARY KEY (`id`)
  8. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  9. CREATE TABLE `order` (
  10. `id` int(11) NOT NULL AUTO_INCREMENT,
  11. `description` text,
  12. `when` datetime DEFAULT NULL,
  13. `location` text,
  14. `senderId` int(11) DEFAULT NULL,
  15. `receiverId` int(11) DEFAULT NULL,
  16. `price` int(11) DEFAULT NULL,
  17. `status` varchar(20) DEFAULT NULL,
  18. `comment` text,
  19. `timestamp` datetime DEFAULT NULL,
  20. PRIMARY KEY (`id`),
  21. KEY `fk_senderId` (`senderId`),
  22. CONSTRAINT `fk_senderId` FOREIGN KEY (`senderId`) REFERENCES `user` (`id`)
  23. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;