Complete tasks 3.2-3.3: Data models and DynamoDB table schemas
- 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
This commit is contained in:
20
internal/models/bookmark.go
Normal file
20
internal/models/bookmark.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// Bookmark represents a link with title, URL, and optional grouping
|
||||
type Bookmark struct {
|
||||
ID string `dynamodbav:"bookmark_id" json:"id"`
|
||||
WidgetID string `dynamodbav:"widget_id" json:"widget_id"`
|
||||
UserID string `dynamodbav:"user_id" json:"user_id"`
|
||||
Title string `dynamodbav:"title" json:"title"`
|
||||
URL string `dynamodbav:"url" json:"url"`
|
||||
GroupID *string `dynamodbav:"group_id,omitempty" json:"group_id,omitempty"`
|
||||
Order int `dynamodbav:"order" json:"order"`
|
||||
FaviconURL *string `dynamodbav:"favicon_url,omitempty" json:"favicon_url,omitempty"`
|
||||
CreatedAt time.Time `dynamodbav:"created_at" json:"created_at"`
|
||||
UpdatedAt time.Time `dynamodbav:"updated_at" json:"updated_at"`
|
||||
Version int `dynamodbav:"version" json:"version"`
|
||||
}
|
||||
Reference in New Issue
Block a user