diff options
| author | Adam Soltys <[email protected]> | 2020-03-27 16:59:02 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2020-03-27 16:59:44 -0700 |
| commit | d1f87762cc4d665fa364c848e846eb121269b2e4 (patch) | |
| tree | 3e5277796e01246c98efc80dcee273a1e9a947af /db/models | |
| parent | b75a06ea0dadcb7ad2416e900e15276661e065be (diff) | |
| download | coinos-server-d1f87762cc4d665fa364c848e846eb121269b2e4.tar.gz coinos-server-d1f87762cc4d665fa364c848e846eb121269b2e4.zip | |
invoices model
Diffstat (limited to 'db/models')
| -rw-r--r-- | db/models/invoices.js | 120 |
1 files changed, 120 insertions, 0 deletions
diff --git a/db/models/invoices.js b/db/models/invoices.js new file mode 100644 index 00000000..2a7f3013 --- /dev/null +++ b/db/models/invoices.js @@ -0,0 +1,120 @@ +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" + }, + text: { + type: DataTypes.TEXT, + allowNull: true, + defaultValue: null, + primaryKey: false, + autoIncrement: false, + comment: null, + field: "text" + }, + 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" + }, + asset: { + type: DataTypes.STRING(255), + allowNull: true, + defaultValue: null, + primaryKey: false, + autoIncrement: false, + comment: null, + field: "asset" + }, + 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.STRING(255), + 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" + }, +}; + +const options = { + tableName: "invoices", + comment: "", + indexes: [] +}; + +db["Invoice"] = db.define("invoices_model", attributes, options); |
