- Defined all 8 data models (Page, Widget, Bookmark, Note, TagAssociation, Group, Share, Preferences) - Implemented DynamoDB table creation for all tables with proper schemas - Added GSIs for efficient querying (UserBookmarksIndex, UserNotesIndex, TagItemsIndex, UserSharesIndex) - Comprehensive test coverage for all table schemas - Updated init-db command to create all tables
23 lines
689 B
Go
23 lines
689 B
Go
package models
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
// SearchProvider represents the configured search engine
|
|
type SearchProvider string
|
|
|
|
const (
|
|
SearchProviderGoogle SearchProvider = "google"
|
|
SearchProviderDuckDuckGo SearchProvider = "duckduckgo"
|
|
SearchProviderBing SearchProvider = "bing"
|
|
)
|
|
|
|
// Preferences represents user preferences and settings
|
|
type Preferences struct {
|
|
UserID string `dynamodbav:"user_id" json:"user_id"`
|
|
SearchProvider SearchProvider `dynamodbav:"search_provider" json:"search_provider"`
|
|
Theme *string `dynamodbav:"theme,omitempty" json:"theme,omitempty"`
|
|
UpdatedAt time.Time `dynamodbav:"updated_at" json:"updated_at"`
|
|
}
|