V3 version with backward comp

This commit is contained in:
m
2026-07-28 18:12:56 +02:00
parent 7713835739
commit bd6e7c38f9
48 changed files with 3685 additions and 1344 deletions
+31 -16
View File
@@ -1,24 +1,39 @@
package model
import "time"
type Tag struct {
ID string `json:"id"`
Name string `json:"name"`
TagType string `json:"tagType"`
ID string `json:"id"`
Name string `json:"name"`
}
type File struct {
ID string `json:"id"`
Name string `json:"name"`
MimeType string `json:"mimeType"`
Size int64 `json:"size"`
StorageKey string `json:"-"`
Checksum string `json:"-"`
OcrText string `json:"ocrText,omitempty"`
Tags []Tag `json:"tags"`
IsFolder bool `json:"isFolder"`
ParentFileID string `json:"parentFileId,omitempty"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
type Resource struct {
ID string `json:"id"`
Name string `json:"name"`
MimeType string `json:"mimeType"`
Size int64 `json:"size"`
StorageKey string `json:"-"`
Checksum string `json:"-"`
OcrText string `json:"ocrText,omitempty"`
Tags []Tag `json:"tags"`
IsFolder bool `json:"isFolder"`
ParentResourceID string `json:"parentResourceId,omitempty"`
OwnerID string `json:"ownerId"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
}
type Variant struct {
ID string `json:"id"`
ResourceID string `json:"resourceId"`
VariantType string `json:"variantType"`
PageNumber int `json:"pageNumber"`
Width int `json:"width"`
Height int `json:"height"`
StorageKey string `json:"-"`
MimeType string `json:"mimeType"`
GeneratedBy string `json:"generatedBy"`
CreatedAt string `json:"createdAt"`
}
type UploadResult struct {