feat(files): implement file storage functionality with save, load, and list operations

This commit is contained in:
2026-03-30 22:24:18 +02:00
parent 79d8219836
commit 7f2b2b9fee
12 changed files with 676 additions and 33 deletions

View File

@@ -7,12 +7,44 @@ import (
)
type ThoughtMetadata struct {
People []string `json:"people"`
ActionItems []string `json:"action_items"`
DatesMentioned []string `json:"dates_mentioned"`
Topics []string `json:"topics"`
Type string `json:"type"`
Source string `json:"source"`
People []string `json:"people"`
ActionItems []string `json:"action_items"`
DatesMentioned []string `json:"dates_mentioned"`
Topics []string `json:"topics"`
Type string `json:"type"`
Source string `json:"source"`
Attachments []ThoughtAttachment `json:"attachments,omitempty"`
}
type ThoughtAttachment struct {
FileID uuid.UUID `json:"file_id"`
Name string `json:"name"`
MediaType string `json:"media_type"`
Kind string `json:"kind,omitempty"`
SizeBytes int64 `json:"size_bytes"`
SHA256 string `json:"sha256,omitempty"`
}
type StoredFile struct {
ID uuid.UUID `json:"id"`
ThoughtID *uuid.UUID `json:"thought_id,omitempty"`
ProjectID *uuid.UUID `json:"project_id,omitempty"`
Name string `json:"name"`
MediaType string `json:"media_type"`
Kind string `json:"kind"`
Encoding string `json:"encoding"`
SizeBytes int64 `json:"size_bytes"`
SHA256 string `json:"sha256"`
Content []byte `json:"-"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
type StoredFileFilter struct {
Limit int
ThoughtID *uuid.UUID
ProjectID *uuid.UUID
Kind string
}
type Thought struct {