动态树
父子关系
自身递归
静态树
DROP TABLE IF EXISTS `division`;
CREATE TABLE `division` (
`ID` varchar(36) NOT NULL,
`NAME` varchar(50) DEFAULT NULL,
`CODE` varchar(50) DEFAULT NULL,
`SHORT_NAME` varchar(50) DEFAULT NULL,
`PinYinFull` varchar(50) DEFAULT NULL,
`PinYinFirst` varchar(50) DEFAULT NULL,
`PID` varchar(36) DEFAULT NULL,
`LAYER` int(11) DEFAULT NULL,
`REMARKS` varchar(1000) DEFAULT NULL,
`VALID_FLAG` int(11) DEFAULT NULL,
`VALID_DATE_FROM` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
`VALID_DATE_TO` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
`DISPORDER` int(11) DEFAULT NULL,
`POPEDOM_FLAG` int(11) DEFAULT NULL,
`EDIT_FLAG` int(11) DEFAULT NULL,
`DELETE_FLAG` int(11) DEFAULT NULL,
`CREATE_TIME` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
`CREATE_USER_ID` varchar(36) DEFAULT NULL,
`MODIFY_TIME` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
`MODIFY_USER_ID` varchar(36) DEFAULT NULL,
PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `storage_location`;
CREATE TABLE `storage_location` (
`ID` varchar(36) NOT NULL,
`NAME` varchar(50) DEFAULT NULL,
`CODE` varchar(50) DEFAULT NULL,
`CATEGORY` varchar(50) DEFAULT NULL,
`AREA` varchar(50) DEFAULT NULL,
`STORAGE_ID` varchar(36) DEFAULT NULL,
`DIRECTOR_ID` varchar(36) DEFAULT NULL,
`FILES` varchar(1000) DEFAULT NULL,
`REMARKS` varchar(1000) DEFAULT NULL,
`VALID_FLAG` int(11) DEFAULT NULL,
`VALID_DATE_FROM` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
`VALID_DATE_TO` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
`DISPORDER` int(11) DEFAULT NULL,
`POPEDOM_FLAG` int(11) DEFAULT NULL,
`EDIT_FLAG` int(11) DEFAULT NULL,
`DELETE_FLAG` int(11) DEFAULT NULL,
`CREATE_TIME` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
`CREATE_USER_ID` varchar(36) DEFAULT NULL,
`MODIFY_TIME` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
`MODIFY_USER_ID` varchar(36) DEFAULT NULL,
PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;