You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
513 B
Go
32 lines
513 B
Go
package model
|
|
|
|
import (
|
|
"database/sql"
|
|
"time"
|
|
)
|
|
|
|
type User struct {
|
|
ID int
|
|
Name string
|
|
Email string
|
|
HashedPassword []byte
|
|
CreatedAt time.Time
|
|
UpdatedAt time.Time
|
|
}
|
|
|
|
type UserService struct {
|
|
DB *sql.DB
|
|
}
|
|
|
|
func (u *UserService) Insert(name, email, password string) (int, error) {
|
|
return 0, nil
|
|
}
|
|
|
|
func (u *UserService) Authenticate(email, password string) (int, error) {
|
|
return 0, nil
|
|
}
|
|
|
|
func (u *UserService) Exists(id int) (bool, error) {
|
|
return false, nil
|
|
}
|