diff --git a/ExpressAPI/src/models/Model.ts b/ExpressAPI/src/models/Model.ts index 2e742a0918c8a313118a5990c1e844ea2b62f676..fdb06183af1601d1c8065467dc88eaa0d2dbf2b2 100644 --- a/ExpressAPI/src/models/Model.ts +++ b/ExpressAPI/src/models/Model.ts @@ -8,7 +8,7 @@ abstract class Model extends Object { const result = new this(); Object.getOwnPropertyNames(obj).forEach(property => { - if (result.hasOwnProperty(property)) { + if ( result.hasOwnProperty(property) ) { (result as any)[property] = obj[property]; } }); diff --git a/ExpressAPI/src/models/User.ts b/ExpressAPI/src/models/User.ts index d81782da98c5771fceb9db17b02e621361c13843..65e5b37221a5108bb8884fec26deee4fa4bcac32 100644 --- a/ExpressAPI/src/models/User.ts +++ b/ExpressAPI/src/models/User.ts @@ -7,6 +7,8 @@ import db from '../helpers/DatabaseHelper'; class User extends Model { + static tableName: string = 'Users'; + userID: number = null; userFirstName: string = ''; userLastName: string = '';