-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
AGenson
committed
Apr 29, 2018
1 parent
bfb8d71
commit a7b03e5
Showing
13 changed files
with
975 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
|
||
module.exports = { | ||
host: "mysql.example.host", | ||
host: "den1.mysql4.gear.host", | ||
port: "3306", // Default for mysql => 3306 | ||
database: "db_example", | ||
username: "db_user", | ||
password: "db_password" | ||
database: "bddtest", | ||
username: "bddtest", | ||
password: "N8aM_HDHmG" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
"use strict"; | ||
|
||
const Sequelize = require("sequelize"); | ||
|
||
// For more information about Sequelize Data Types : | ||
// http://docs.sequelizejs.com/manual/tutorial/models-definition.html#data-types | ||
|
||
|
||
|
||
module.exports = { | ||
name: "token", | ||
define: { | ||
id: { // id must always exist | ||
type: Sequelize.UUID, // Uses uuidv4 by default (default value is recommended) | ||
primaryKey: true, | ||
defaultValue: Sequelize.UUIDV4 | ||
}, | ||
|
||
token: { | ||
type: Sequelize.TEXT, | ||
allowNull: false | ||
}, | ||
|
||
userId: { | ||
type: Sequelize.UUID, | ||
allowNull: false | ||
} | ||
}, | ||
options: { | ||
timestamps: false | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
"use strict"; | ||
|
||
const Sequelize = require("sequelize"); | ||
|
||
// For more information about Sequelize Data Types : | ||
// http://docs.sequelizejs.com/manual/tutorial/models-definition.html#data-types | ||
|
||
|
||
|
||
module.exports = { | ||
name: "user", | ||
define: { | ||
id: { // id must always exist | ||
type: Sequelize.UUID, // Uses uuidv4 by default (default value is recommended) | ||
primaryKey: true, | ||
defaultValue: Sequelize.UUIDV4 | ||
}, | ||
|
||
username: { | ||
type: Sequelize.STRING(20), | ||
allowNull: false, | ||
unique: true | ||
}, | ||
|
||
password: { | ||
type: Sequelize.TEXT, | ||
allowNull: false | ||
}, | ||
|
||
age: { | ||
type: Sequelize.INTEGER, | ||
allowNull: true | ||
}, | ||
|
||
role: { | ||
type: Sequelize.STRING(10), | ||
allowNull: false, | ||
defaultValue: "USER" | ||
} | ||
}, | ||
options: { | ||
timestamps: false | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,13 @@ | ||
const UserModel = require("./UserModel"); | ||
const TokenModel = require("./TokenModel"); | ||
const Table1Model = require("./Table1Model"); | ||
const Table2Model = require("./Table2Model"); | ||
|
||
|
||
|
||
module.exports = { | ||
User: UserModel, | ||
Token: TokenModel, | ||
Table1: Table1Model, | ||
Table2: Table2Model | ||
}; |
Oops, something went wrong.