diff options
| author | Adam Soltys <[email protected]> | 2020-03-11 15:10:40 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2020-03-11 15:10:40 -0700 |
| commit | c0888fab024cc9f7c99812bfabf9d7774312dbf7 (patch) | |
| tree | cad95683af97432f6092a2c2bae10fbb7a588db5 /models | |
| parent | bf2b51f0c2ae9b8f0f330dde6411e45fc0da8a25 (diff) | |
| download | coinos-server-c0888fab024cc9f7c99812bfabf9d7774312dbf7.tar.gz coinos-server-c0888fab024cc9f7c99812bfabf9d7774312dbf7.zip | |
refactor
Diffstat (limited to 'models')
| -rw-r--r-- | models/payments.js | 141 | ||||
| -rw-r--r-- | models/users.js | 249 |
2 files changed, 0 insertions, 390 deletions
diff --git a/models/payments.js b/models/payments.js deleted file mode 100644 index 213c11b4..00000000 --- a/models/payments.js +++ /dev/null @@ -1,141 +0,0 @@ -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" - }, - 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.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" - }, - fee: { - type: DataTypes.DOUBLE, - allowNull: true, - defaultValue: null, - primaryKey: false, - autoIncrement: false, - comment: null, - field: "fee" - }, - 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; -}; diff --git a/models/users.js b/models/users.js deleted file mode 100644 index 7adeeaf6..00000000 --- a/models/users.js +++ /dev/null @@ -1,249 +0,0 @@ -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" - }, - username: { - type: DataTypes.STRING(255), - allowNull: true, - defaultValue: null, - primaryKey: false, - autoIncrement: false, - comment: null, - field: "username" - }, - password: { - type: DataTypes.STRING(255), - allowNull: true, - defaultValue: null, - primaryKey: false, - autoIncrement: false, - comment: null, - field: "password" - }, - liquid: { - type: DataTypes.STRING(255), - allowNull: true, - defaultValue: null, - primaryKey: false, - autoIncrement: false, - comment: null, - field: "liquid" - }, - confidential: { - type: DataTypes.STRING(255), - allowNull: true, - defaultValue: null, - primaryKey: false, - autoIncrement: false, - comment: null, - field: "confidential" - }, - address: { - type: DataTypes.STRING(255), - allowNull: true, - defaultValue: null, - primaryKey: false, - autoIncrement: false, - comment: null, - field: "address" - }, - symbol: { - type: DataTypes.STRING(255), - allowNull: true, - defaultValue: null, - primaryKey: false, - autoIncrement: false, - comment: null, - field: "symbol" - }, - otpsecret: { - type: DataTypes.STRING(255), - allowNull: true, - defaultValue: "CAD", - primaryKey: false, - autoIncrement: false, - comment: null, - field: "otpsecret" - }, - currency: { - type: DataTypes.STRING(255), - allowNull: true, - defaultValue: "CAD", - primaryKey: false, - autoIncrement: false, - comment: null, - field: "currency" - }, - currencies: { - type: DataTypes.JSON, - allowNull: false, - defaultValue: ["USD"], - primaryKey: false, - autoIncrement: false, - comment: null, - field: "currencies" - }, - pubkey: { - type: DataTypes.STRING(255), - allowNull: true, - defaultValue: null, - primaryKey: false, - autoIncrement: false, - comment: null, - field: "pubkey" - }, - privkey: { - type: DataTypes.STRING(255), - allowNull: true, - defaultValue: null, - primaryKey: false, - autoIncrement: false, - comment: null, - field: "privkey" - }, - 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" - }, - index: { - type: DataTypes.INTEGER(11), - allowNull: true, - defaultValue: null, - primaryKey: false, - autoIncrement: false, - comment: null, - field: "index" - }, - balance: { - type: DataTypes.INTEGER(11), - allowNull: false, - defaultValue: "0", - primaryKey: false, - autoIncrement: false, - comment: null, - field: "balance" - }, - channel: { - type: DataTypes.STRING(255), - allowNull: true, - defaultValue: null, - primaryKey: false, - autoIncrement: false, - comment: null, - field: "channel" - }, - readonlypw: { - type: DataTypes.STRING(255), - allowNull: true, - defaultValue: null, - primaryKey: false, - autoIncrement: false, - comment: null, - field: "readonlypw" - }, - limit: { - type: DataTypes.INTEGER(11), - allowNull: true, - defaultValue: "0", - primaryKey: false, - autoIncrement: false, - comment: null, - field: "limit" - }, - fbtoken: { - type: DataTypes.STRING(255), - allowNull: true, - defaultValue: null, - primaryKey: false, - autoIncrement: false, - comment: null, - field: "fbtoken" - }, - friend: { - type: DataTypes.INTEGER(1), - allowNull: true, - defaultValue: null, - primaryKey: false, - autoIncrement: false, - comment: null, - field: "friend" - }, - pending: { - type: DataTypes.INTEGER(11), - allowNull: true, - defaultValue: "0", - primaryKey: false, - autoIncrement: false, - comment: null, - field: "pending" - }, - name: { - type: DataTypes.STRING(255), - allowNull: true, - defaultValue: null, - primaryKey: false, - autoIncrement: false, - comment: null, - field: "name" - }, - pic: { - type: DataTypes.STRING(255), - allowNull: true, - defaultValue: null, - primaryKey: false, - autoIncrement: false, - comment: null, - field: "pic" - }, - twofa: { - type: DataTypes.INTEGER(1), - allowNull: true, - defaultValue: null, - primaryKey: false, - autoIncrement: false, - comment: null, - field: "twofa" - }, - pin: { - type: DataTypes.STRING(255), - allowNull: true, - defaultValue: null, - primaryKey: false, - autoIncrement: false, - comment: null, - field: "pin" - }, - }; - const options = { - tableName: "users", - comment: "", - indexes: [] - }; - const UsersModel = sequelize.define("users_model", attributes, options); - return UsersModel; -}; |
