package model // Team represents an agent team within an account. // Reference: Chatwoot Team model + P2B M5 spec type Team struct { Base AccountID uint `gorm:"not null;index" json:"account_id"` Name string `gorm:"size:255;not null" json:"name"` Description string `gorm:"type:text" json:"description"` AllowAutoAssignment bool `gorm:"default:true" json:"allow_auto_assignment"` Account Account `gorm:"foreignKey:AccountID" json:"account,omitempty"` Members []TeamMember `gorm:"foreignKey:TeamID" json:"members,omitempty"` } func (Team) TableName() string { return "teams" }