kevinw66 commented on code in PR #55:
URL: https://github.com/apache/bigtop-manager/pull/55#discussion_r1735488578


##########
bigtop-manager-server/src/main/resources/ddl/MySQL-DDL-CREATE.sql:
##########
@@ -321,6 +321,66 @@ CREATE TABLE `stage`
     KEY              `idx_job_id` (`job_id`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
 
+CREATE TABLE `llm_platform`
+(
+    `id`             BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+    `name`           VARCHAR(255)        NOT NULL,
+    `api_url`        VARCHAR(255)        NOT NULL,
+    `credential`     JSON                DEFAULT NULL,
+    `support_models` VARCHAR(255)        DEFAULT NULL,
+    `create_time`    DATETIME            DEFAULT CURRENT_TIMESTAMP,
+    `update_time`    DATETIME            DEFAULT CURRENT_TIMESTAMP ON UPDATE 
CURRENT_TIMESTAMP,
+    `create_by`      BIGINT              DEFAULT NULL,
+    `update_by`      BIGINT              DEFAULT NULL,
+    PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+
+CREATE TABLE `llm_platform_authorized`
+(
+    `id`          BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+    `user_id`     BIGINT(20) UNSIGNED NOT NULL,
+    `platform_id` BIGINT(20) UNSIGNED NOT NULL,
+    `credentials` JSON                NOT NULL,
+    `create_time` DATETIME            DEFAULT CURRENT_TIMESTAMP,
+    `update_time` DATETIME            DEFAULT CURRENT_TIMESTAMP ON UPDATE 
CURRENT_TIMESTAMP,
+    `create_by`   BIGINT              DEFAULT NULL,
+    `update_by`   BIGINT              DEFAULT NULL,
+    PRIMARY KEY (`id`),
+    KEY `idx_platform_id` (`platform_id`),
+    KEY `idx_user_id` (`user_id`),
+    CONSTRAINT `llm_platform_authorized_ibfk_1` FOREIGN KEY (`user_id`) 
REFERENCES `user` (`id`) ON DELETE CASCADE,
+    CONSTRAINT `llm_platform_authorized_ibfk_2` FOREIGN KEY (`platform_id`) 
REFERENCES `llm_platform` (`id`) ON DELETE CASCADE

Review Comment:
   We don't need physical foreign key constraint, a logical foreign key is 
enough



##########
bigtop-manager-server/src/main/resources/application.yml:
##########
@@ -26,18 +26,15 @@ bigtop:
       port: 8835
 
 spring:
-  banner:
-    charset: utf-8
   application:
     name: bigtop-manager-server
-  main:
-    banner-mode: log

Review Comment:
   Why delete banner config?



##########
bigtop-manager-server/src/main/resources/application.yml:
##########
@@ -26,18 +26,15 @@ bigtop:
       port: 8835
 
 spring:
-  banner:
-    charset: utf-8
   application:
     name: bigtop-manager-server
-  main:
-    banner-mode: log
   datasource:
-    driver-class-name: org.postgresql.Driver
-    url: jdbc:postgresql://localhost:5432/bigtop_manager
-    username: postgres
-    password: postgres
+    # driver-class-name: com.mysql.jdbc.Driver(mysql8以下类名)
+    driver-class-name: com.mysql.cj.jdbc.Driver
+    password: hnu123456
     type: com.zaxxer.hikari.HikariDataSource
+    url: jdbc:mysql://localhost:3306/bigtop_manager
+    username: root

Review Comment:
   We should revert these



##########
bigtop-manager-server/src/main/resources/ddl/MySQL-DDL-CREATE.sql:
##########
@@ -321,6 +321,66 @@ CREATE TABLE `stage`
     KEY              `idx_job_id` (`job_id`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
 
+CREATE TABLE `llm_platform`
+(
+    `id`             BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+    `name`           VARCHAR(255)        NOT NULL,
+    `api_url`        VARCHAR(255)        NOT NULL,

Review Comment:
   Can we remove `api_url` column and use the constant defined in `AIAssistant` 
class?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@bigtop.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to