Files
gochat/internal/model/account.go
T

19 lines
1.0 KiB
Go

package model
// Account represents a tenant/organization in the system.
type Account struct {
Base
Name string `gorm:"size:255;not null" json:"name"`
Domain string `gorm:"size:255" json:"domain,omitempty"`
Locale string `gorm:"size:10;default:en" json:"locale"`
Timezone string `gorm:"size:50;default:UTC" json:"timezone"`
Active bool `gorm:"default:true" json:"active"`
Status string `gorm:"size:50;default:active" json:"status"`
OnboardingStep string `gorm:"size:100" json:"onboarding_step,omitempty"`
FeatureFlags string `gorm:"type:text" json:"feature_flags,omitempty"` // JSON-encoded feature flags
AutoResolveDuration int `gorm:"default:0" json:"auto_resolve_duration,omitempty"` // days
AgentLimit int `gorm:"default:0" json:"agent_limit,omitempty"` // max agents allowed (0 = unlimited), Chatwoot usage_limits[:agents]
}
func (Account) TableName() string { return "accounts" }