/* indent size: 2 */ module.exports = app => { const DataTypes = app.Sequelize; const Model = app.model.define('Address', { address_id: { type: DataTypes.INTEGER(10).UNSIGNED, allowNull: false, primaryKey: true, autoIncrement: true }, user_id: { type: DataTypes.INTEGER(10).UNSIGNED, allowNull: true }, uname: { type: DataTypes.STRING(255), allowNull: true }, mobile: { type: DataTypes.STRING(11), allowNull: true }, province_id: { type: DataTypes.INTEGER(10).UNSIGNED, allowNull: true }, province_name: { type: DataTypes.STRING(255), allowNull: true }, city_id: { type: DataTypes.INTEGER(10).UNSIGNED, allowNull: true }, city_name: { type: DataTypes.STRING(255), allowNull: true }, county_id: { type: DataTypes.INTEGER(10).UNSIGNED, allowNull: true }, county_name: { type: DataTypes.STRING(255), allowNull: true }, address: { type: DataTypes.STRING(255), allowNull: true }, is_use: { type: DataTypes.INTEGER(1).UNSIGNED, allowNull: true }, update_time: { type: DataTypes.TIME }, create_time: { type: DataTypes.DATE, allowNull: true } }, { tableName: 'szj_address' }); Model.associate = function() { } //同步:没有就新建,有就不变 Model.sync(); return Model; };