Discover Packages
github.com/Cardsity/management-api
db
models
package
Version:
v0.0.0-...-0f828a4
Opens a new window with list of versions in this module.
Published: Jan 6, 2021
License: AGPL-3.0
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
type BlackCard struct {
ID uint `gorm:"primarykey"`
DeckID uint
Deck Deck `gorm:"constraint:OnDelete:CASCADE;not null"`
Text string `gorm:"not null"`
Blanks uint `gorm:"not null"`
}
Sets the blank count before saving a black card.
const (
Developer Role = "developer"
Contributor Role = "contributor"
Supporter Role = "supporter"
)
type SessionToken struct {
ID uint `gorm:"primarykey"`
Token string `gorm:"index;unique;not null"`
ValidUntil time .Time `gorm:"not null"`
UserID uint
User User `gorm:"constraint:OnDelete:CASCADE;not null"`
}
type User struct {
ID uint `gorm:"primarykey"`
Username string `gorm:"index;unique;not null"`
Password string `gorm:"not null"`
Admin bool
Role Role `gorm:"not null"`
SessionTokens []SessionToken
Decks []Deck `gorm:"foreignKey:OwnerID"`
}
Compares the supplied password with the password of the user instance.
type WhiteCard struct {
ID uint `gorm:"primarykey"`
DeckID uint
Deck Deck `gorm:"constraint:OnDelete:CASCADE;not null"`
Text string `gorm:"not null"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.