Files
openaccounting-server/models/user_org.go

13 lines
412 B
Go
Raw Normal View History

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"`
}