Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // DB is the application business database DB *gorm.DB )
Functions ¶
func CreateAdmin ¶
CreateAdmin creates an admin based on the models
Types ¶
type Employee ¶
type Employee struct { gorm.Model Name string Languages []*Language `gorm:"many2many:employee_languages;"` HomeAddresses []HomeAddress }
Employee has and belongs to many languages, use `employee_languages` as join table
type HomeAddress ¶
HomeAddress as a many to one relationship with Employee
Click to show internal directories.
Click to hide internal directories.