package
Version:
v0.0.0-...-ff5003d
Opens a new window with list of versions in this module.
Published: Aug 17, 2020
License: MIT
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
¶
type Base struct {
ID string `json:"id" gorm:"type:uuid;primary_key"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
DeletedAt time.Time `json:"deletedAt" sql:"index"`
}
type User struct {
Base
Name string `json:"name" gorm:"type:varchar(255)"`
Email string `json:"email" gorm:"type:varchar(255);unique_index"`
Password string `json:"-" gorm:"type:varchar(255)"`
Token string `json:"token" gorm:"type:varchar(255);unique_index"`
}
User - Modelo do usuário
NewUser - Retorna uma nova intância de um usuário
Prepare - Prepara o objeto usuário e faz as validações necessárias
Source Files
¶
Click to show internal directories.
Click to hide internal directories.