- 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
16 lines
477 B
Go
16 lines
477 B
Go
package models
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
// Page represents a tab-based container that holds multiple widgets
|
|
type Page struct {
|
|
ID string `dynamodbav:"page_id" json:"id"`
|
|
UserID string `dynamodbav:"user_id" json:"user_id"`
|
|
Name string `dynamodbav:"name" json:"name"`
|
|
Order int `dynamodbav:"order" json:"order"`
|
|
CreatedAt time.Time `dynamodbav:"created_at" json:"created_at"`
|
|
UpdatedAt time.Time `dynamodbav:"updated_at" json:"updated_at"`
|
|
}
|