From 3ebc466631646968762121c5fbe98370dbd3e2b5 Mon Sep 17 00:00:00 2001 From: Rahul Moundekar Date: Mon, 6 Apr 2020 12:18:07 +0530 Subject: [PATCH] Create README.md --- README.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..ca46eca --- /dev/null +++ b/README.md @@ -0,0 +1,27 @@ +# spring-boot-data-one-to-many +spring-boot-data-one-to-many with swagger implementation + +Database SQL : + + DROP TABLE IF EXISTS `springboot`.`employee`; + CREATE TABLE `springboot`.`employee` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `first_name` varchar(45) NOT NULL, + `last_name` varchar(45) NOT NULL, + `email` varchar(45) NOT NULL, + `salary` double NOT NULL, + PRIMARY KEY (`id`) + ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1; + + DROP TABLE IF EXISTS `springboot`.`account`; + CREATE TABLE `springboot`.`account` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `account_number` varchar(45) NOT NULL, + `employee_id` int(10) unsigned NOT NULL, + PRIMARY KEY (`id`), + KEY `FK_account_1` (`employee_id`), + CONSTRAINT `FK_account_1` FOREIGN KEY (`employee_id`) REFERENCES `employee` (`id`) ON DELETE CASCADE ON UPDATE CASCADE + ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1; + + +Swagger : run : http://localhost:8080/swagger-ui.html