feat(files): implement file storage functionality with save, load, and list operations
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user