t_category

 1 /*
 2 Navicat MySQL Data Transfer
 3 
 4 Source Server         : 1.132(杭平,MySQL)
 5 Source Server Version : 50610
 6 Source Host           : 192.168.1.132:3306
 7 Source Database       : db_rule_comparison
 8 
 9 Target Server Type    : MYSQL
10 Target Server Version : 50610
11 File Encoding         : 65001
12 
13 Date: 2013-07-06 11:04:19
14 */
15 
16 SET FOREIGN_KEY_CHECKS=0;
17 
18 -- ----------------------------
19 -- Table structure for `t_category`
20 -- ----------------------------
21 DROP TABLE IF EXISTS `t_category`;
22 CREATE TABLE `t_category` (
23   `id` int(11) NOT NULL AUTO_INCREMENT,
24   `parentId` int(11) DEFAULT NULL COMMENT '父ID',
25   `categoryId` int(11) DEFAULT NULL,
26   `number` varchar(50) DEFAULT NULL,
27   `name` varchar(50) DEFAULT NULL,
28   `description` varchar(2000) DEFAULT NULL,
29   `value` varchar(2000) DEFAULT NULL,
30   `status` varchar(50) DEFAULT NULL COMMENT '状态: 0 - Normal(正常)
1 - 。。。。',
31   `insertedDatetime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
32   `insertUserId` int(11) DEFAULT NULL,
33   `checkedDatetime` datetime DEFAULT NULL,
34   `checkerId` int(11) DEFAULT NULL,
35   `comment` varchar(2000) DEFAULT NULL COMMENT '备注',
36   PRIMARY KEY (`id`)
37 ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='类别表

可以存储 用户、职员、部门、卡口、设备等简单信息

一样都只有一层,如果多层树状,考虑单独表';
38 
39 -- ----------------------------
40 -- Records of t_category
41 -- ----------------------------
42 INSERT INTO `t_category` VALUES ('1', '0', '1', '001', 'test', '测试', 'something', '0', '2013-07-06 11:07:55', null, null, null, '这是一个分类');
原文地址:https://www.cnblogs.com/livon/p/3174910.html