module.exports = (sequelize, DataTypes) => {
  const analytic = sequelize.define(
    "analytic",
    {
      id: {
        type: DataTypes.INTEGER,
        primaryKey: true,
        autoIncrement: true,
      },
      create_at: {
        type: DataTypes.DATE,
        defaultValue: DataTypes.NOW,
      },
      widget_name: {
        type: DataTypes.STRING,
        allowNull: false,
      },
      browser_type: {
        type: DataTypes.STRING,
        allowNull: false,
      },
    },
    {
      timestamps: false,
      freezeTableName: true,
      tableName: "analytic",
    }
  );
  return analytic;
};
