diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2017-04-01 13:12:28 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2017-04-01 13:12:28 +0200 |
| commit | 6b4cb056cf133edcc3b2137f0bb35913a0096d07 (patch) | |
| tree | 8f9bd642a6e1744a382123542af38c7edb66dd3a /models/asset.js | |
| parent | 55eacbdff9003723a747715e4c75f8f743c5d2bd (diff) | |
| download | orm-6b4cb056cf133edcc3b2137f0bb35913a0096d07.tar.gz orm-6b4cb056cf133edcc3b2137f0bb35913a0096d07.zip | |
generate from db
Diffstat (limited to 'models/asset.js')
| -rw-r--r-- | models/asset.js | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/models/asset.js b/models/asset.js index af8d040..b55fed4 100644 --- a/models/asset.js +++ b/models/asset.js @@ -8,38 +8,42 @@ module.exports = function(sequelize, DataTypes) { primaryKey: true, autoIncrement: true }, + match_api_id: { + type: DataTypes.STRING(191), + allowNull: false + }, api_id: { type: DataTypes.STRING(191), - allowNull: false, - unique: true + allowNull: false }, - match_api_id: { + type: { type: DataTypes.STRING(191), allowNull: false }, - url: { + name: { type: DataTypes.STRING(191), allowNull: false }, + url: { + type: DataTypes.STRING(191), + allowNull: true + }, content_type: { type: DataTypes.STRING(191), - allowNull: false + allowNull: true }, created_at: { type: DataTypes.TIME, - allowNull: false + allowNull: false, + defaultValue: sequelize.literal('CURRENT_TIMESTAMP') }, description: { type: DataTypes.STRING(191), - allowNull: false + allowNull: true }, filename: { type: DataTypes.STRING(191), - allowNull: false - }, - name: { - type: DataTypes.STRING(191), - allowNull: false + allowNull: true } }, { tableName: 'asset', |
