添加仓库拥有者字段,同步更新接口
This commit is contained in:
parent
e7c8c43ab8
commit
a033df5e73
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="RunConfigurationProducerService">
|
||||||
|
<option name="ignoredProducers">
|
||||||
|
<set>
|
||||||
|
<option value="com.android.tools.idea.compose.preview.runconfiguration.ComposePreviewRunConfigurationProducer" />
|
||||||
|
</set>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
|
|
@ -290,14 +290,14 @@ public class UserController {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 判断是否安装该bot
|
* 判断是否安装该bot
|
||||||
* @param userId
|
* @param repoOwner
|
||||||
* @param botId
|
* @param botId
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("/judgeIsIntallBot")
|
@GetMapping("/judgeIsIntallBot")
|
||||||
public Result<?> judgeIsInstallBot(@RequestParam("user_id") Integer userId,@RequestParam("bot_id") Integer botId){
|
public Result<?> judgeIsInstallBot(@RequestParam("repo_owner") String repoOwner,@RequestParam("bot_id") Integer botId){
|
||||||
|
|
||||||
Boolean b = userService.judgeIsInstallBot(userId,botId);
|
Boolean b = userService.judgeIsInstallBot(repoOwner,botId);
|
||||||
Result<Boolean> result = new Result<>();
|
Result<Boolean> result = new Result<>();
|
||||||
return result.build(b).build(200).build("success!");
|
return result.build(b).build(200).build("success!");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,9 @@ public class InstallBot {
|
||||||
//添加webhookId
|
//添加webhookId
|
||||||
private Integer webhookId;
|
private Integer webhookId;
|
||||||
|
|
||||||
|
//仓库拥有者login(组织/个人)
|
||||||
|
private String repoOwner;
|
||||||
|
|
||||||
@TableField(fill = FieldFill.INSERT)
|
@TableField(fill = FieldFill.INSERT)
|
||||||
private Date createTime;
|
private Date createTime;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ public interface IUserService {
|
||||||
//拒绝接收转让Bot
|
//拒绝接收转让Bot
|
||||||
void refuseTransferBot(RefuseTransferBotRequest refuseTransferBotRequest) throws BotException;
|
void refuseTransferBot(RefuseTransferBotRequest refuseTransferBotRequest) throws BotException;
|
||||||
//判断是否安装过此bot
|
//判断是否安装过此bot
|
||||||
boolean judgeIsInstallBot(Integer userId,Integer botId);
|
boolean judgeIsInstallBot(String repoOwner,Integer botId);
|
||||||
|
|
||||||
GetAllInstallBotsResponse getAllInstallBots(Integer userId);
|
GetAllInstallBotsResponse getAllInstallBots(Integer userId);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -229,7 +229,7 @@ public class UserService extends AbstractUserBot implements IUserService {
|
||||||
try {
|
try {
|
||||||
if (!Objects.isNull(installBotList)) {
|
if (!Objects.isNull(installBotList)) {
|
||||||
for (InstallBot installBot : installBotList) {
|
for (InstallBot installBot : installBotList) {
|
||||||
Object[] objects = new Object[]{installBot.getInstallerLogin(), installBot.getStoreRepo()};
|
Object[] objects = new Object[]{installBot.getRepoOwner(), installBot.getStoreRepo()};
|
||||||
Response response = api.updateWebhook(installBot.getInstallerId(), objects,installBot.getWebhookId(), webhook);
|
Response response = api.updateWebhook(installBot.getInstallerId(), objects,installBot.getWebhookId(), webhook);
|
||||||
|
|
||||||
//校验异常
|
//校验异常
|
||||||
|
|
@ -482,7 +482,7 @@ public class UserService extends AbstractUserBot implements IUserService {
|
||||||
for (InstallBot installBot : installBots) {
|
for (InstallBot installBot : installBots) {
|
||||||
|
|
||||||
//构造接口参数
|
//构造接口参数
|
||||||
Object[] objects = new Object[]{installBot.getInstallerLogin(), installBot.getStoreRepo()};
|
Object[] objects = new Object[]{installBot.getRepoOwner(), installBot.getStoreRepo()};
|
||||||
|
|
||||||
//调用平台api,删除所有相关webhook
|
//调用平台api,删除所有相关webhook
|
||||||
Response response = api.deleteWebhook(installBot.getInstallerId(),objects,installBot.getWebhookId());
|
Response response = api.deleteWebhook(installBot.getInstallerId(),objects,installBot.getWebhookId());
|
||||||
|
|
@ -645,9 +645,9 @@ public class UserService extends AbstractUserBot implements IUserService {
|
||||||
//1.校验有没有安装过此Bot
|
//1.校验有没有安装过此Bot
|
||||||
List<InstallBot> installBots = installMapper.selectList(Wrappers.<InstallBot>lambdaQuery()
|
List<InstallBot> installBots = installMapper.selectList(Wrappers.<InstallBot>lambdaQuery()
|
||||||
.eq(InstallBot::getBotId,installMarketBotRequest.getBotId())
|
.eq(InstallBot::getBotId,installMarketBotRequest.getBotId())
|
||||||
.eq(InstallBot::getInstallerId,installMarketBotRequest.getUserId()));
|
.in(InstallBot::getRepoOwner,installMarketBotRequest.getStoreList()));
|
||||||
if (installBots.size()>0){
|
if (installBots.size()>0){
|
||||||
throw new BotException("已经安装过此Bot!");
|
throw new BotException("存在仓库已经安装过此Bot!");
|
||||||
}
|
}
|
||||||
//1.插入到installBot表中
|
//1.插入到installBot表中
|
||||||
List<Integer> storeList = installMarketBotRequest.getStoreList();
|
List<Integer> storeList = installMarketBotRequest.getStoreList();
|
||||||
|
|
@ -668,7 +668,7 @@ public class UserService extends AbstractUserBot implements IUserService {
|
||||||
installMapper.insert(installBot);
|
installMapper.insert(installBot);
|
||||||
|
|
||||||
//先获取webhookId构造webhook
|
//先获取webhookId构造webhook
|
||||||
Object[] objects = new Object[]{installMarketBotRequest.getLogin(), installBot.getStoreRepo()};
|
Object[] objects = new Object[]{installBot.getRepoOwner(), installBot.getStoreRepo()};
|
||||||
Response response = api.addWebhook(installMarketBotRequest.getUserId(), objects, webhook);
|
Response response = api.addWebhook(installMarketBotRequest.getUserId(), objects, webhook);
|
||||||
|
|
||||||
checkException(response);
|
checkException(response);
|
||||||
|
|
@ -710,7 +710,7 @@ public class UserService extends AbstractUserBot implements IUserService {
|
||||||
// 检查该仓库安装的bot
|
// 检查该仓库安装的bot
|
||||||
List<InstallBot> installBots = installMapper.selectList(Wrappers.<InstallBot>lambdaQuery()
|
List<InstallBot> installBots = installMapper.selectList(Wrappers.<InstallBot>lambdaQuery()
|
||||||
.eq(InstallBot::getStoreId,unInstallMarketBotRequest.getStoreId())
|
.eq(InstallBot::getStoreId,unInstallMarketBotRequest.getStoreId())
|
||||||
.eq(InstallBot::getInstallerId,unInstallMarketBotRequest.getUserId()));
|
.eq(InstallBot::getStoreRepo,unInstallMarketBotRequest.getStoreIdentifier()));
|
||||||
// 如果安装了bot
|
// 如果安装了bot
|
||||||
if(installBots!=null&&installBots.size()>0){
|
if(installBots!=null&&installBots.size()>0){
|
||||||
//删除各个webhook
|
//删除各个webhook
|
||||||
|
|
@ -722,7 +722,7 @@ public class UserService extends AbstractUserBot implements IUserService {
|
||||||
// 删除仓库的所有安装记录
|
// 删除仓库的所有安装记录
|
||||||
installMapper.delete(Wrappers.<InstallBot>lambdaQuery()
|
installMapper.delete(Wrappers.<InstallBot>lambdaQuery()
|
||||||
.eq(InstallBot::getStoreId,unInstallMarketBotRequest.getStoreId())
|
.eq(InstallBot::getStoreId,unInstallMarketBotRequest.getStoreId())
|
||||||
.eq(InstallBot::getInstallerId,unInstallMarketBotRequest.getUserId()));
|
.eq(InstallBot::getStoreRepo,unInstallMarketBotRequest.getStoreIdentifier()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -767,6 +767,7 @@ public class UserService extends AbstractUserBot implements IUserService {
|
||||||
installBot.setInstallerLogin(installMarketBotRequest.getLogin());
|
installBot.setInstallerLogin(installMarketBotRequest.getLogin());
|
||||||
installBot.setStoreId(storeId);
|
installBot.setStoreId(storeId);
|
||||||
installBot.setStoreRepo(installMarketBotRequest.getRepoMap().get(storeId));
|
installBot.setStoreRepo(installMarketBotRequest.getRepoMap().get(storeId));
|
||||||
|
installBot.setRepoOwner(installMarketBotRequest.getRepoOwnerMap().get(storeId));
|
||||||
installBot.setState(installMarketBotRequest.getState());
|
installBot.setState(installMarketBotRequest.getState());
|
||||||
installBots.add(installBot);
|
installBots.add(installBot);
|
||||||
});
|
});
|
||||||
|
|
@ -779,6 +780,7 @@ public class UserService extends AbstractUserBot implements IUserService {
|
||||||
installBot.setStoreId(storeId);
|
installBot.setStoreId(storeId);
|
||||||
installBot.setInstallerLogin(updateInstallBotRequest.getLogin());
|
installBot.setInstallerLogin(updateInstallBotRequest.getLogin());
|
||||||
installBot.setStoreRepo(updateInstallBotRequest.getRepoMap().get(storeId));
|
installBot.setStoreRepo(updateInstallBotRequest.getRepoMap().get(storeId));
|
||||||
|
installBot.setRepoOwner(updateInstallBotRequest.getRepoMap().get(storeId));
|
||||||
//TODO 如果bot生效,通过平台该bot
|
//TODO 如果bot生效,通过平台该bot
|
||||||
installBot.setState(updateInstallBotRequest.getState());
|
installBot.setState(updateInstallBotRequest.getState());
|
||||||
return installBot;
|
return installBot;
|
||||||
|
|
@ -791,13 +793,13 @@ public class UserService extends AbstractUserBot implements IUserService {
|
||||||
//1.先删除botId和userId对应的所有installBot
|
//1.先删除botId和userId对应的所有installBot
|
||||||
List<InstallBot> installBotList = installMapper.selectList(Wrappers.<InstallBot>lambdaQuery()
|
List<InstallBot> installBotList = installMapper.selectList(Wrappers.<InstallBot>lambdaQuery()
|
||||||
.eq(InstallBot::getBotId,updateInstallBotRequest.getBotId())
|
.eq(InstallBot::getBotId,updateInstallBotRequest.getBotId())
|
||||||
.eq(InstallBot::getInstallerId,updateInstallBotRequest.getUserId()));
|
.in(InstallBot::getStoreId,updateInstallBotRequest.getStoreList()));
|
||||||
|
|
||||||
if (!Objects.isNull(installBotList)){
|
if (!Objects.isNull(installBotList)){
|
||||||
|
|
||||||
for (InstallBot installBot : installBotList){
|
for (InstallBot installBot : installBotList){
|
||||||
//先删除webhook
|
//先删除webhook
|
||||||
Object[] objects = new Object[]{updateInstallBotRequest.getLogin(),installBot.getStoreRepo()};
|
Object[] objects = new Object[]{installBot.getRepoOwner(),installBot.getStoreRepo()};
|
||||||
Response response = api.deleteWebhook(updateInstallBotRequest.getUserId(),objects,installBot.getWebhookId());
|
Response response = api.deleteWebhook(updateInstallBotRequest.getUserId(),objects,installBot.getWebhookId());
|
||||||
checkException(response);
|
checkException(response);
|
||||||
}
|
}
|
||||||
|
|
@ -805,7 +807,7 @@ public class UserService extends AbstractUserBot implements IUserService {
|
||||||
|
|
||||||
installMapper.delete(new QueryWrapper<InstallBot>()
|
installMapper.delete(new QueryWrapper<InstallBot>()
|
||||||
.eq("bot_id",updateInstallBotRequest.getBotId())
|
.eq("bot_id",updateInstallBotRequest.getBotId())
|
||||||
.eq("installer_id",updateInstallBotRequest.getUserId()));
|
.eq("store_id",updateInstallBotRequest.getUserId()));
|
||||||
List<Integer> storeList = updateInstallBotRequest.getStoreList();
|
List<Integer> storeList = updateInstallBotRequest.getStoreList();
|
||||||
|
|
||||||
//2.然后重新插入所有storeId; //新增webhook
|
//2.然后重新插入所有storeId; //新增webhook
|
||||||
|
|
@ -817,7 +819,7 @@ public class UserService extends AbstractUserBot implements IUserService {
|
||||||
InstallBot installBot = getInstallBot(updateInstallBotRequest,store);
|
InstallBot installBot = getInstallBot(updateInstallBotRequest,store);
|
||||||
installMapper.insert(installBot);
|
installMapper.insert(installBot);
|
||||||
|
|
||||||
Object[] objects = new Object[]{updateInstallBotRequest.getLogin(),installBot.getStoreRepo()};
|
Object[] objects = new Object[]{installBot.getRepoOwner(),installBot.getStoreRepo()};
|
||||||
try {
|
try {
|
||||||
Response response = api.addWebhook(updateInstallBotRequest.getUserId(),objects,webhook);
|
Response response = api.addWebhook(updateInstallBotRequest.getUserId(),objects,webhook);
|
||||||
checkException(response);
|
checkException(response);
|
||||||
|
|
@ -836,7 +838,7 @@ public class UserService extends AbstractUserBot implements IUserService {
|
||||||
public void deleteInstallBot(DeleteInstallBotRequest deleteInstallBotRequest) throws BotException{
|
public void deleteInstallBot(DeleteInstallBotRequest deleteInstallBotRequest) throws BotException{
|
||||||
List<InstallBot> installBots = installMapper.selectList(Wrappers.<InstallBot>lambdaQuery()
|
List<InstallBot> installBots = installMapper.selectList(Wrappers.<InstallBot>lambdaQuery()
|
||||||
.eq(InstallBot::getBotId,deleteInstallBotRequest.getBotId())
|
.eq(InstallBot::getBotId,deleteInstallBotRequest.getBotId())
|
||||||
.eq(InstallBot::getInstallerId,deleteInstallBotRequest.getUserId()));
|
.eq(InstallBot::getStoreRepo,deleteInstallBotRequest.getStoreRepo()));
|
||||||
if (installBots==null||installBots.size()<=0){
|
if (installBots==null||installBots.size()<=0){
|
||||||
throw new BotException("该用户没有要删除的Bot");
|
throw new BotException("该用户没有要删除的Bot");
|
||||||
}
|
}
|
||||||
|
|
@ -856,10 +858,10 @@ public class UserService extends AbstractUserBot implements IUserService {
|
||||||
//删除install_bot
|
//删除install_bot
|
||||||
installMapper.delete(Wrappers.<InstallBot>lambdaQuery()
|
installMapper.delete(Wrappers.<InstallBot>lambdaQuery()
|
||||||
.eq(InstallBot::getBotId,deleteInstallBotRequest.getBotId())
|
.eq(InstallBot::getBotId,deleteInstallBotRequest.getBotId())
|
||||||
.eq(InstallBot::getInstallerId,deleteInstallBotRequest.getUserId()));
|
.eq(InstallBot::getStoreRepo,deleteInstallBotRequest.getStoreRepo()));
|
||||||
//删除webhook
|
//删除webhook
|
||||||
for(InstallBot installBot:installBots){
|
for(InstallBot installBot:installBots){
|
||||||
Object[] objects = new Object[]{deleteInstallBotRequest.getLogin(),installBot.getStoreRepo()};
|
Object[] objects = new Object[]{installBot.getRepoOwner(),installBot.getStoreRepo()};
|
||||||
Response response = api.deleteWebhook(deleteInstallBotRequest.getUserId(),objects,installBot.getWebhookId());
|
Response response = api.deleteWebhook(deleteInstallBotRequest.getUserId(),objects,installBot.getWebhookId());
|
||||||
checkException(response);
|
checkException(response);
|
||||||
}
|
}
|
||||||
|
|
@ -1120,17 +1122,17 @@ public class UserService extends AbstractUserBot implements IUserService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 判断该用户是否安装此bot
|
* 判断该用户是否安装此bot
|
||||||
* @param userId
|
* @param repoOwner
|
||||||
* @param botId
|
* @param botId
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean judgeIsInstallBot(Integer userId, Integer botId) {
|
public boolean judgeIsInstallBot(String repoOwner, Integer botId) {
|
||||||
|
|
||||||
//如果公开,则判断安装表里面有没有该用户安装的bot
|
//如果公开,则判断安装表里面有没有该用户安装的bot
|
||||||
List<InstallBot> installBots = installMapper.selectList(Wrappers.
|
List<InstallBot> installBots = installMapper.selectList(Wrappers.
|
||||||
<InstallBot>lambdaQuery().eq(InstallBot::getBotId,botId)
|
<InstallBot>lambdaQuery().eq(InstallBot::getBotId,botId)
|
||||||
.eq(InstallBot::getInstallerId,userId));
|
.eq(InstallBot::getRepoOwner,repoOwner));
|
||||||
|
|
||||||
if (!Objects.isNull(installBots)&&installBots.size()>0){
|
if (!Objects.isNull(installBots)&&installBots.size()>0){
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
|
|
@ -26,4 +26,7 @@ public class DeleteInstallBotRequest {
|
||||||
@NotNull(message = "botId is required")
|
@NotNull(message = "botId is required")
|
||||||
private Integer botId;
|
private Integer botId;
|
||||||
private String password;
|
private String password;
|
||||||
|
|
||||||
|
@NotNull(message = "repo is required")
|
||||||
|
private String storeRepo;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,4 +26,5 @@ public class InstallMarketBotRequest implements Serializable {
|
||||||
private List<Integer> storeList;
|
private List<Integer> storeList;
|
||||||
//TODO 前端修改
|
//TODO 前端修改
|
||||||
private Map<Integer,String> repoMap;
|
private Map<Integer,String> repoMap;
|
||||||
|
private Map<Integer, String> repoOwnerMap;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
-- ----------------------------
|
||||||
|
-- 表install_bot中添加字段 repo_owner:仓库拥有者login(组织/个人)
|
||||||
|
-- ----------------------------
|
||||||
|
ALTER TABLE `install_bot` ADD COLUMN (`repo_owner` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '仓库拥有者login(组织/个人)');
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -1,20 +1,18 @@
|
||||||
/*
|
/*
|
||||||
Navicat Premium Data Transfer
|
Navicat MySQL Data Transfer
|
||||||
|
|
||||||
Source Server : localhost_3306
|
Source Server : localhost
|
||||||
Source Server Type : MySQL
|
Source Server Version : 80023
|
||||||
Source Server Version : 50729
|
|
||||||
Source Host : localhost:3306
|
Source Host : localhost:3306
|
||||||
Source Schema : softbot
|
Source Database : soft_bot
|
||||||
|
|
||||||
Target Server Type : MySQL
|
Target Server Type : MYSQL
|
||||||
Target Server Version : 50729
|
Target Server Version : 80023
|
||||||
File Encoding : 65001
|
File Encoding : 65001
|
||||||
|
|
||||||
Date: 12/01/2023 11:54:00
|
Date: 2023-03-08 00:00:56
|
||||||
*/
|
*/
|
||||||
|
|
||||||
SET NAMES utf8mb4;
|
|
||||||
SET FOREIGN_KEY_CHECKS=0;
|
SET FOREIGN_KEY_CHECKS=0;
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
|
|
@ -22,187 +20,178 @@ SET FOREIGN_KEY_CHECKS = 0;
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
DROP TABLE IF EXISTS `bot`;
|
DROP TABLE IF EXISTS `bot`;
|
||||||
CREATE TABLE `bot` (
|
CREATE TABLE `bot` (
|
||||||
`id` int(255) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
`id` int NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||||
`bot_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'bot名称',
|
`bot_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'bot名称',
|
||||||
`bot_des` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL COMMENT 'bot描述',
|
`bot_des` longtext CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT 'bot描述',
|
||||||
`webhook` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'bot回调url',
|
`webhook` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'bot回调url',
|
||||||
`is_public` tinyint(255) NULL DEFAULT NULL COMMENT '0:私有1:公开',
|
`is_public` tinyint DEFAULT NULL COMMENT '0:私有1:公开',
|
||||||
`logo` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'logo',
|
`logo` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'logo',
|
||||||
`state` tinyint(255) NULL DEFAULT NULL COMMENT '0:挂起1:工作',
|
`state` tinyint DEFAULT NULL COMMENT '0:挂起1:工作',
|
||||||
`client_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '客户端id(后台生成)',
|
`client_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '客户端id(后台生成)',
|
||||||
`client_secret` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '客户端密钥(后台生成)',
|
`client_secret` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '客户端密钥(后台生成)',
|
||||||
`web_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '主页网址',
|
`web_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '主页网址',
|
||||||
`category` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '类型',
|
`category` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '类型',
|
||||||
`install_num` int(11) NULL DEFAULT 0 COMMENT '下载数量',
|
`install_num` int DEFAULT '0' COMMENT '下载数量',
|
||||||
`update_time` datetime NOT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
`update_time` datetime NOT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||||
`create_time` datetime NOT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间',
|
`create_time` datetime NOT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||||
|
`uid` int DEFAULT NULL,
|
||||||
|
`owner_id` int DEFAULT NULL,
|
||||||
|
`private_key` text,
|
||||||
PRIMARY KEY (`id`) USING BTREE,
|
PRIMARY KEY (`id`) USING BTREE,
|
||||||
UNIQUE INDEX `name`(`bot_name`) USING BTREE
|
UNIQUE KEY `name` (`bot_name`) USING BTREE
|
||||||
) ENGINE = InnoDB AUTO_INCREMENT = 801 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC;
|
) ENGINE=InnoDB AUTO_INCREMENT=802 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Records of bot
|
-- Records of bot
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
INSERT INTO `bot` VALUES (782, 'asd阿松大', 'miaoshusd', 'www.hauhahasd.com', 1, 'asdasdasfdg', 0, 'qwer', 'ert', 'botnameegdret4', '送的饭', 0, '2022-12-29 11:56:56', '2022-12-29 11:56:56');
|
INSERT INTO `bot` VALUES ('783', 'botnameegdret', 'miaoshusd', 'http://localhost:10000', '1', 'asdasdasfdg', '0', 'qwer', 'ert', 'botnameegdret', '疑修管理', '6', '2023-03-07 17:42:13', '2023-03-07 17:42:13', null, '84993', null);
|
||||||
INSERT INTO `bot` VALUES (783, 'botnameegdret', 'miaoshusd', 'www.hauhahasd.com', 1, 'asdasdasfdg', 0, 'qwer', 'ert', 'botnameegdret', '阿松大', 0, '2022-12-29 11:56:58', '2022-12-29 11:56:58');
|
INSERT INTO `bot` VALUES ('791', 'botnameegdretui', 'miaoshusd', 'www.hauhahasd.com', '1', 'asdasdasfdg', '0', 'qwer', 'ert', 'botnameegdretui', '疑修管理', '1', '2023-03-07 17:23:28', '2023-03-06 23:05:28', null, '84993', null);
|
||||||
INSERT INTO `bot` VALUES (791, 'botnameegdretui', 'miaoshusd', 'www.hauhahasd.com', 1, 'asdasdasfdg', 0, 'qwer', 'ert', 'botnameegdretui', '阿松大', 0, '2022-12-29 18:21:57', '2022-12-29 18:21:57');
|
INSERT INTO `bot` VALUES ('792', 'botnameegdretop', 'miaoshusd', 'www.hauhahasd.com', '0', 'asdasdasfdg', '0', 'qwer', 'ert', 'botnameegdretop', null, '0', '2023-03-06 23:05:29', '2023-03-06 23:05:29', null, '84993', null);
|
||||||
INSERT INTO `bot` VALUES (792, 'botnameegdretop', 'miaoshusd', 'www.hauhahasd.com', 0, 'asdasdasfdg', 0, 'qwer', 'ert', 'botnameegdretop', NULL, 0, '2022-12-29 18:34:26', '2022-12-29 18:34:26');
|
|
||||||
INSERT INTO `bot` VALUES (793, 'botnameegdretopjkl', 'miaoshusd', 'www.hauhahasd.com', 0, 'asdasdasfdg', 0, 'qwer', 'ert', 'botnameegdretopjkl', NULL, 0, '2022-12-29 18:42:26', '2022-12-29 18:42:26');
|
|
||||||
INSERT INTO `bot` VALUES (794, 'botnameegdretopjklasd', 'miaoshusd', 'www.hauhahasd.com', 0, 'asdasdasfdg', 0, 'qwer', 'ert', 'botnameegdretopjklasd', NULL, 0, '2022-12-29 18:45:54', '2022-12-29 18:45:54');
|
|
||||||
INSERT INTO `bot` VALUES (799, 'botnameegdretopjklasdfdg', 'miaoshusd', 'www.hauhahasd.com', 0, 'asdasdasfdg', 0, 'qwer', 'ert', 'botnameegdretopjklasdfdg', 'asdasd', 0, '2022-12-29 20:07:52', '2022-12-29 20:07:52');
|
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Table structure for bot_category
|
-- Table structure for bot_category
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
DROP TABLE IF EXISTS `bot_category`;
|
DROP TABLE IF EXISTS `bot_category`;
|
||||||
CREATE TABLE `bot_category` (
|
CREATE TABLE `bot_category` (
|
||||||
`id` int(11) NOT NULL,
|
`id` int NOT NULL,
|
||||||
`category` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
|
`category` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
|
||||||
PRIMARY KEY (`id`) USING BTREE
|
PRIMARY KEY (`id`) USING BTREE
|
||||||
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Records of bot_category
|
-- Records of bot_category
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
INSERT INTO `bot_category` VALUES (1, '接口管理');
|
INSERT INTO `bot_category` VALUES ('1', '疑修管理');
|
||||||
INSERT INTO `bot_category` VALUES (2, '合情请求管理');
|
INSERT INTO `bot_category` VALUES ('2', '合并请求管理');
|
||||||
INSERT INTO `bot_category` VALUES (3, '文档管理');
|
INSERT INTO `bot_category` VALUES ('3', '代码审阅');
|
||||||
INSERT INTO `bot_category` VALUES (4, '依赖管理');
|
INSERT INTO `bot_category` VALUES ('4', '代码质量');
|
||||||
INSERT INTO `bot_category` VALUES (5, '代码审阅');
|
INSERT INTO `bot_category` VALUES ('5', '依赖管理');
|
||||||
INSERT INTO `bot_category` VALUES (6, '代码质量');
|
INSERT INTO `bot_category` VALUES ('6', '构建');
|
||||||
INSERT INTO `bot_category` VALUES (7, '构建');
|
INSERT INTO `bot_category` VALUES ('7', '测试');
|
||||||
INSERT INTO `bot_category` VALUES (8, '测试');
|
INSERT INTO `bot_category` VALUES ('8', '部署');
|
||||||
INSERT INTO `bot_category` VALUES (9, '部署');
|
INSERT INTO `bot_category` VALUES ('9', '文档管理');
|
||||||
INSERT INTO `bot_category` VALUES (10, '其他');
|
INSERT INTO `bot_category` VALUES ('10', '其他');
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Table structure for bot_limit_event
|
-- Table structure for bot_limit_event
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
DROP TABLE IF EXISTS `bot_limit_event`;
|
DROP TABLE IF EXISTS `bot_limit_event`;
|
||||||
CREATE TABLE `bot_limit_event` (
|
CREATE TABLE `bot_limit_event` (
|
||||||
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
`id` int NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||||
`bot_id` int(255) NOT NULL COMMENT 'bot的唯一标识',
|
`bot_id` int NOT NULL COMMENT 'bot的唯一标识',
|
||||||
`read_write_code` tinyint(4) NOT NULL COMMENT '0:只读1:读写2:无权限',
|
`read_write_code` tinyint NOT NULL COMMENT '0:只读1:读写2:无权限',
|
||||||
`read_write_pr` tinyint(4) NOT NULL COMMENT '0:只读1:读写2:无权限',
|
`read_write_pr` tinyint NOT NULL COMMENT '0:只读1:读写2:无权限',
|
||||||
`auth_category` tinyint(4) NOT NULL COMMENT '0:代码仓库权限1:合并请求权限2:无权限',
|
`auth_category` tinyint NOT NULL COMMENT '0:代码仓库权限1:合并请求权限2:无权限',
|
||||||
`event` tinyint(4) NOT NULL COMMENT '0:git推送到存储库1:创建分支或标签2:删除分支或标签3:合并请求被打开或重新打开4:合并请求被分配\r\n5:无权限',
|
`event` tinyint NOT NULL COMMENT '0:git推送到存储库1:创建分支或标签2:删除分支或标签3:合并请求被打开或重新打开4:合并请求被分配\r\n5:无权限',
|
||||||
`create_time` datetime NOT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间',
|
`create_time` datetime NOT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||||
`update_time` datetime NOT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
`update_time` datetime NOT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||||
PRIMARY KEY (`id`) USING BTREE
|
PRIMARY KEY (`id`) USING BTREE
|
||||||
) ENGINE = InnoDB AUTO_INCREMENT = 29 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC;
|
) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Records of bot_limit_event
|
-- Records of bot_limit_event
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
INSERT INTO `bot_limit_event` VALUES (17, 782, 0, 1, 0, 1, '2022-10-02 22:19:34', '2022-10-02 22:19:34');
|
INSERT INTO `bot_limit_event` VALUES ('18', '783', '0', '1', '0', '1', '2022-10-05 19:21:53', '2022-10-05 19:21:53');
|
||||||
INSERT INTO `bot_limit_event` VALUES (18, 783, 0, 1, 0, 1, '2022-10-05 19:21:53', '2022-10-05 19:21:53');
|
INSERT INTO `bot_limit_event` VALUES ('19', '791', '0', '1', '0', '1', '2022-10-07 20:19:22', '2022-10-07 20:19:22');
|
||||||
INSERT INTO `bot_limit_event` VALUES (19, 791, 0, 1, 0, 1, '2022-10-07 20:19:22', '2022-10-07 20:19:22');
|
INSERT INTO `bot_limit_event` VALUES ('20', '792', '1', '2', '0', '2', '2022-12-29 18:34:26', '2022-12-29 18:34:26');
|
||||||
INSERT INTO `bot_limit_event` VALUES (20, 792, 1, 2, 0, 2, '2022-12-29 18:34:26', '2022-12-29 18:34:26');
|
INSERT INTO `bot_limit_event` VALUES ('21', '793', '1', '2', '0', '1', '2022-12-29 18:42:26', '2022-12-29 18:42:26');
|
||||||
INSERT INTO `bot_limit_event` VALUES (21, 793, 1, 2, 0, 1, '2022-12-29 18:42:26', '2022-12-29 18:42:26');
|
INSERT INTO `bot_limit_event` VALUES ('23', '794', '1', '2', '0', '1', '2022-12-29 18:45:54', '2022-12-29 18:45:54');
|
||||||
INSERT INTO `bot_limit_event` VALUES (22, 793, 2, 1, 1, 3, '2022-12-29 18:42:26', '2022-12-29 18:42:26');
|
INSERT INTO `bot_limit_event` VALUES ('27', '799', '1', '2', '0', '1', '2022-12-29 19:30:05', '2022-12-29 19:30:05');
|
||||||
INSERT INTO `bot_limit_event` VALUES (23, 794, 1, 2, 0, 1, '2022-12-29 18:45:54', '2022-12-29 18:45:54');
|
INSERT INTO `bot_limit_event` VALUES ('28', '799', '2', '1', '1', '2', '2022-12-29 19:30:05', '2022-12-29 19:30:05');
|
||||||
INSERT INTO `bot_limit_event` VALUES (24, 794, 1, 2, 0, 2, '2022-12-29 18:45:54', '2022-12-29 18:45:54');
|
|
||||||
INSERT INTO `bot_limit_event` VALUES (25, 794, 2, 1, 1, 3, '2022-12-29 18:45:54', '2022-12-29 18:45:54');
|
|
||||||
INSERT INTO `bot_limit_event` VALUES (26, 794, 2, 1, 1, 4, '2022-12-29 18:45:54', '2022-12-29 18:45:54');
|
|
||||||
INSERT INTO `bot_limit_event` VALUES (27, 799, 1, 2, 0, 1, '2022-12-29 19:30:05', '2022-12-29 19:30:05');
|
|
||||||
INSERT INTO `bot_limit_event` VALUES (28, 799, 1, 2, 0, 2, '2022-12-29 19:30:05', '2022-12-29 19:30:05');
|
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Table structure for install_bot
|
-- Table structure for install_bot
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
DROP TABLE IF EXISTS `install_bot`;
|
DROP TABLE IF EXISTS `install_bot`;
|
||||||
CREATE TABLE `install_bot` (
|
CREATE TABLE `install_bot` (
|
||||||
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
`id` int NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||||
`bot_id` int(255) NOT NULL COMMENT 'bot唯一标识',
|
`bot_id` int NOT NULL COMMENT 'bot唯一标识',
|
||||||
`installer_id` int(255) NOT NULL COMMENT '安装者唯一标识',
|
`installer_id` int NOT NULL COMMENT '安装者唯一标识',
|
||||||
`store_id` int(255) NOT NULL COMMENT '仓库唯一标识',
|
`store_id` int NOT NULL COMMENT '仓库唯一标识',
|
||||||
`state` tinyint(4) NOT NULL COMMENT '0:挂起1:工作2:卸载',
|
`state` tinyint NOT NULL COMMENT '0:挂起1:工作2:卸载',
|
||||||
`create_time` datetime NOT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间 ',
|
`create_time` datetime NOT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间 ',
|
||||||
`update_time` datetime NOT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
`update_time` datetime NOT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||||
|
`installer_login` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
|
||||||
|
`store_repo` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
|
||||||
|
`webhook_id` int DEFAULT NULL,
|
||||||
PRIMARY KEY (`id`) USING BTREE
|
PRIMARY KEY (`id`) USING BTREE
|
||||||
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC;
|
) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Records of install_bot
|
-- Records of install_bot
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
INSERT INTO `install_bot` VALUES (2, 782, 123, 1, 1, '2022-10-07 20:49:53', '2022-10-07 20:49:53');
|
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Table structure for market_bot
|
-- Table structure for market_bot
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
DROP TABLE IF EXISTS `market_bot`;
|
DROP TABLE IF EXISTS `market_bot`;
|
||||||
CREATE TABLE `market_bot` (
|
CREATE TABLE `market_bot` (
|
||||||
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
`id` int NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||||
`bot_id` int(255) NOT NULL COMMENT 'bot唯一 标识',
|
`bot_id` int NOT NULL COMMENT 'bot唯一 标识',
|
||||||
`market_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '上市名称',
|
`market_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '上市名称',
|
||||||
`market_desc` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '上市简介',
|
`market_desc` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '上市简介',
|
||||||
`market_intro` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL COMMENT '详细介绍',
|
`market_intro` longtext CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '详细介绍',
|
||||||
`first_func` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '主要功能',
|
`first_func` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '主要功能',
|
||||||
`second_func` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '次要功能',
|
`second_func` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '次要功能',
|
||||||
`webhook` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '回调url',
|
`webhook` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '回调url',
|
||||||
`is_receive_ag1` tinyint(4) NULL DEFAULT 0 COMMENT '0:接收协议1:不接受收开发者协议',
|
`is_receive_ag1` tinyint DEFAULT '0' COMMENT '0:接收协议1:不接受收开发者协议',
|
||||||
`is_receive_ag2` tinyint(4) NULL DEFAULT 0 COMMENT '0:接收协议1:不接受平台协议',
|
`is_receive_ag2` tinyint DEFAULT '0' COMMENT '0:接收协议1:不接受平台协议',
|
||||||
`market_time` datetime NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '上市时间',
|
`market_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '上市时间',
|
||||||
`logo` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '头像',
|
`logo` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '头像',
|
||||||
`install_num` int(11) NULL DEFAULT 0 COMMENT '安装次数',
|
`install_num` int DEFAULT '0' COMMENT '安装次数',
|
||||||
`category` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '类型',
|
`category` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '类型',
|
||||||
`create_time` datetime NOT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间',
|
`create_time` datetime NOT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||||
`update_time` datetime NOT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
|
`update_time` datetime NOT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
|
||||||
PRIMARY KEY (`id`) USING BTREE,
|
PRIMARY KEY (`id`) USING BTREE,
|
||||||
UNIQUE INDEX `唯一`(`bot_id`) USING BTREE
|
UNIQUE KEY `唯一` (`bot_id`) USING BTREE
|
||||||
) ENGINE = InnoDB AUTO_INCREMENT = 55 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC;
|
) ENGINE=InnoDB AUTO_INCREMENT=55 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Records of market_bot
|
-- Records of market_bot
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
INSERT INTO `market_bot` VALUES (46, 782, 'asd', 'asd', NULL, 'asdsdf', 'asdasd', 'asd', 1, 1, '2022-10-07 19:25:16', 'asd', 0, 'asd', '2022-10-07 19:25:16', '2022-10-07 19:25:16');
|
INSERT INTO `market_bot` VALUES ('49', '783', 'qwe', 'asd', null, '代码审阅', '疑修管理', 'sad', '1', '1', '2023-03-06 21:07:01', 'sd', '6', 'asd', '2023-03-06 21:07:01', '2023-03-07 17:40:57');
|
||||||
INSERT INTO `market_bot` VALUES (49, 783, 'asdasd', 'asd', NULL, 'asdsdf', 'asdasd', 'sad', 1, 1, '2022-10-07 19:25:22', 'sd', 0, 'asd', '2022-10-07 19:25:22', '2022-10-07 19:25:22');
|
INSERT INTO `market_bot` VALUES ('54', '791', 'asder', 'asd', 'asdasd', '其他', '', 'www.asd.com', '0', '0', '2023-03-06 21:06:58', 'asd', '1', 'xcv', '2023-03-06 21:06:58', '2023-03-07 17:23:28');
|
||||||
INSERT INTO `market_bot` VALUES (54, 791, 'asder', 'asd', 'asdasd', 'asdsdf', 'asdasd', 'www.asd.com', 0, 0, '2022-12-29 18:22:01', 'asd', 0, 'xcv', '2022-12-29 18:22:01', '2022-12-29 18:22:01');
|
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Table structure for register_bot
|
-- Table structure for register_bot
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
DROP TABLE IF EXISTS `register_bot`;
|
DROP TABLE IF EXISTS `register_bot`;
|
||||||
CREATE TABLE `register_bot` (
|
CREATE TABLE `register_bot` (
|
||||||
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
`id` int NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||||
`bot_id` int(255) NOT NULL COMMENT 'bot唯一标识',
|
`bot_id` int NOT NULL COMMENT 'bot唯一标识',
|
||||||
`developer_id` int(255) NOT NULL COMMENT 'bot开发者唯一标识',
|
`developer_id` int NOT NULL COMMENT 'bot开发者唯一标识',
|
||||||
`create_time` datetime NOT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间',
|
`create_time` datetime NOT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||||
`update_time` datetime NOT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
`update_time` datetime NOT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||||
|
`developer_login` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
|
||||||
PRIMARY KEY (`id`) USING BTREE,
|
PRIMARY KEY (`id`) USING BTREE,
|
||||||
UNIQUE INDEX `bot_id`(`bot_id`) USING BTREE
|
UNIQUE KEY `bot_id` (`bot_id`) USING BTREE
|
||||||
) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC;
|
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Records of register_bot
|
-- Records of register_bot
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
INSERT INTO `register_bot` VALUES (2, 782, 1234, '2022-10-02 22:19:34', '2022-10-02 22:19:34');
|
INSERT INTO `register_bot` VALUES ('3', '783', '84993', '2023-03-07 09:46:37', '2023-03-07 09:46:37', 'durian');
|
||||||
INSERT INTO `register_bot` VALUES (3, 783, 1234, '2022-10-05 19:21:53', '2022-10-05 19:21:53');
|
INSERT INTO `register_bot` VALUES ('4', '791', '84993', '2023-03-07 09:46:37', '2023-03-07 09:46:37', 'durian');
|
||||||
INSERT INTO `register_bot` VALUES (4, 791, 1234, '2022-12-29 18:27:41', '2022-12-29 18:27:41');
|
INSERT INTO `register_bot` VALUES ('5', '792', '84993', '2023-03-07 09:46:35', '2023-03-07 09:46:35', 'durian');
|
||||||
INSERT INTO `register_bot` VALUES (5, 792, 1234, '2022-12-29 18:34:26', '2022-12-29 18:34:26');
|
|
||||||
INSERT INTO `register_bot` VALUES (6, 793, 1234, '2022-12-29 18:42:26', '2022-12-29 18:42:26');
|
|
||||||
INSERT INTO `register_bot` VALUES (7, 794, 1234, '2022-12-29 18:45:54', '2022-12-29 18:45:54');
|
|
||||||
INSERT INTO `register_bot` VALUES (8, 799, 1234, '2022-12-29 19:30:05', '2022-12-29 19:30:05');
|
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Table structure for transfer_bot
|
-- Table structure for transfer_bot
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
DROP TABLE IF EXISTS `transfer_bot`;
|
DROP TABLE IF EXISTS `transfer_bot`;
|
||||||
CREATE TABLE `transfer_bot` (
|
CREATE TABLE `transfer_bot` (
|
||||||
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
`id` int NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||||
`bot_id` int(255) NOT NULL COMMENT 'bot唯一标识',
|
`bot_id` int NOT NULL COMMENT 'bot唯一标识',
|
||||||
`transfer_from_id` int(255) NOT NULL COMMENT '转让者唯一标识',
|
`transfer_from_id` int NOT NULL COMMENT '转让者唯一标识',
|
||||||
`transfer_to_id` int(255) NOT NULL COMMENT '接收者唯一标识',
|
`transfer_to_id` int NOT NULL COMMENT '接收者唯一标识',
|
||||||
`is_success` tinyint(4) NOT NULL COMMENT '0:转让失败,1:转让成功 2:待接收',
|
`is_success` tinyint NOT NULL COMMENT '0:转让失败,1:转让成功 2:待接收',
|
||||||
`transfer_time` datetime NOT NULL COMMENT '转让时间',
|
`transfer_time` datetime NOT NULL COMMENT '转让时间',
|
||||||
`create_time` datetime NOT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间',
|
`create_time` datetime NOT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||||
`update_time` datetime NOT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
`update_time` datetime NOT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||||
|
`from_login` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
|
||||||
|
`to_login` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
|
||||||
PRIMARY KEY (`id`) USING BTREE
|
PRIMARY KEY (`id`) USING BTREE
|
||||||
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC;
|
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Records of transfer_bot
|
-- Records of transfer_bot
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
INSERT INTO `transfer_bot` VALUES (1, 782, 456, 789, 1, '2022-10-05 19:37:56', '2023-01-03 10:55:40', '2023-01-03 10:55:40');
|
|
||||||
|
|
||||||
SET FOREIGN_KEY_CHECKS = 1;
|
|
||||||
|
|
|
||||||
Binary file not shown.
Loading…
Reference in New Issue