UNPKG

sequelize-automate

Version:

Automatically generate bare sequelize models from your database.

57 lines (56 loc) 1.41 kB
[ { "modelName": "user_model", "modelFileName": "user", "tableName": "user", "attributes": { "id": { "type": "DataTypes.INTEGER(11).UNSIGNED", "allowNull": false, "defaultValue": null, "primaryKey": true, "autoIncrement": true, "comment": "primary ket", "field": "id" }, "name": { "type": "DataTypes.STRING(100)", "allowNull": false, "defaultValue": null, "primaryKey": false, "autoIncrement": false, "comment": "user name", "field": "name", "unique": "uk_name" }, "email": { "type": "DataTypes.STRING(255)", "allowNull": false, "defaultValue": null, "primaryKey": false, "autoIncrement": false, "comment": "user email", "field": "email" }, "created_at": { "type": "DataTypes.DATE", "allowNull": false, "defaultValue": null, "primaryKey": false, "autoIncrement": false, "comment": "created datetime", "field": "created_at" }, "updated_at": { "type": "DataTypes.DATE", "allowNull": false, "defaultValue": null, "primaryKey": false, "autoIncrement": false, "comment": "updated datetime", "field": "updated_at" } }, "indexes": [] } ]