module.exports = (db, DataTypes) => {
  return db.define("bmuser", {
    openId: DataTypes.STRING(100),
    mobile: DataTypes.STRING(30),
    passwd: DataTypes.STRING(64),
    nickname: DataTypes.STRING(64),
    realname: DataTypes.STRING(64),
    headurl: DataTypes.STRING(64),
    balance: DataTypes.INTEGER,
    income: DataTypes.INTEGER,
    agreement: {
      type:DataTypes.BOOLEAN,
      defaultValue: false,
    },
  }, {
    paranoid: true, //假的删除
    underscored: true,
    version: true,
    freezeTableName: true,
    //freezeTableName: true,
    // define the table's name
    tableName: 'bm_user',
    validate: {}
  });
}