package
Version:
v0.0.0-...-00ec2d6
Opens a new window with list of versions in this module.
Published: Jun 12, 2021
License: Apache-2.0
Opens a new window with license information.
Imports: 7
Opens a new window with list of imports.
Imported by: 2
Opens a new window with list of known importers.
Documentation
¶
type Account struct {
AccountId string `json:"accountId" gorm:"column:account_id;not null"`
AccountName string `json:"accountName" gorm:"column:account_name;not null" binding:"required" validate:"min=1,max=32"`
Password string `json:"password" gorm:"column:password;not null" binding:"required" validate:"min=5,max=128"`
}
type AccountInfo struct {
AccountId string `json:"id"`
AccountName string `json:"username"`
Password string `json:"password"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
}
type BaseModel struct {
Id uint64 `gorm:"primary_key;AUTO_INCREMENT;column:id" json:"-"`
CreatedAt time.Time `gorm:"column:createdAt" json:"-"`
UpdatedAt time.Time `gorm:"column:updatedAt" json:"-"`
DeletedAt *time.Time `gorm:"column:deletedAt" sql:"index" json:"-"`
}
type DataBase struct {
MyDB *gorm.DB
}
type Token struct {
Token string `json:"token"`
}
Token-令牌.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.