This commit is contained in:
Eden Kirin
2023-10-26 00:25:19 +02:00
parent 7024cd0de9
commit da3deedb0c
2 changed files with 12 additions and 1 deletions

View File

@ -1,6 +1,8 @@
package models
import "time"
import (
"time"
)
type User struct {
Id string `gorm:"type(uuid);unique"`
@ -16,3 +18,9 @@ type User struct {
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
// }