package model // InboxMember represents an agent assigned to an inbox. // Reference: Chatwoot InboxMember model + P2B M2 spec type InboxMember struct { Base InboxID uint `gorm:"column:inbox_id;not null;index" json:"inbox_id"` UserID uint `gorm:"column:user_id;not null;index" json:"user_id"` Role string `gorm:"column:role;size:50;default:agent" json:"role"` // agent, supervisor AvailabilityStatus string `gorm:"column:availability_status;size:50;default:offline" json:"availability_status"` // online, offline, busy Inbox Inbox `gorm:"foreignKey:InboxID" json:"inbox,omitempty"` User User `gorm:"foreignKey:UserID" json:"user,omitempty"` } func (InboxMember) TableName() string { return "inbox_members" }