Skip to content

Commit e372119

Browse files
authored
the service publish related tables (#29)
1 parent 1f909fc commit e372119

File tree

1 file changed

+43
-1
lines changed

1 file changed

+43
-1
lines changed

wedpr-adm/db/wedpr_ddl.sql

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,4 +320,46 @@ create table if not exists `wedpr_api_credential_table`(
320320
index access_key_id_index(`access_key_id`(128)),
321321
index owner_index(`owner`(128)),
322322
index status_index(`status`(128))
323-
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC;
323+
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC;
324+
325+
-- the service publish related tables
326+
create table if not exists wedpr_published_service(
327+
`service_id` varchar(64) not null comment "发布的服务ID",
328+
`service_name` varchar(1024) not null comment "服务名称",
329+
`service_desc` text default null comment "服务描述",
330+
`service_type` varchar(1024) not null comment "发布的服务类型, 如pir/lr/xgb",
331+
`service_config` longtext comment "服务配置",
332+
`owner` varchar(255) not null comment "属主",
333+
`agency` varchar(255) not null comment "所属机构",
334+
`create_time` DATETIME DEFAULT CURRENT_TIMESTAMP comment "创建时间",
335+
`last_update_time` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP comment "更新时间",
336+
primary key (`service_id`),
337+
index service_name_index(`service_name`(128)),
338+
index service_type_index(`service_type`(128)),
339+
index owner_index(`owner`(128)),
340+
index agency_index(`agency`(128))
341+
)ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC;
342+
343+
create table if not exists wedpr_service_auth_table(
344+
`id` varchar(64) not null comment "ID",
345+
`service_id` varchar(64) not null comment "服务ID",
346+
`access_key_id` varchar(255) not null comment "访问ID(用于标志用户)",
347+
`expire_time` DATETIME not null comment "过期时间",
348+
`apply_time` DATETIME DEFAULT CURRENT_TIMESTAMP comment "申请时间",
349+
`last_update_time` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP comment "更新时间",
350+
primary key (`id`),
351+
index service_id_index(`service_id`(128)),
352+
index access_key_id_index(`access_key_id`(128))
353+
)ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC;
354+
355+
create table if not exists wedpr_service_invoke_table(
356+
`invoke_id` varchar(64) not null comment "调用ID",
357+
`service_id` varchar(64) not null comment "调用的服务ID",
358+
`invoke_user` varchar(1024) not null comment "调用者",
359+
`invoke_agency` varchar(1024) not null comment "调用方所属机构",
360+
`invoke_time` DATETIME DEFAULT CURRENT_TIMESTAMP comment "调用时间",
361+
`last_update_time` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP comment "更新时间",
362+
primary key (`invoke_id`),
363+
index service_id_index(`service_id`),
364+
index invoker_index(`invoke_agency`(64), `invoke_user`(64))
365+
)ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC;

0 commit comments

Comments
 (0)