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

16 lines
583 B
Go

package model
// TeamMember represents an agent assigned to a team.
// Reference: Chatwoot TeamMember model + P2B M5 spec
type TeamMember struct {
Base
TeamID uint `gorm:"not null;index" json:"team_id"`
UserID uint `gorm:"not null;index" json:"user_id"`
AvailabilityStatus string `gorm:"size:50;default:offline" json:"availability_status"` // online, offline, busy
Team Team `gorm:"foreignKey:TeamID" json:"team,omitempty"`
User User `gorm:"foreignKey:UserID" json:"user,omitempty"`
}
func (TeamMember) TableName() string { return "team_members" }