28 lines
1012 B
Go
28 lines
1012 B
Go
package model
|
|
|
|
import "time"
|
|
|
|
// Profile is the unified-profile shape returned by /profiles/:id. The
|
|
// underlying table is owned by cdp-ingestion (identity-resolution).
|
|
type Profile struct {
|
|
ID string `json:"id"`
|
|
WorkspaceID string `json:"workspace_id"`
|
|
UserID string `json:"user_id,omitempty"`
|
|
AnonymousIDs []string `json:"anonymous_ids,omitempty"`
|
|
Traits map[string]any `json:"traits,omitempty"`
|
|
FirstSeenAt time.Time `json:"first_seen_at"`
|
|
LastSeenAt time.Time `json:"last_seen_at"`
|
|
}
|
|
|
|
// SavedQuery mirrors the saved_queries table.
|
|
type SavedQuery struct {
|
|
ID string `json:"id"`
|
|
WorkspaceID string `json:"workspace_id"`
|
|
OwnerID string `json:"owner_id,omitempty"`
|
|
Name string `json:"name"`
|
|
Kind string `json:"kind"`
|
|
Spec map[string]any `json:"spec"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
}
|