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 := common.Config.Application.SecretKey // bytes, err := bcrypt.GenerateFromPassword([]byte(password+secretKey), 14) // return string(bytes), err // }