refactor: 简化首次安装部署,安装向导并入后台并自动建库

This commit is contained in:
Nixevol
2026-07-08 17:46:34 +08:00
parent 3517ad9088
commit b498a49a9b
21 changed files with 555 additions and 486 deletions
+19 -3
View File
@@ -27,6 +27,17 @@ export class InstallMysqlDto {
@ApiProperty()
@IsString()
password!: string;
// 仅当业务账号无建库权限时使用:用于自动 CREATE DATABASE。
@ApiPropertyOptional()
@IsOptional()
@IsString()
adminUsername?: string;
@ApiPropertyOptional()
@IsOptional()
@IsString()
adminPassword?: string;
}
export class InstallRedisDto {
@@ -114,13 +125,18 @@ export class InstallRequestDto {
@IsNotEmpty()
appName!: string;
// 对外访问地址(域名,可含端口);后台、客户端、短链、二维码均基于此推导。
@ApiProperty()
@IsUrl({ require_tld: false })
baseUrl!: string;
@ApiProperty()
@IsUrl({ require_tld: false })
clientBaseUrl!: string;
// 服务监听端口(默认 3000),由前置 Nginx/宝塔/1Panel 反代指向该端口。
@ApiPropertyOptional({ default: 3000 })
@IsOptional()
@Type(() => Number)
@IsInt()
@Min(1)
port?: number;
@ApiProperty()
@ValidateNested()