data layer
This commit is contained in:
27
data-layer/api/internal/model/profile.go
Normal file
27
data-layer/api/internal/model/profile.go
Normal file
@@ -0,0 +1,27 @@
|
||||
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"`
|
||||
}
|
||||
Reference in New Issue
Block a user