package models import ( "context" "time" ) // Session represents a server-held user session. type Session struct { Base ID string `json:"id"` UserID string `json:"userId"` CreatedAt time.Time `json:"createdAt"` LastActiveAt time.Time `json:"lastActiveAt"` ExpiresAt *time.Time `json:"expiresAt,omitempty"` } // User returns the user who owns this session. func (s *Session) User(ctx context.Context) (*User, error) { return s.LookupUser(ctx, s.UserID) }