diff options
Diffstat (limited to 'db/models')
| -rw-r--r-- | db/models/accounts.js | 66 |
1 files changed, 66 insertions, 0 deletions
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); |
