aboutsummaryrefslogtreecommitdiffstats
path: root/db/models
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2020-07-27 11:34:17 -0700
committerAdam Soltys <[email protected]>2020-07-27 11:35:36 -0700
commit3d7b27aa81165c15658f46687a2748d126c17adb (patch)
treeef737f641657501683f9f035e3aad28d49668795 /db/models
parentbfb643b82b559cb4ee78c6501d339920c6df8176 (diff)
downloadcoinos-server-3d7b27aa81165c15658f46687a2748d126c17adb.tar.gz
coinos-server-3d7b27aa81165c15658f46687a2748d126c17adb.zip
asset registration
Diffstat (limited to 'db/models')
-rw-r--r--db/models/accounts.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/db/models/accounts.js b/db/models/accounts.js
index 470ca842..5a6f0bd3 100644
--- a/db/models/accounts.js
+++ b/db/models/accounts.js
@@ -46,6 +46,21 @@ const attributes = {
comment: null,
field: "name"
},
+ contract: {
+ type: DataTypes.TEXT,
+ get: function() {
+ return JSON.parse(this.getDataValue("contract"));
+ },
+ set: function(value) {
+ return this.setDataValue("contract", JSON.stringify(value));
+ },
+ allowNull: true,
+ defaultValue: null,
+ primaryKey: false,
+ autoIncrement: false,
+ comment: null,
+ field: "contract"
+ },
domain: {
type: DataTypes.STRING(255),
allowNull: true,