From e9b8303212f1e463ad6927e1b3df404a4358db96 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sun, 5 Apr 2020 21:50:05 -0700 Subject: accounts table --- db/models/accounts.js | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 db/models/accounts.js (limited to 'db/models') diff --git a/db/models/accounts.js b/db/models/accounts.js new file mode 100644 index 00000000..57c9e82a --- /dev/null +++ b/db/models/accounts.js @@ -0,0 +1,66 @@ +const { DataTypes } = require('sequelize'); + +const attributes = { + id: { + type: DataTypes.INTEGER(11), + allowNull: false, + defaultValue: null, + primaryKey: true, + autoIncrement: true, + comment: null, + field: "id" + }, + user_id: { + type: DataTypes.INTEGER(11), + allowNull: true, + defaultValue: null, + primaryKey: false, + autoIncrement: false, + comment: null, + field: "user_id" + }, + createdAt: { + type: DataTypes.DATE, + allowNull: false, + defaultValue: null, + primaryKey: false, + autoIncrement: false, + comment: null, + field: "createdAt" + }, + updatedAt: { + type: DataTypes.DATE, + allowNull: false, + defaultValue: null, + primaryKey: false, + autoIncrement: false, + comment: null, + field: "updatedAt" + }, + asset: { + type: DataTypes.STRING(255), + allowNull: true, + defaultValue: null, + primaryKey: false, + autoIncrement: false, + comment: null, + field: "asset" + }, + balance: { + type: DataTypes.DOUBLE, + allowNull: true, + defaultValue: null, + primaryKey: false, + autoIncrement: false, + comment: null, + field: "balance" + }, +}; + +const options = { + tableName: "accounts", + comment: "", + indexes: [] +}; + +db["Account"] = db.define("accounts_model", attributes, options); -- cgit v1.2.3