Files
test-iris-web-framework/app/models/user.go
Eden Kirin da3deedb0c Readme
2023-10-26 00:25:19 +02:00

27 lines
518 B
Go

package models
import (
"time"
)
type User struct {
Id string `gorm:"type(uuid);unique"`
Email string `gorm:"unique"`
FirstName string
LastName string
Password string
IsActive bool
CreatedAt time.Time
UpdatedAt time.Time
}
func (u *User) TableName() string {
return "users"
}
// func (u *User) SetPassword(password string) (string, error) {
// secretKey := Config.Application.SecretKey
// bytes, err := bcrypt.GenerateFromPassword([]byte(password), 14)
// return string(bytes), err
// }