const Sequelize = require("sequelize");

module.exports = (db) => {
  const biz_user = db.define(
    "biz_user",
    {
  
      name: {
        type: Sequelize.STRING(100),
        allowNull: false,
        defaultValue: "",
      },
      mobile: {
        type: Sequelize.STRING(20),
        allowNull: true,
      },
      email: {
        type: Sequelize.STRING(120),
        allowNull: true,
      },
      company_name: {
        type: Sequelize.STRING(200),
        allowNull: true,
      },
      status: {
        type: Sequelize.ENUM("active", "disabled"),
        allowNull: false,
        defaultValue: "active",
      },
    },
    {
      tableName: "biz_user",
      freezeTableName: true,
      timestamps: false,
      underscored: true,
    }
  );
  // biz_user.sync({ alter: true });

  return biz_user;
};
