20 lines
665 B
Plaintext
20 lines
665 B
Plaintext
package model
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
// InboxMember represents an agent assigned to an inbox.
|
|
// Reference: Chatwoot InboxMember model + P2B M2 spec
|
|
type InboxMember struct {
|
|
ID uint `gorm:"primaryKey" json:"id"`
|
|
InboxID uint `gorm:"not null;index" json:"inbox_id"`
|
|
UserID uint `gorm:"not null;index" json:"user_id"`
|
|
CreatedAt time.Time `gorm:"autoCreateTime" json:"created_at"`
|
|
UpdatedAt time.Time `gorm:"autoUpdateTime" json:"updated_at"`
|
|
|
|
Inbox Inbox `gorm:"foreignKey:InboxID" json:"inbox,omitempty"`
|
|
User User `gorm:"foreignKey:UserID" json:"user,omitempty"`
|
|
}
|
|
|
|
func (InboxMember) TableName() string { return "inbox_members" } |