CREATETABLE`user`(`user_id`bigint(18)NOTNULL,`user_name`varchar(40)CHARACTERSETutf8COLLATEutf8_binDEFAULTNULL,`design_date`datetimeDEFAULTNULL,`role_id`bigint(18)DEFAULTN...
CREATE TABLE `user` (
`user_id` bigint(18) NOT NULL,
`user_name` varchar(40) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
`design_date` datetime DEFAULT NULL,
`role_id` bigint(18) DEFAULT NULL,
`user_password` varchar(40) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
`user_tel` varchar(20) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
`office_id` bigint(18) DEFAULT NULL,
`branch_id` bigint(18) DEFAULT NULL,
`station_id` bigint(18) DEFAULT NULL,
PRIMARY KEY (`user_id`),
KEY `r_3` (`role_id`) USING BTREE,
KEY `r_41` (`office_id`) USING BTREE,
KEY `r_42` (`branch_id`) USING BTREE,
KEY `r_43` (`station_id`) USING BTREE,
CONSTRAINT `user_ibfk_1` FOREIGN KEY (`role_id`) REFERENCES `user_role` (`role_id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT `user_ibfk_2` FOREIGN KEY (`office_id`) REFERENCES `office` (`office_id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT `user_ibfk_3` FOREIGN KEY (`branch_id`) REFERENCES `branch` (`branch_id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT `user_ibfk_4` FOREIGN KEY (`station_id`) REFERENCES `station` (`station_id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
展开