From 8594c1b1482564b0e997250d2857855f39c11468 Mon Sep 17 00:00:00 2001 From: Ranabir Guin Date: Fri, 14 May 2021 10:19:56 -0700 Subject: add ln_assets; update normalized README --- db/normalized/ln_assets.js | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 db/normalized/ln_assets.js (limited to 'db/normalized/ln_assets.js') 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); -- cgit v1.2.3