cad项目新增封面图,OSS地址去掉环境前缀

This commit is contained in:
lxp
2026-11-04 11:17:24 +08:00
parent 1736266aab
commit 4d7bd685f5
21 changed files with 381 additions and 46 deletions
@@ -15,11 +15,13 @@ public final class CadContracts {
public record CadCreateProjectInput(
@NotBlank @Size(max = 100) String name,
@Size(max = 2000) String description) {}
@Size(max = 2000) String description,
@Size(max = 2048) String coverUrl) {}
public record CadUpdateProjectInput(
@Size(min = 1, max = 100) String name,
@Size(max = 2000) String description) {}
@Size(max = 2000) String description,
@Size(max = 2048) String coverUrl) {}
public record CadUploadInput(
@NotBlank @Size(max = 255) String fileName,
@@ -29,7 +31,7 @@ public final class CadContracts {
public record CadConfirmInput(@NotBlank @Size(max = 32) String uploadCode) {}
public record CadProjectView(
String cadProjectCode, String name, String description, boolean hasDocument,
String cadProjectCode, String name, String description, String coverUrl, boolean hasDocument,
long version, String fileName, long sizeBytes, LocalDateTime savedAt,
LocalDateTime createdAt, LocalDateTime updatedAt) {}
@@ -13,6 +13,9 @@ public class CadProject extends BaseEntity {
private Long ownerUserId;
private String name;
private String description;
/** 平台 OSS 封面保存无环境前缀的相对路径,对外返回完整 URL。 */
private String coverUrl;
/** 环境相对路径,以 /cad-projects/ 开头;访问 OSS 时再补当前环境根目录。 */
private String documentObjectKey;
private String fileName;
private Long sizeBytes;
@@ -12,6 +12,7 @@ public class CadProjectUpload extends BaseEntity {
private String uploadCode;
private Long cadProjectId;
private Long expectedVersion;
/** 环境相对路径,不保存 Bucket、域名或环境根目录。 */
private String objectKey;
private String fileName;
private Long sizeBytes;