diff options
| author | Adam Soltys <[email protected]> | 2020-07-16 12:06:25 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2020-07-16 12:06:25 -0700 |
| commit | 79c9febb88035422e950349b214cc1fc1a4ab615 (patch) | |
| tree | c2e2b82dda2185508ec26932780bf2bbfef906e7 /db/models | |
| parent | dabde17d34eda659292382343026382907b76fe4 (diff) | |
| download | coinos-server-79c9febb88035422e950349b214cc1fc1a4ab615.tar.gz coinos-server-79c9febb88035422e950349b214cc1fc1a4ab615.zip | |
url codes
Diffstat (limited to 'db/models')
| -rw-r--r-- | db/models/codes.js | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/db/models/codes.js b/db/models/codes.js new file mode 100644 index 00000000..9d967d11 --- /dev/null +++ b/db/models/codes.js @@ -0,0 +1,31 @@ +const { DataTypes } = require('sequelize'); + +const attributes = { + code: { + type: DataTypes.STRING(64), + allowNull: false, + defaultValue: null, + primaryKey: true, + autoIncrement: true, + comment: null, + field: "code" + }, + text: { + type: DataTypes.TEXT, + allowNull: true, + defaultValue: null, + primaryKey: false, + autoIncrement: false, + comment: null, + field: "text" + }, +}; + +const options = { + tableName: "codes", + comment: "", + indexes: [], + timestamps: false +}; + +db["Code"] = db.define("codes_model", attributes, options); |
