Discover Packages
github.com/Plankiton/SexPistol
Cartridge
Models
package
Version:
v0.3.3
Opens a new window with list of versions in this module.
Published: Jul 23, 2021
License: MPL-2.0
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
type Address struct {
SexDB.Model
Street string `json:"street,omitempty"`
State string `json:"state,omitempty"`
Number string `json:"number,omitempty"`
Code string `json:"cep,omitempty"`
City string `json:"city,omitempty"`
Neigh string `json:"neighborhood,omitempty"`
Compl string `json:"complement,omitempty" gorm:"default:NULL"`
}
type Event struct {
SexDB.Model
Name string `json:"name,omitempty"`
Type string `json:"type,omitempty"`
AddrId uint `json:"-"`
Addr Address `json:"address,omitempty" gorm:"-"`
BeginAt time .Time `json:"begin,omitempty"`
EndAt time .Time `json:"end,omitempty"`
}
type LinkRoleUser struct {
Roles []*Role `json:"roles,omitempty" gorm:"many2many:user_roles"`
}
type Role struct {
SexDB.Model
Name string `json:"name,omitempty" gorm:"unique"`
Desc string `json:"desc,omitempty" gorm:"unique"`
Users []*User `json:"roles,omitempty" gorm:"many2many:user_roles"`
}
type Token struct {
SexDB.Model
ID string `json:"token,omitempty" gorm:"PrimaryKey, NOT NULL"`
UserId uint `json:"-" gorm:"index,NOT NULL"`
User User `json:"user,omitempty" gorm:"foreignKey:UserId"`
}
type User struct {
SexDB.Model
Email string `json:"email,omitempty" gorm:"unique,default:null"`
Name string `json:"name,omitempty" gorm:"index"`
Born time .Time `json:"born_date,omitempty" gorm:"index"`
Genre string `json:"genre,omitempty" gorm:"default:'male'"`
PassHash string `json:"-"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.