From 37d6efb70e5bcfddc8a4ca6becaf440ab05785fb Mon Sep 17 00:00:00 2001 From: Charles7c Date: Tue, 4 Mar 2025 21:29:56 +0800 Subject: [PATCH] =?UTF-8?q?refactor(system/storage):=20=E9=87=8D=E6=9E=84?= =?UTF-8?q?=E5=AD=98=E5=82=A8=E7=AE=A1=E7=90=86=EF=BC=8C=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E9=BB=98=E8=AE=A4=E5=AD=98=E5=82=A8=E3=80=81?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=8A=B6=E6=80=81=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit S3 => OSS --- .../model/req/CommonStatusUpdateReq.java | 42 +++++++++++++ .../admin/system/enums/StorageTypeEnum.java | 12 ++-- .../admin/system/model/entity/StorageDO.java | 8 +-- .../system/model/query/StorageQuery.java | 7 +++ .../admin/system/model/req/StorageReq.java | 54 ++++++++-------- .../admin/system/model/resp/StorageResp.java | 18 +++--- .../admin/system/service/StorageService.java | 16 +++++ .../service/impl/StorageServiceImpl.java | 62 +++++++++++++++---- .../system/validation/ValidationGroup.java | 4 +- .../controller/system/StorageController.java | 28 ++++++++- .../db/changelog/mysql/main_data.sql | 6 +- .../db/changelog/mysql/main_table.sql | 10 +-- .../db/changelog/postgresql/main_data.sql | 6 +- .../db/changelog/postgresql/main_table.sql | 10 +-- 14 files changed, 209 insertions(+), 74 deletions(-) create mode 100644 continew-common/src/main/java/top/continew/admin/common/model/req/CommonStatusUpdateReq.java diff --git a/continew-common/src/main/java/top/continew/admin/common/model/req/CommonStatusUpdateReq.java b/continew-common/src/main/java/top/continew/admin/common/model/req/CommonStatusUpdateReq.java new file mode 100644 index 00000000..24c3c68e --- /dev/null +++ b/continew-common/src/main/java/top/continew/admin/common/model/req/CommonStatusUpdateReq.java @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2022-present Charles7c Authors. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package top.continew.admin.common.model.req; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; +import lombok.Data; +import top.continew.admin.common.enums.DisEnableStatusEnum; + +import java.io.Serializable; + +/** + * 修改状态请求参数 + * + * @author Charles7c + * @since 2025/3/4 20:09 + */ +@Data +@Schema(description = "修改状态请求参数") +public class CommonStatusUpdateReq implements Serializable { + + /** + * 状态 + */ + @Schema(description = "状态", example = "1") + @NotNull(message = "状态非法") + private DisEnableStatusEnum status; +} diff --git a/continew-module-system/src/main/java/top/continew/admin/system/enums/StorageTypeEnum.java b/continew-module-system/src/main/java/top/continew/admin/system/enums/StorageTypeEnum.java index 45a3c8c6..54868f5e 100644 --- a/continew-module-system/src/main/java/top/continew/admin/system/enums/StorageTypeEnum.java +++ b/continew-module-system/src/main/java/top/continew/admin/system/enums/StorageTypeEnum.java @@ -30,15 +30,15 @@ import top.continew.starter.core.enums.BaseEnum; @RequiredArgsConstructor public enum StorageTypeEnum implements BaseEnum { - /** - * 兼容S3协议存储 - */ - S3(1, "兼容S3协议存储"), - /** * 本地存储 */ - LOCAL(2, "本地存储"),; + LOCAL(1, "本地存储"), + + /** + * 对象存储 + */ + OSS(2, "对象存储"); private final Integer value; private final String description; diff --git a/continew-module-system/src/main/java/top/continew/admin/system/model/entity/StorageDO.java b/continew-module-system/src/main/java/top/continew/admin/system/model/entity/StorageDO.java index e6109c43..acfd7175 100644 --- a/continew-module-system/src/main/java/top/continew/admin/system/model/entity/StorageDO.java +++ b/continew-module-system/src/main/java/top/continew/admin/system/model/entity/StorageDO.java @@ -54,24 +54,24 @@ public class StorageDO extends BaseDO { private StorageTypeEnum type; /** - * Access Key(访问密钥) + * Access Key */ @FieldEncrypt private String accessKey; /** - * Secret Key(私有密钥) + * Secret Key */ @FieldEncrypt private String secretKey; /** - * Endpoint(终端节点) + * Endpoint */ private String endpoint; /** - * 桶名称 + * Bucket */ private String bucketName; diff --git a/continew-module-system/src/main/java/top/continew/admin/system/model/query/StorageQuery.java b/continew-module-system/src/main/java/top/continew/admin/system/model/query/StorageQuery.java index 7dd6f592..ecfc17b6 100644 --- a/continew-module-system/src/main/java/top/continew/admin/system/model/query/StorageQuery.java +++ b/continew-module-system/src/main/java/top/continew/admin/system/model/query/StorageQuery.java @@ -19,6 +19,7 @@ package top.continew.admin.system.model.query; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import top.continew.admin.common.enums.DisEnableStatusEnum; +import top.continew.admin.system.enums.StorageTypeEnum; import top.continew.starter.data.core.annotation.Query; import top.continew.starter.data.core.enums.QueryType; @@ -50,4 +51,10 @@ public class StorageQuery implements Serializable { */ @Schema(description = "状态", example = "1") private DisEnableStatusEnum status; + + /** + * 类型 + */ + @Schema(description = "类型", example = "2") + private StorageTypeEnum type; } \ No newline at end of file diff --git a/continew-module-system/src/main/java/top/continew/admin/system/model/req/StorageReq.java b/continew-module-system/src/main/java/top/continew/admin/system/model/req/StorageReq.java index 9a529cac..e8cc27f2 100644 --- a/continew-module-system/src/main/java/top/continew/admin/system/model/req/StorageReq.java +++ b/continew-module-system/src/main/java/top/continew/admin/system/model/req/StorageReq.java @@ -16,6 +16,7 @@ package top.continew.admin.system.model.req; +import com.fasterxml.jackson.annotation.JsonIgnore; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.NotNull; @@ -67,43 +68,45 @@ public class StorageReq implements Serializable { private StorageTypeEnum type; /** - * 访问密钥 + * Access Key */ - @Schema(description = "访问密钥", example = "") - @Length(max = 255, message = "访问密钥长度不能超过 {max} 个字符") - @NotBlank(message = "访问密钥不能为空", groups = ValidationGroup.Storage.S3.class) + @Schema(description = "Access Key", example = "") + @Length(max = 255, message = "Access Key长度不能超过 {max} 个字符") + @NotBlank(message = "Access Key不能为空", groups = ValidationGroup.Storage.OSS.class) private String accessKey; /** - * 私有密钥 + * Secret Key */ - @Schema(description = "私有密钥", example = "") - @NotBlank(message = "私有密钥不能为空", groups = ValidationGroup.Storage.S3.class) + @Schema(description = "Secret Key", example = "") + @NotBlank(message = "Secret Key不能为空", groups = ValidationGroup.Storage.OSS.class) private String secretKey; /** - * 终端节点 + * Endpoint */ - @Schema(description = "终端节点", example = "") - @Length(max = 255, message = "终端节点长度不能超过 {max} 个字符") - @NotBlank(message = "终端节点不能为空", groups = ValidationGroup.Storage.S3.class) + @Schema(description = "Endpoint", example = "") + @Length(max = 255, message = "Endpoint长度不能超过 {max} 个字符") + @NotBlank(message = "Endpoint不能为空", groups = ValidationGroup.Storage.OSS.class) private String endpoint; /** - * 桶名称 + * Bucket/存储路径 */ - @Schema(description = "桶名称", example = "C:/continew-admin/data/file/") - @Length(max = 255, message = "桶名称长度不能超过 {max} 个字符") - @NotBlank(message = "桶名称不能为空", groups = ValidationGroup.Storage.S3.class) + @Schema(description = "Bucket/存储路径", example = "C:/continew-admin/data/file/") + @Length(max = 255, message = "Bucket长度不能超过 {max} 个字符", groups = ValidationGroup.Storage.OSS.class) + @Length(max = 255, message = "存储路径长度不能超过 {max} 个字符", groups = ValidationGroup.Storage.Local.class) + @NotBlank(message = "Bucket不能为空", groups = ValidationGroup.Storage.OSS.class) @NotBlank(message = "存储路径不能为空", groups = ValidationGroup.Storage.Local.class) private String bucketName; /** - * 域名 + * 域名/访问路径 */ - @Schema(description = "域名", example = "http://localhost:8000/file") - @Length(max = 255, message = "域名长度不能超过 {max} 个字符") - @NotBlank(message = "域名不能为空") + @Schema(description = "域名/访问路径", example = "http://localhost:8000/file") + @Length(max = 255, message = "域名长度不能超过 {max} 个字符", groups = ValidationGroup.Storage.OSS.class) + @Length(max = 255, message = "访问路径长度不能超过 {max} 个字符", groups = ValidationGroup.Storage.Local.class) + @NotBlank(message = "访问路径不能为空", groups = ValidationGroup.Storage.Local.class) private String domain; /** @@ -119,16 +122,15 @@ public class StorageReq implements Serializable { @Length(max = 200, message = "描述长度不能超过 {max} 个字符") private String description; - /** - * 是否为默认存储 - */ - @Schema(description = "是否为默认存储", example = "true") - @NotNull(message = "是否为默认存储不能为空") - private Boolean isDefault; - /** * 状态 */ @Schema(description = "状态", example = "1") private DisEnableStatusEnum status; + + /** + * 是否为默认存储 + */ + @JsonIgnore + private Boolean isDefault; } \ No newline at end of file diff --git a/continew-module-system/src/main/java/top/continew/admin/system/model/resp/StorageResp.java b/continew-module-system/src/main/java/top/continew/admin/system/model/resp/StorageResp.java index 439b15bf..15501b3e 100644 --- a/continew-module-system/src/main/java/top/continew/admin/system/model/resp/StorageResp.java +++ b/continew-module-system/src/main/java/top/continew/admin/system/model/resp/StorageResp.java @@ -63,32 +63,32 @@ public class StorageResp extends BaseDetailResp { private StorageTypeEnum type; /** - * 访问密钥 + * Access Key */ - @Schema(description = "访问密钥", example = "") + @Schema(description = "Access Key", example = "") private String accessKey; /** - * 私有密钥 + * Secret Key */ - @Schema(description = "私有密钥", example = "") + @Schema(description = "Secret Key", example = "") @JsonMask(left = 4, right = 3) private String secretKey; /** - * 终端节点 + * Endpoint */ - @Schema(description = "终端节点", example = "") + @Schema(description = "Endpoint", example = "") private String endpoint; /** - * 桶名称 + * Bucket/存储路径 */ - @Schema(description = "桶名称", example = "C:/continew-admin/data/file/") + @Schema(description = "Bucket/存储路径", example = "C:/continew-admin/data/file/") private String bucketName; /** - * 域名 + * 域名/访问路径 */ @Schema(description = "域名", example = "http://localhost:8000/file") private String domain; diff --git a/continew-module-system/src/main/java/top/continew/admin/system/service/StorageService.java b/continew-module-system/src/main/java/top/continew/admin/system/service/StorageService.java index 1da2bbe7..1a6467f4 100644 --- a/continew-module-system/src/main/java/top/continew/admin/system/service/StorageService.java +++ b/continew-module-system/src/main/java/top/continew/admin/system/service/StorageService.java @@ -16,6 +16,7 @@ package top.continew.admin.system.service; +import top.continew.admin.common.model.req.CommonStatusUpdateReq; import top.continew.admin.system.model.entity.StorageDO; import top.continew.admin.system.model.query.StorageQuery; import top.continew.admin.system.model.req.StorageReq; @@ -31,6 +32,21 @@ import top.continew.starter.extension.crud.service.BaseService; */ public interface StorageService extends BaseService, IService { + /** + * 修改状态 + * + * @param req 状态信息 + * @param id ID + */ + void updateStatus(CommonStatusUpdateReq req, Long id); + + /** + * 设置默认存储 + * + * @param id ID + */ + void setDefault(Long id); + /** * 查询默认存储 * diff --git a/continew-module-system/src/main/java/top/continew/admin/system/service/impl/StorageServiceImpl.java b/continew-module-system/src/main/java/top/continew/admin/system/service/impl/StorageServiceImpl.java index 3aa01447..ccbfea20 100644 --- a/continew-module-system/src/main/java/top/continew/admin/system/service/impl/StorageServiceImpl.java +++ b/continew-module-system/src/main/java/top/continew/admin/system/service/impl/StorageServiceImpl.java @@ -27,7 +27,9 @@ import org.dromara.x.file.storage.core.FileStorageService; import org.dromara.x.file.storage.core.FileStorageServiceBuilder; import org.dromara.x.file.storage.core.platform.FileStorage; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; import top.continew.admin.common.enums.DisEnableStatusEnum; +import top.continew.admin.common.model.req.CommonStatusUpdateReq; import top.continew.admin.common.util.SecureUtils; import top.continew.admin.system.enums.StorageTypeEnum; import top.continew.admin.system.mapper.StorageMapper; @@ -67,10 +69,13 @@ public class StorageServiceImpl extends BaseServiceImpl 0, "所选存储存在文件关联,请删除文件后重试"); List storageList = baseMapper.lambdaQuery().in(StorageDO::getId, ids).list(); storageList.forEach(s -> { - CheckUtils.throwIfEqual(Boolean.TRUE, s.getIsDefault(), "[{}] 是默认存储,不允许禁用", s.getName()); + CheckUtils.throwIfEqual(Boolean.TRUE, s.getIsDefault(), "[{}] 是默认存储,不允许删除", s.getName()); // 卸载启用状态的存储 if (DisEnableStatusEnum.ENABLE.equals(s.getStatus())) { this.unload(BeanUtil.copyProperties(s, StorageReq.class)); @@ -111,6 +112,43 @@ public class StorageServiceImpl extends BaseServiceImpl { + + @Operation(summary = "修改状态", description = "修改状态") + @Parameter(name = "id", description = "ID", example = "1", in = ParameterIn.PATH) + @SaCheckPermission("system:storage:updateStatus") + @PutMapping({"/{id}/status"}) + public void updateStatus(@Validated @RequestBody CommonStatusUpdateReq req, @PathVariable("id") Long id) { + baseService.updateStatus(req, id); + } + + @Operation(summary = "设为默认存储", description = "设为默认存储") + @Parameter(name = "id", description = "ID", example = "1", in = ParameterIn.PATH) + @SaCheckPermission("system:storage:setDefault") + @PutMapping({"/{id}/default"}) + public void setDefault(@PathVariable("id") Long id) { + baseService.setDefault(id); + } } \ No newline at end of file diff --git a/continew-webapi/src/main/resources/db/changelog/mysql/main_data.sql b/continew-webapi/src/main/resources/db/changelog/mysql/main_data.sql index d571089f..c6e826e0 100644 --- a/continew-webapi/src/main/resources/db/changelog/mysql/main_data.sql +++ b/continew-webapi/src/main/resources/db/changelog/mysql/main_data.sql @@ -77,6 +77,8 @@ VALUES (1113, '新增', 1110, 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'system:storage:add', 3, 1, 1, NOW()), (1114, '修改', 1110, 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'system:storage:update', 4, 1, 1, NOW()), (1115, '删除', 1110, 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'system:storage:delete', 5, 1, 1, NOW()), +(1116, '修改状态', 1110, 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'system:storage:updateStatus', 6, 1, 1, NOW()), +(1117, '设为默认存储', 1110, 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'system:storage:setDefault', 7, 1, 1, NOW()), ( 1180, '终端管理', 1000, 2, '/system/client', 'SystemClient', 'system/client/index', NULL, 'mobile', b'0', b'0', b'0', NULL, 9, 1, 1, NOW()), (1181, '列表', 1180, 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'system:client:list', 1, 1, 1, NOW()), @@ -244,8 +246,8 @@ INSERT INTO `sys_role_dept` (`role_id`, `dept_id`) VALUES (547888897925840927, 5 INSERT INTO `sys_storage` (`id`, `name`, `code`, `type`, `access_key`, `secret_key`, `endpoint`, `bucket_name`, `domain`, `description`, `is_default`, `sort`, `status`, `create_user`, `create_time`) VALUES -(1, '开发环境', 'local_dev', 2, NULL, NULL, NULL, 'C:/continew-admin/data/file/', 'http://localhost:8000/file', '本地存储', b'1', 1, 1, 1, NOW()), -(2, '生产环境', 'local_prod', 2, NULL, NULL, NULL, '../data/file/', 'http://api.continew.top/file', '本地存储', b'0', 2, 2, 1, NOW()); +(1, '开发环境', 'local_dev', 1, NULL, NULL, NULL, 'C:/continew-admin/data/file/', 'http://localhost:8000/file', '本地存储', b'1', 1, 1, 1, NOW()), +(2, '生产环境', 'local_prod', 1, NULL, NULL, NULL, '../data/file/', 'http://api.continew.top/file', '本地存储', b'0', 2, 2, 1, NOW()); -- 初始化终端数据 INSERT INTO `sys_client` diff --git a/continew-webapi/src/main/resources/db/changelog/mysql/main_table.sql b/continew-webapi/src/main/resources/db/changelog/mysql/main_table.sql index a7ce15ff..bfdd19e1 100644 --- a/continew-webapi/src/main/resources/db/changelog/mysql/main_table.sql +++ b/continew-webapi/src/main/resources/db/changelog/mysql/main_table.sql @@ -256,11 +256,11 @@ CREATE TABLE IF NOT EXISTS `sys_storage` ( `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID', `name` varchar(100) NOT NULL COMMENT '名称', `code` varchar(30) NOT NULL COMMENT '编码', - `type` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '类型(1:兼容S3协议存储;2:本地存储)', - `access_key` varchar(255) DEFAULT NULL COMMENT 'Access Key(访问密钥)', - `secret_key` varchar(255) DEFAULT NULL COMMENT 'Secret Key(私有密钥)', - `endpoint` varchar(255) DEFAULT NULL COMMENT 'Endpoint(终端节点)', - `bucket_name` varchar(255) DEFAULT NULL COMMENT '桶名称', + `type` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '类型(1:本地存储;2:对象存储)', + `access_key` varchar(255) DEFAULT NULL COMMENT 'Access Key', + `secret_key` varchar(255) DEFAULT NULL COMMENT 'Secret Key', + `endpoint` varchar(255) DEFAULT NULL COMMENT 'Endpoint', + `bucket_name` varchar(255) DEFAULT NULL COMMENT 'Bucket', `domain` varchar(255) NOT NULL DEFAULT '' COMMENT '域名', `description` varchar(200) DEFAULT NULL COMMENT '描述', `is_default` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否为默认存储', diff --git a/continew-webapi/src/main/resources/db/changelog/postgresql/main_data.sql b/continew-webapi/src/main/resources/db/changelog/postgresql/main_data.sql index 0966dfef..3b731609 100644 --- a/continew-webapi/src/main/resources/db/changelog/postgresql/main_data.sql +++ b/continew-webapi/src/main/resources/db/changelog/postgresql/main_data.sql @@ -77,6 +77,8 @@ VALUES (1113, '新增', 1110, 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'system:storage:add', 3, 1, 1, NOW()), (1114, '修改', 1110, 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'system:storage:update', 4, 1, 1, NOW()), (1115, '删除', 1110, 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'system:storage:delete', 5, 1, 1, NOW()), +(1116, '修改状态', 1110, 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'system:storage:updateStatus', 6, 1, 1, NOW()), +(1117, '设为默认存储', 1110, 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'system:storage:setDefault', 7, 1, 1, NOW()), ( 1180, '终端管理', 1000, 2, '/system/client', 'SystemClient', 'system/client/index', NULL, 'mobile', false, false, false, NULL, 9, 1, 1, NOW()), (1181, '列表', 1180, 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'system:client:list', 1, 1, 1, NOW()), @@ -244,8 +246,8 @@ INSERT INTO "sys_role_dept" ("role_id", "dept_id") VALUES (547888897925840927, 5 INSERT INTO "sys_storage" ("id", "name", "code", "type", "access_key", "secret_key", "endpoint", "bucket_name", "domain", "description", "is_default", "sort", "status", "create_user", "create_time") VALUES -(1, '开发环境', 'local_dev', 2, NULL, NULL, NULL, 'C:/continew-admin/data/file/', 'http://localhost:8000/file', '本地存储', true, 1, 1, 1, NOW()), -(2, '生产环境', 'local_prod', 2, NULL, NULL, NULL, '../data/file/', 'http://api.continew.top/file', '本地存储', false, 2, 2, 1, NOW()); +(1, '开发环境', 'local_dev', 1, NULL, NULL, NULL, 'C:/continew-admin/data/file/', 'http://localhost:8000/file', '本地存储', true, 1, 1, 1, NOW()), +(2, '生产环境', 'local_prod', 1, NULL, NULL, NULL, '../data/file/', 'http://api.continew.top/file', '本地存储', false, 2, 2, 1, NOW()); -- 初始化终端数据 INSERT INTO "sys_client" diff --git a/continew-webapi/src/main/resources/db/changelog/postgresql/main_table.sql b/continew-webapi/src/main/resources/db/changelog/postgresql/main_table.sql index 401dea21..047dc9b1 100644 --- a/continew-webapi/src/main/resources/db/changelog/postgresql/main_table.sql +++ b/continew-webapi/src/main/resources/db/changelog/postgresql/main_table.sql @@ -446,11 +446,11 @@ CREATE INDEX "idx_storage_update_user" ON "sys_storage" ("update_user"); COMMENT ON COLUMN "sys_storage"."id" IS 'ID'; COMMENT ON COLUMN "sys_storage"."name" IS '名称'; COMMENT ON COLUMN "sys_storage"."code" IS '编码'; -COMMENT ON COLUMN "sys_storage"."type" IS '类型(1:兼容S3协议存储;2:本地存储)'; -COMMENT ON COLUMN "sys_storage"."access_key" IS 'Access Key(访问密钥)'; -COMMENT ON COLUMN "sys_storage"."secret_key" IS 'Secret Key(私有密钥)'; -COMMENT ON COLUMN "sys_storage"."endpoint" IS 'Endpoint(终端节点)'; -COMMENT ON COLUMN "sys_storage"."bucket_name" IS '桶名称'; +COMMENT ON COLUMN "sys_storage"."type" IS '类型(1:本地存储;2:对象存储)'; +COMMENT ON COLUMN "sys_storage"."access_key" IS 'Access Key'; +COMMENT ON COLUMN "sys_storage"."secret_key" IS 'Secret Key'; +COMMENT ON COLUMN "sys_storage"."endpoint" IS 'Endpoint'; +COMMENT ON COLUMN "sys_storage"."bucket_name" IS 'Bucket'; COMMENT ON COLUMN "sys_storage"."domain" IS '域名'; COMMENT ON COLUMN "sys_storage"."description" IS '描述'; COMMENT ON COLUMN "sys_storage"."is_default" IS '是否为默认存储';