feat: add Model and Controller class, improve structure
This commit is contained in:
parent
b7de4d9614
commit
a86bddf352
10 changed files with 107 additions and 70 deletions
19
model/userModel.js
Normal file
19
model/userModel.js
Normal file
|
@ -0,0 +1,19 @@
|
|||
//------------------------------------------------>
|
||||
// Imports
|
||||
//------------------------------------------------>
|
||||
|
||||
const { Model } = require("../Structures/Classes/Model");
|
||||
|
||||
//------------------------------------------------>
|
||||
// UserModel
|
||||
//------------------------------------------------>
|
||||
|
||||
class UserModel extends Model {
|
||||
initialize() {
|
||||
// The initialize method is required in each instance of the Model class!!!
|
||||
}
|
||||
|
||||
async getUserById() {
|
||||
// Additional classes are optional and can be used to interact with the DB Pool, this.pool!
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue