Compare commits

..

2 Commits

2 changed files with 7 additions and 1 deletions

View File

@@ -192,10 +192,14 @@ type UsersQuery struct {
} }
type GCUser struct { type GCUser struct {
Id string `json:"id" gorm:"primaryKey"` Id string `json:"id" gorm:"primaryKey;foreignKey"`
Name string `json:"name"` Name string `json:"name"`
Email string `json:"email"` Email string `json:"email"`
State string `json:"state"` State string `json:"state"`
Username string `json:"username"` Username string `json:"username"`
AcdAutoAnswer bool `json:"acdAutoAnswer"` AcdAutoAnswer bool `json:"acdAutoAnswer"`
} }
func (GCUser) TableName() string {
return "gc_users"
}

View File

@@ -23,6 +23,8 @@ type DBParticipant struct {
WrapupRequired *bool WrapupRequired *bool
Sessions []DBSession `gorm:"foreignKey:ParticipantId;references:Id"` Sessions []DBSession `gorm:"foreignKey:ParticipantId;references:Id"`
Calls []DBCall `gorm:"foreignKey:ParticipantId;referencesId`
User GCUser `gorm:"foreignKey:UserId;references:Id`
} }
func (DBParticipant) TableName() string { func (DBParticipant) TableName() string {