mybricks-material
v0.2.45
Published
mybricks 物料中心
Downloads
340
Readme
material-saas
物料中心 saas demo
依赖数据库
-- 物料表
CREATE TABLE `material_info` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '物料记录id',
`type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '组件库/组件类型',
`scope_status` int DEFAULT '0' COMMENT '物料露出状态,-1-私有,0-workspace公开,1-全局公开',
`namespace` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '组件唯一标识',
`version` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '1.0.0' COMMENT '版本号',
`creator_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '创建人id',
`creator_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '创建人名',
`create_time` bigint NOT NULL COMMENT '创建时间',
`update_time` bigint NOT NULL COMMENT '更新时间',
`updator_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '更新人id',
`updator_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '更新人名称',
`icon` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '物料图标',
`preview_img` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '物料预览图',
`title` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '物料名称',
`description` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '' COMMENT '描述',
`status` int DEFAULT '1' COMMENT '状态,-1-删除,0-禁用,1-正常',
`meta` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '物料额外信息',
PRIMARY KEY (`id`),
KEY `idx_namespace` (`namespace`),
KEY `idx_type` (`type`),
KEY `idx_creator_info` (`creator_id`,`creator_name`)
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='物料表';
-- 物料发布内容表
CREATE TABLE `material_pub_info` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '主键id',
`material_id` bigint unsigned NOT NULL DEFAULT '0' COMMENT '文件id',
`version` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '1.0.0' COMMENT '版本号',
`content` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '文件内容',
`creator_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '创建者id',
`creator_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '创建者名称',
`create_time` bigint NOT NULL COMMENT '创建时间',
`commit_info` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '发布日志',
`update_time` bigint NOT NULL COMMENT '更新时间',
`updator_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '更新人id',
`updator_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '更新人名称',
`status` int DEFAULT 1 COMMENT '状态,-1-删除,0-禁用,1-正常',
PRIMARY KEY (`id`),
KEY `idx_creator_info` (`creator_id`,`creator_name`),
KEY `idx_material_id` (`material_id`),
FULLTEXT KEY `idx_content` (`content`)
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='物料发布表';