package
Version:
v0.0.0-...-d3dc774
Opens a new window with list of versions in this module.
Published: Nov 26, 2017
License: MIT
Opens a new window with license information.
Imports: 0
Opens a new window with list of imports.
Imported by: 3
Opens a new window with list of known importers.
Documentation
¶
type Permission struct {
ID int `goedb:"pk,autoincrement"`
Name string `goedb:"unique"`
Description string
}
type PermissionsGroup struct {
Role Role `goedb:"pk,fk=Role(ID)"`
Permission Permission `goedb:"pk,fk=Permission(ID)"`
}
TODO: Check how goedb works with multiple PKs
type Role struct {
ID int `goedb:"pk,autoincrement"`
Name string `goedb:"unique"`
Description string
Permissions []Permission `goedb:"ignore"`
}
type User struct {
ID int `goedb:"pk,autoincrement"`
Email string `goedb:"unique"`
Password string
Role Role `goedb:"fk=Role(ID)"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.