feat(api): test doc upload
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
package schema
|
||||
|
||||
import (
|
||||
"net/url"
|
||||
"time"
|
||||
)
|
||||
|
||||
type DocFolder struct {
|
||||
ID string `json:"id" oai:"description=文件夹ID"`
|
||||
Name string `json:"name" oai:"description=文件夹名称"`
|
||||
CreatedAt time.Time `json:"created_at" oai:"description=创建时间"`
|
||||
UpdatedAt time.Time `json:"updated_at" oai:"description=更新时间"`
|
||||
ID string `json:"id" oai:"description=文件夹ID"`
|
||||
Name string `json:"name" oai:"description=文件夹名称"`
|
||||
IsDefault bool `json:"is_default,omitempty" oai:"description=是否默认分组"`
|
||||
CreatedAt time.Time `json:"created_at" oai:"description=创建时间"`
|
||||
UpdatedAt time.Time `json:"updated_at" oai:"description=更新时间"`
|
||||
}
|
||||
|
||||
type DocFolderID struct {
|
||||
@@ -38,7 +38,7 @@ type DocFolderWithChildren struct {
|
||||
type Doc struct {
|
||||
ID string `json:"id" oai:"description=文档ID"`
|
||||
Folder *DocFolder `json:"folder" oai:"description=归属文件夹信息"`
|
||||
PresignedURL *url.URL `json:"presigned_url" oai:"description=文档预签名下载URL(临时下载URL)"`
|
||||
PresignedURL string `json:"presigned_url" oai:"description=文档预签名下载URL(临时下载URL)"`
|
||||
UploadedAt time.Time `json:"uploaded_at" oai:"description=上传时间"`
|
||||
CreatedAt time.Time `json:"created_at" oai:"description=创建时间"`
|
||||
UpdatedAt time.Time `json:"updated_at" oai:"description=更新时间"`
|
||||
@@ -76,7 +76,7 @@ type DocsBatchDelete struct {
|
||||
|
||||
type DocsBatchUpdate struct {
|
||||
IDs []string `json:"ids" validate:"required" oai:"description=批量选择文件ID列表"`
|
||||
FolderID string `json:"folder_id" validate:"required" oai:"description=更新归属文件夹ID"`
|
||||
FolderID *string `json:"folder_id" oai:"description=更新归属文件夹ID"`
|
||||
}
|
||||
|
||||
type DocBatchResult struct {
|
||||
@@ -92,6 +92,6 @@ type CreateUploadURL struct {
|
||||
}
|
||||
|
||||
type UploadURL struct {
|
||||
URL url.URL `json:"url" oai:"description=生成的预签名上传URL"`
|
||||
ObjectName string `json:"object_name" oai:"description=上传文件名"`
|
||||
URL string `json:"url" oai:"description=生成的预签名上传URL"`
|
||||
ObjectName string `json:"object_name" oai:"description=上传文件名"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user