57 lines
3.2 KiB
MySQL
57 lines
3.2 KiB
MySQL
|
CREATE TABLE `tb_device`
|
||
|
(
|
||
|
`id` bigint NOT NULL AUTO_INCREMENT,
|
||
|
`name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '名称',
|
||
|
`description` varchar(4096) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '描述',
|
||
|
`type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '类型',
|
||
|
`dept_id` bigint DEFAULT NULL COMMENT '所属部门',
|
||
|
`del_flag` int DEFAULT '0' COMMENT '是否删除',
|
||
|
`creator` bigint DEFAULT NULL COMMENT '创建人',
|
||
|
`create_date` datetime DEFAULT NULL COMMENT '创建时间',
|
||
|
`updater` bigint DEFAULT NULL COMMENT '修改人',
|
||
|
`update_date` datetime DEFAULT NULL COMMENT '修改时间',
|
||
|
PRIMARY KEY (`id`) USING BTREE
|
||
|
) ENGINE = InnoDB
|
||
|
AUTO_INCREMENT = 100
|
||
|
DEFAULT CHARSET = utf8mb4
|
||
|
COLLATE = utf8mb4_general_ci
|
||
|
ROW_FORMAT = DYNAMIC COMMENT ='设备表';
|
||
|
|
||
|
CREATE TABLE `tb_device_attr`
|
||
|
(
|
||
|
`id` bigint NOT NULL AUTO_INCREMENT,
|
||
|
`device_id` bigint DEFAULT NULL COMMENT '设备id',
|
||
|
`attr_type` varchar(255) DEFAULT NULL COMMENT '属性类型',
|
||
|
`attr_value` varchar(4096) DEFAULT NULL COMMENT '属性值',
|
||
|
`del_flag` int DEFAULT '0' COMMENT '是否删除',
|
||
|
PRIMARY KEY (`id`) USING BTREE
|
||
|
) ENGINE = InnoDB
|
||
|
AUTO_INCREMENT = 100
|
||
|
DEFAULT CHARSET = utf8mb4
|
||
|
COLLATE = utf8mb4_general_ci
|
||
|
ROW_FORMAT = DYNAMIC COMMENT ='设备属性表';
|
||
|
|
||
|
CREATE TABLE `tb_device_apply`
|
||
|
(
|
||
|
`id` bigint NOT NULL AUTO_INCREMENT,
|
||
|
`device_id` bigint DEFAULT NULL COMMENT '设备id',
|
||
|
`name` varchar(255) DEFAULT NULL COMMENT '申请人',
|
||
|
`phone` varchar(255) DEFAULT NULL COMMENT '联系电话',
|
||
|
`dept` varchar(255) DEFAULT NULL COMMENT '申请人部门',
|
||
|
`title` varchar(255) DEFAULT NULL COMMENT '申请标题',
|
||
|
`application_system` varchar(255) DEFAULT NULL COMMENT '应用系统',
|
||
|
`application_area` varchar(255) DEFAULT NULL COMMENT '应用领域',
|
||
|
`demand` varchar(4096) DEFAULT NULL COMMENT '需求依据',
|
||
|
`creator` bigint DEFAULT NULL COMMENT '创建者',
|
||
|
`creat_date` datetime DEFAULT NULL COMMENT '创建时间',
|
||
|
`state` int DEFAULT '0' COMMENT '审核状态',
|
||
|
`audit_viem` varchar(255) DEFAULT NULL COMMENT '审核意见',
|
||
|
`auditor` bigint DEFAULT NULL COMMENT '审核者',
|
||
|
`audit_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '审核时间',
|
||
|
`del_flag` int DEFAULT '0' COMMENT '是否删除',
|
||
|
PRIMARY KEY (`id`) USING BTREE
|
||
|
) ENGINE = InnoDB
|
||
|
AUTO_INCREMENT = 100
|
||
|
DEFAULT CHARSET = utf8mb4
|
||
|
COLLATE = utf8mb4_general_ci
|
||
|
ROW_FORMAT = DYNAMIC COMMENT ='设备申请表';
|