Files
snippetbox/internal/models/users.go
lbenedar 91f5a63366 ch11.2
2026-03-06 11:48:48 +03:00

31 lines
470 B
Go

package models
import (
"database/sql"
"time"
)
type User struct {
ID int
Name string
Email string
HashedPassword []byte
Created time.Time
}
type UserModel struct {
DB *sql.DB
}
func (m *UserModel) Insert(name, email, password string) error {
return nil
}
func (m *UserModel) Authenticate(email, password string) (int, error) {
return 0, nil
}
func (m *UserModel) Exists(id int) (bool, error) {
return false, nil
}