Adding Insert(), GetByEmail(), Update() UserModel's methods.
Some checks failed
Deploy Greenlight API / deploy (push) Failing after 51s
Some checks failed
Deploy Greenlight API / deploy (push) Failing after 51s
This commit is contained in:
@@ -15,11 +15,13 @@ var (
|
||||
// Models : Wraps the MovieModel. We'll add other models to this, like a UserModel and PermissionModel, as our build progresses.
|
||||
type Models struct {
|
||||
Movies MovieModel
|
||||
Users UserModel
|
||||
}
|
||||
|
||||
// NewModels : For ease of use, this method returns a Models struct containing the initialized MovieModel.
|
||||
func NewModels(db *sql.DB) Models {
|
||||
return Models{
|
||||
Movies: MovieModel{DB: db},
|
||||
Users: UserModel{DB: db},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user