diff options
| author | Adam Soltys <[email protected]> | 2023-01-08 21:05:34 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-01-08 21:05:34 -0800 |
| commit | dce07aa93b3c2f47aca0c24cea6adde9ec37f1a7 (patch) | |
| tree | 6c6b8930ebe9c2cc5b8d1f759e61260f509fdd7a /db/normalized/invoices.js | |
| parent | f7b844883506a8072213245b9b8a2b988694e4f5 (diff) | |
| download | coinos-server-dce07aa93b3c2f47aca0c24cea6adde9ec37f1a7.tar.gz coinos-server-dce07aa93b3c2f47aca0c24cea6adde9ec37f1a7.zip | |
tech debt jubilee
Diffstat (limited to 'db/normalized/invoices.js')
| -rw-r--r-- | db/normalized/invoices.js | 206 |
1 files changed, 0 insertions, 206 deletions
diff --git a/db/normalized/invoices.js b/db/normalized/invoices.js deleted file mode 100644 index 823ad11d..00000000 --- a/db/normalized/invoices.js +++ /dev/null @@ -1,206 +0,0 @@ -export const up = function(knex) { - return knex.schema.createTable('invoices', function(t) { - t.increments('id').unsigned().primary(); - - t.int('transfer_id').notNull(); - t.foreign('transfer_id').references('transfers.id'); - - t.enu('network', ['Bitcoin', 'Liquid', 'Lightning', 'CoinOS']).notNull(); - - t.string('bolt11'); // was 'text' - - // Clarify ??? - break out ? - context ? include everything encoded in hash... - t.double('amount'); - - // Exchanges - // ( are there a couple of types of invoices ? - eg checkout / voucher / receive ... with different attributes ?) - t.double('rate') - t.string('currency') - t.double('tip') - - t.string('path') - t.string('uuid') - t.string('memo') - t.string('unconfidential') - t.string('address') - t.string('received') - - t.timestamps(); - }) -}; - -export const down = function(knex) { - return knex.schema.dropTable('invoices'); -}; - - -// Variations: ? -// wallet -> receive - fields ? -// checkout - fields ? -// voucher - fields ? - -// const { DataTypes } = require('@sequelize/core'); - -// const attributes = { -// id: { -// type: DataTypes.INTEGER(11), -// allowNull: false, -// defaultValue: null, -// primaryKey: true, -// autoIncrement: true, -// comment: null, -// field: "id" -// }, -// account_id: { -// type: DataTypes.INTEGER(11), -// allowNull: true, -// defaultValue: null, -// primaryKey: false, -// autoIncrement: false, -// comment: null, -// field: "account_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" -// }, -// path: { -// type: DataTypes.STRING(255), -// allowNull: true, -// defaultValue: null, -// primaryKey: false, -// autoIncrement: false, -// comment: null, -// field: "path" -// }, -// rate: { -// type: DataTypes.DOUBLE, -// allowNull: true, -// defaultValue: null, -// primaryKey: false, -// autoIncrement: false, -// comment: null, -// field: "rate" -// }, -// uuid: { -// type: DataTypes.STRING(255), -// allowNull: true, -// defaultValue: null, -// primaryKey: false, -// autoIncrement: false, -// comment: null, -// field: "uuid" -// }, -// memo: { -// type: DataTypes.TEXT, -// allowNull: true, -// defaultValue: null, -// primaryKey: false, -// autoIncrement: false, -// comment: null, -// field: "memo" -// }, -// network: { -// type: DataTypes.STRING(255), -// allowNull: true, -// defaultValue: null, -// primaryKey: false, -// autoIncrement: false, -// comment: null, -// field: "network" -// }, -// currency: { -// type: DataTypes.STRING(255), -// allowNull: true, -// defaultValue: null, -// primaryKey: false, -// autoIncrement: false, -// comment: null, -// field: "currency" -// }, -// unconfidential: { -// type: DataTypes.STRING(255), -// allowNull: true, -// defaultValue: null, -// primaryKey: false, -// autoIncrement: false, -// comment: null, -// field: "unconfidential" -// }, -// 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); |
