aboutsummaryrefslogtreecommitdiffstats
path: root/db/normalized/ln_assets.js
diff options
context:
space:
mode:
authorRanabir Guin <[email protected]>2021-05-14 10:19:56 -0700
committerAdam Soltys <[email protected]>2021-06-09 16:05:30 -0700
commit8594c1b1482564b0e997250d2857855f39c11468 (patch)
tree9281e4fe3bbbebeef87c93a125eaeacd3d77a2c7 /db/normalized/ln_assets.js
parentb97fdafccb2b595a90b629eacff8ae9958d99737 (diff)
downloadcoinos-server-8594c1b1482564b0e997250d2857855f39c11468.tar.gz
coinos-server-8594c1b1482564b0e997250d2857855f39c11468.zip
add ln_assets; update normalized README
Diffstat (limited to 'db/normalized/ln_assets.js')
-rw-r--r--db/normalized/ln_assets.js34
1 files changed, 34 insertions, 0 deletions
diff --git a/db/normalized/ln_assets.js b/db/normalized/ln_assets.js
new file mode 100644
index 00000000..ae8c5883
--- /dev/null
+++ b/db/normalized/ln_assets.js
@@ -0,0 +1,34 @@
+const { DataTypes } = require('sequelize');
+
+const attributes = {
+ id: {
+ type: DataTypes.INTEGER(11),
+ primaryKey: true,
+ autoIncrement: true,
+ allowNull: false
+ },
+ name: {
+ type: DataTypes.STRING(255),
+ comment: "eg 'USD'"
+ },
+ code: {
+ type: DataTypes.INTEGER(11),
+ allowNull: false,
+ comment: "unique uuid on liquid network"
+ }
+}
+const options = {
+ tableName: "codes",
+ comment: "Reference subset of liquid network asset codes",
+ timestamps: true,
+ createdAt: 'created_at',
+ updatedAt: 'updated_at',
+ indexes: [
+ {
+ unique: true,
+ fields: ['code']
+ }
+ ]
+};
+
+db["LnAsset"] = db.define("ln_assets_model", attributes, options);