updates on the ai agents and time series prediction and updates on the api to
This commit is contained in:
@@ -3,9 +3,22 @@ package models
|
||||
import "time"
|
||||
|
||||
type AgentDecision struct {
|
||||
ID uint64 `gorm:"primaryKey"`
|
||||
DecisionType string `gorm:"size:50;index"`
|
||||
BookingID *uint64 `gorm:"index"`
|
||||
ID uint64 `gorm:"primaryKey"`
|
||||
DecisionType string `gorm:"size:50;index"`
|
||||
BookingID *uint64 `gorm:"index"`
|
||||
// TenantID scopes retrieval. Without it, similarity search would return one
|
||||
// client's operational history as precedent for a decision about another —
|
||||
// and because the engine feeds that precedent to the model, one tenant's
|
||||
// past would shape another tenant's dispatch.
|
||||
//
|
||||
// Nullable because the engine does not always know the tenant (a B2C
|
||||
// booking carries a nil tenantid by design). A NULL row is recallable only
|
||||
// by a NULL-tenant query, never by a tenant's own — the safer default,
|
||||
// given console logins are already unscoped when tenantid is NULL.
|
||||
//
|
||||
// Added before the table filled on purpose: adding it afterwards is a
|
||||
// backfill with no way to attribute the rows already there.
|
||||
TenantID *uint64 `gorm:"column:tenantid;index"`
|
||||
Context string `gorm:"type:jsonb"`
|
||||
Decision string `gorm:"type:jsonb"`
|
||||
Reasoning string `gorm:"type:text"`
|
||||
|
||||
Reference in New Issue
Block a user