From 72b9bd0c3785da4338ea233aa3667f138a93d520 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Mon, 6 Jan 2020 10:32:27 -0800 Subject: drop sequelize-auto --- models/payments.js | 123 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 models/payments.js (limited to 'models/payments.js') diff --git a/models/payments.js b/models/payments.js new file mode 100644 index 00000000..8e4f42c7 --- /dev/null +++ b/models/payments.js @@ -0,0 +1,123 @@ +const { + DataTypes +} = require('sequelize'); + +module.exports = 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" + }, + hash: { + type: DataTypes.TEXT, + allowNull: true, + defaultValue: null, + primaryKey: false, + autoIncrement: false, + comment: null, + field: "hash" + }, + 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" + }, + rate: { + type: DataTypes.DOUBLE, + allowNull: true, + defaultValue: null, + primaryKey: false, + autoIncrement: false, + comment: null, + field: "rate" + }, + currency: { + type: DataTypes.STRING(255), + allowNull: true, + defaultValue: null, + primaryKey: false, + autoIncrement: false, + comment: null, + field: "currency" + }, + address: { + type: DataTypes.STRING(255), + allowNull: true, + defaultValue: null, + primaryKey: false, + autoIncrement: false, + comment: null, + field: "address" + }, + received: { + type: DataTypes.INTEGER(1), + allowNull: true, + defaultValue: null, + primaryKey: false, + autoIncrement: false, + comment: null, + field: "received" + }, + amount: { + type: DataTypes.DOUBLE, + allowNull: true, + defaultValue: null, + primaryKey: false, + autoIncrement: false, + comment: null, + field: "amount" + }, + tip: { + type: DataTypes.DOUBLE, + allowNull: true, + defaultValue: null, + primaryKey: false, + autoIncrement: false, + comment: null, + field: "tip" + }, + confirmed: { + type: DataTypes.INTEGER(1), + allowNull: false, + defaultValue: null, + primaryKey: false, + autoIncrement: false, + comment: null, + field: "confirmed" + } + }; + const options = { + tableName: "payments", + comment: "", + indexes: [] + }; + const PaymentsModel = sequelize.define("payments_model", attributes, options); + return PaymentsModel; +}; -- cgit v1.2.3