Files
gochat/internal/model/agent_bot_inbox.go.txt
T
2026-06-04 15:44:48 +08:00

20 lines
709 B
Plaintext

package model
import (
"time"
)
// AgentBotInbox represents the join between AgentBot and Inbox.
// Reference: Chatwoot AgentBotInbox model + P2B M2 spec
type AgentBotInbox struct {
ID uint `gorm:"primaryKey" json:"id"`
AgentBotID uint `gorm:"not null;index" json:"agent_bot_id"`
InboxID uint `gorm:"not null;index" json:"inbox_id"`
CreatedAt time.Time `gorm:"autoCreateTime" json:"created_at"`
UpdatedAt time.Time `gorm:"autoUpdateTime" json:"updated_at"`
AgentBot AgentBot `gorm:"foreignKey:AgentBotID" json:"agent_bot,omitempty"`
Inbox Inbox `gorm:"foreignKey:InboxID" json:"inbox,omitempty"`
}
func (AgentBotInbox) TableName() string { return "agent_bot_inboxes" }