You've already forked openaccounting-server
forked from cybercinch/openaccounting-server
13 lines
412 B
Go
13 lines
412 B
Go
|
|
package models
|
||
|
|
|
||
|
|
// UserOrg represents the relationship between users and organizations
|
||
|
|
type UserOrg struct {
|
||
|
|
ID uint `gorm:"primaryKey;autoIncrement"`
|
||
|
|
UserID []byte `gorm:"column:userId;type:BINARY(16);not null"`
|
||
|
|
OrgID []byte `gorm:"column:orgId;type:BINARY(16);not null"`
|
||
|
|
Admin bool `gorm:"column:admin;default:false"`
|
||
|
|
|
||
|
|
User User `gorm:"foreignKey:UserID"`
|
||
|
|
Org Org `gorm:"foreignKey:OrgID"`
|
||
|
|
}
|