summaryrefslogtreecommitdiff
path: root/models
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2017-04-10 20:03:57 +0200
committerschneefux <schneefux+commit@schneefux.xyz>2017-04-10 20:04:29 +0200
commit6a951df4a98d808f970ecd290630a15456a66e16 (patch)
treefe4bcf3eae43f3364fe5028f73d47c2f80152379 /models
parentb9383ef158929bdbb42a15bc48c43aef9bdb74aa (diff)
downloadorm-6a951df4a98d808f970ecd290630a15456a66e16.tar.gz
orm-6a951df4a98d808f970ecd290630a15456a66e16.zip
add builds table
Diffstat (limited to 'models')
-rw-r--r--models/build.js45
-rw-r--r--models/global_point.js2
-rw-r--r--models/player_point.js2
-rw-r--r--models/skill_tier.js29
4 files changed, 76 insertions, 2 deletions
diff --git a/models/build.js b/models/build.js
new file mode 100644
index 0000000..b789606
--- /dev/null
+++ b/models/build.js
@@ -0,0 +1,45 @@
+/* jshint indent: 2 */
+
+module.exports = function(sequelize, DataTypes) {
+ return sequelize.define('build', {
+ id: {
+ type: DataTypes.INTEGER(10).UNSIGNED,
+ allowNull: false,
+ primaryKey: true,
+ autoIncrement: true
+ },
+ name: {
+ type: DataTypes.STRING(191),
+ allowNull: false
+ },
+ item_1: {
+ type: DataTypes.STRING(191),
+ allowNull: true
+ },
+ item_2: {
+ type: DataTypes.STRING(191),
+ allowNull: true
+ },
+ item_3: {
+ type: DataTypes.STRING(191),
+ allowNull: true
+ },
+ item_4: {
+ type: DataTypes.STRING(191),
+ allowNull: true
+ },
+ item_5: {
+ type: DataTypes.STRING(191),
+ allowNull: true
+ },
+ item_6: {
+ type: DataTypes.STRING(191),
+ allowNull: true
+ }
+ }, {
+ tableName: 'build',
+ timestamps: false,
+ underscored: true,
+ freezeTableName: true
+ });
+};
diff --git a/models/global_point.js b/models/global_point.js
index 52b6856..632560d 100644
--- a/models/global_point.js
+++ b/models/global_point.js
@@ -34,7 +34,7 @@ module.exports = function(sequelize, DataTypes) {
},
build_id: {
type: DataTypes.BIGINT,
- allowNull: false
+ allowNull: true
},
played: {
type: DataTypes.BIGINT,
diff --git a/models/player_point.js b/models/player_point.js
index 8f6305e..ed9a6b1 100644
--- a/models/player_point.js
+++ b/models/player_point.js
@@ -9,7 +9,7 @@ module.exports = function(sequelize, DataTypes) {
autoIncrement: true
},
player_api_id: {
- type: DataTypes.BIGINT,
+ type: DataTypes.CHAR(36),
allowNull: false
},
played: {
diff --git a/models/skill_tier.js b/models/skill_tier.js
new file mode 100644
index 0000000..f0af0be
--- /dev/null
+++ b/models/skill_tier.js
@@ -0,0 +1,29 @@
+/* jshint indent: 2 */
+
+module.exports = function(sequelize, DataTypes) {
+ return sequelize.define('skill_tier', {
+ id: {
+ type: DataTypes.INTEGER(10).UNSIGNED,
+ allowNull: false,
+ primaryKey: true,
+ autoIncrement: true
+ },
+ name: {
+ type: DataTypes.STRING(191),
+ allowNull: false
+ },
+ start: {
+ type: DataTypes.INTEGER(6),
+ allowNull: false
+ },
+ end: {
+ type: DataTypes.INTEGER(6),
+ allowNull: false
+ }
+ }, {
+ tableName: 'skill_tier',
+ timestamps: false,
+ underscored: true,
+ freezeTableName: true
+ });
+};