diff options
| author | Adam Soltys <[email protected]> | 2020-10-09 10:04:27 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2020-10-09 10:06:02 -0700 |
| commit | d079d8c7c4c1efcb39f05255b2d025605dbbd790 (patch) | |
| tree | 4c2a30e7daf0f410b1b3e0829320fa48f29f41d9 /db/models/orders.js | |
| parent | 9a06c7883aec135b6d5243caa960d9cb9436b9c0 (diff) | |
| download | coinos-server-d079d8c7c4c1efcb39f05255b2d025605dbbd790.tar.gz coinos-server-d079d8c7c4c1efcb39f05255b2d025605dbbd790.zip | |
proposals -> orders
Diffstat (limited to 'db/models/orders.js')
| -rw-r--r-- | db/models/orders.js | 111 |
1 files changed, 111 insertions, 0 deletions
diff --git a/db/models/orders.js b/db/models/orders.js new file mode 100644 index 00000000..e9c701a3 --- /dev/null +++ b/db/models/orders.js @@ -0,0 +1,111 @@ +const { DataTypes } = require("sequelize"); + +const attributes = { + id: { + type: DataTypes.INTEGER(11), + allowNull: false, + defaultValue: null, + primaryKey: true, + autoIncrement: true, + comment: null, + field: "id" + }, + a1_id: { + type: DataTypes.INTEGER(11), + allowNull: true, + defaultValue: null, + primaryKey: false, + autoIncrement: false, + comment: null, + field: "a1_id" + }, + a2_id: { + type: DataTypes.INTEGER(11), + allowNull: true, + defaultValue: null, + primaryKey: false, + autoIncrement: false, + comment: null, + field: "a2_id" + }, + user_id: { + type: DataTypes.INTEGER(11), + allowNull: true, + defaultValue: null, + primaryKey: false, + autoIncrement: false, + comment: null, + field: "user_id" + }, + completedAt: { + type: DataTypes.DATE, + allowNull: true, + defaultValue: null, + primaryKey: false, + autoIncrement: false, + comment: null, + field: "completedAt" + }, + 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" + }, + v1: { + type: DataTypes.DOUBLE, + allowNull: true, + defaultValue: null, + primaryKey: false, + autoIncrement: false, + comment: null, + field: "v1" + }, + v2: { + type: DataTypes.DOUBLE, + allowNull: true, + defaultValue: null, + primaryKey: false, + autoIncrement: false, + comment: null, + field: "v2" + }, + rate: { + type: DataTypes.DOUBLE, + allowNull: true, + defaultValue: null, + primaryKey: false, + autoIncrement: false, + comment: null, + field: "rate" + }, + accepted: { + type: DataTypes.BOOLEAN, + allowNull: false, + defaultValue: false, + primaryKey: false, + autoIncrement: false, + comment: null, + field: "accepted" + }, +}; + +const options = { + tableName: "orders", + comment: "", + indexes: [] +}; + +db.Order = db.define("orders_model", attributes, options); |
