Files
gochat/backend/internal/model/team.go
T

19 lines
771 B
Go

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"`
Icon string `gorm:"size:255;default:''" json:"icon"`
IconColor string `gorm:"size:255;default:''" json:"icon_color"`
Account Account `gorm:"foreignKey:AccountID" json:"account,omitempty"`
Members []TeamMember `gorm:"foreignKey:TeamID" json:"members,omitempty"`
}
func (Team) TableName() string { return "teams" }