38 lines
850 B
Go
38 lines
850 B
Go
package models
|
|
|
|
type User struct {
|
|
BaseModel
|
|
Username string `json:"username"`
|
|
Password string `json:"-"`
|
|
Email string `json:"email"`
|
|
Avatar string `json:"avatar"`
|
|
IsActive bool `json:"isActive" gorm:"default:false"`
|
|
// CompanyID uint `json:"companyId"`
|
|
// Company Company
|
|
Companies []Company `gorm:"many2many:user_companies;"`
|
|
LoginAttempts int `gorm:"default:0"`
|
|
}
|
|
|
|
type LoginRequest struct {
|
|
Email string `json:"email"`
|
|
Password string `json:"password"`
|
|
}
|
|
|
|
type ResetPasswordRequest struct {
|
|
Email string `json:"email"`
|
|
}
|
|
type UpdatePasswordRequest struct {
|
|
Password string `json:"password"`
|
|
Token string `json:"token"`
|
|
}
|
|
|
|
func (User) Update() (bool, error) {
|
|
return false, nil
|
|
}
|
|
func (User) Create() (bool, error) {
|
|
return false, nil
|
|
}
|
|
func (User) Delete() (bool, error) {
|
|
return false, nil
|
|
}
|