diff options
| author | Adam Soltys <[email protected]> | 2020-07-20 21:16:16 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2020-07-20 21:16:16 -0700 |
| commit | 5a15eb109b6ddd8232abfecaafc7d8ba7ada14ab (patch) | |
| tree | 04575adc8c837413bb9c743cfb2234ec95d76bbb /db/models | |
| parent | 1bbf30a5ece3b361ac5eb00da052fa63cbc91a2e (diff) | |
| download | coinos-server-5a15eb109b6ddd8232abfecaafc7d8ba7ada14ab.tar.gz coinos-server-5a15eb109b6ddd8232abfecaafc7d8ba7ada14ab.zip | |
atomic swaps
Diffstat (limited to 'db/models')
| -rw-r--r-- | db/models/proposals.js | 102 |
1 files changed, 102 insertions, 0 deletions
diff --git a/db/models/proposals.js b/db/models/proposals.js new file mode 100644 index 00000000..350bdab8 --- /dev/null +++ b/db/models/proposals.js @@ -0,0 +1,102 @@ +const { DataTypes } = require('sequelize'); + +const attributes = { + id: { + type: DataTypes.INTEGER(11), + allowNull: false, + defaultValue: null, + primaryKey: true, + autoIncrement: true, + comment: null, + field: "id" + }, + user_id: { + type: DataTypes.INTEGER(11), + allowNull: true, + defaultValue: null, + primaryKey: false, + autoIncrement: false, + comment: null, + field: "user_id" + }, + 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" + }, + a1: { + type: DataTypes.STRING(255), + allowNull: true, + defaultValue: null, + primaryKey: false, + autoIncrement: false, + comment: null, + field: "a1" + }, + a2: { + type: DataTypes.STRING(255), + allowNull: true, + defaultValue: null, + primaryKey: false, + autoIncrement: false, + comment: null, + field: "a2" + }, + v1: { + type: DataTypes.INTEGER, + allowNull: true, + defaultValue: null, + primaryKey: false, + autoIncrement: false, + comment: null, + field: "v1" + }, + v2: { + type: DataTypes.INTEGER, + allowNull: true, + defaultValue: null, + primaryKey: false, + autoIncrement: false, + comment: null, + field: "v2" + }, + text: { + type: DataTypes.TEXT, + allowNull: false, + defaultValue: false, + primaryKey: false, + autoIncrement: false, + comment: null, + field: "text" + }, + accepted: { + type: DataTypes.BOOLEAN, + allowNull: false, + defaultValue: false, + primaryKey: false, + autoIncrement: false, + comment: null, + field: "accepted" + }, +}; + +const options = { + tableName: "proposals", + comment: "", + indexes: [] +}; + +db["Proposal"] = db.define("proposals_model", attributes, options); |
