aboutsummaryrefslogtreecommitdiffstats
path: root/db/models
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2020-04-24 22:46:45 -0700
committerAdam Soltys <[email protected]>2020-04-24 22:46:45 -0700
commit83f973224bad381df62774bcc058f76eab635f0c (patch)
treeef231f4490b0c9d194b8683be50c05524738903e /db/models
parent306357c24d3014b55ae1cd25b954a695ea2e5cc6 (diff)
downloadcoinos-server-assets.tar.gz
coinos-server-assets.zip
Diffstat (limited to 'db/models')
-rw-r--r--db/models/accounts.js27
-rw-r--r--db/models/payments.js9
-rw-r--r--db/models/users.js78
3 files changed, 39 insertions, 75 deletions
diff --git a/db/models/accounts.js b/db/models/accounts.js
index aeaf8d5e..a4b38992 100644
--- a/db/models/accounts.js
+++ b/db/models/accounts.js
@@ -37,6 +37,24 @@ const attributes = {
comment: null,
field: "updatedAt"
},
+ name: {
+ type: DataTypes.STRING(255),
+ allowNull: true,
+ defaultValue: null,
+ primaryKey: false,
+ autoIncrement: false,
+ comment: null,
+ field: "name"
+ },
+ ticker: {
+ type: DataTypes.STRING(255),
+ allowNull: true,
+ defaultValue: null,
+ primaryKey: false,
+ autoIncrement: false,
+ comment: null,
+ field: "ticker"
+ },
asset: {
type: DataTypes.STRING(255),
allowNull: true,
@@ -64,6 +82,15 @@ const attributes = {
comment: null,
field: "pending"
},
+ precision: {
+ type: DataTypes.DOUBLE,
+ allowNull: true,
+ defaultValue: null,
+ primaryKey: false,
+ autoIncrement: false,
+ comment: null,
+ field: "precision"
+ },
};
const options = {
diff --git a/db/models/payments.js b/db/models/payments.js
index c6dd6e83..4859bce7 100644
--- a/db/models/payments.js
+++ b/db/models/payments.js
@@ -10,6 +10,15 @@ const attributes = {
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,
diff --git a/db/models/users.js b/db/models/users.js
index 48e8c94f..439ddb63 100644
--- a/db/models/users.js
+++ b/db/models/users.js
@@ -64,14 +64,14 @@ const attributes = {
comment: null,
field: "address"
},
- symbol: {
- type: DataTypes.STRING(255),
+ account_id: {
+ type: DataTypes.INTEGER(11),
allowNull: true,
defaultValue: null,
primaryKey: false,
autoIncrement: false,
comment: null,
- field: "symbol"
+ field: "account_id"
},
otpsecret: {
type: DataTypes.STRING(255),
@@ -100,24 +100,6 @@ const attributes = {
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,
@@ -145,42 +127,6 @@ const attributes = {
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,
@@ -190,24 +136,6 @@ const attributes = {
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,