ch14.5
This commit is contained in:
@@ -18,6 +18,12 @@ type User struct {
|
||||
Created time.Time
|
||||
}
|
||||
|
||||
type UserModelInterface interface {
|
||||
Insert(name, email, password string) error
|
||||
Authenticate(email, password string) (int, error)
|
||||
Exists(id int) (bool, error)
|
||||
}
|
||||
|
||||
type UserModel struct {
|
||||
DB *sql.DB
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user