HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux ip-10-0-8-47 6.8.0-1021-aws #23~22.04.1-Ubuntu SMP Tue Dec 10 16:31:58 UTC 2024 aarch64
User: ubuntu (1000)
PHP: 8.1.2-1ubuntu2.22
Disabled: NONE
Upload Files
File: /var/www/javago-api-updates/src/models/CafeManagement.model.js
import Sequelize from "sequelize";
import sequelize from "../config/database.config.js";
import sequelizePaginate from "sequelize-paginate";

const CafeManagement = sequelize.define(
  "cafe_management",
  {
    id: {
      type: Sequelize.INTEGER,
      primaryKey: true,
      autoIncrement: true,
      allowNull: false,
    },
    cafe_id: {
      type: Sequelize.BIGINT,
      allowNull: false,
    },
    coffee_origin: {
      type: Sequelize.STRING,
      allowNull: true,
    },
    coffee_roast: {
      type: Sequelize.STRING,
      allowNull: true,
    },
    coffee_origin_country: {
      type: Sequelize.STRING,
      allowNull: true,
    },
    speciallity_coffee: {
      type: Sequelize.TINYINT(1),
      defaultValue: 1,
      comment: "0=no,1=yes",
    },
    click_and_collect: {
      type: Sequelize.TINYINT(1),
      defaultValue: 1,
      comment: "0=no,1=yes",
    },
    max_orders_click_collect: {
      type: Sequelize.INTEGER,
      allowNull: true,
    },
    created_at: {
      type: Sequelize.INTEGER(10),
      defaultValue: 0,
    },
    updated_at: {
      type: Sequelize.INTEGER(10),
      defaultValue: 0,
    },
  },
  {
    tableName: "cafe_management",
    timestamps: false,
  }
);
sequelizePaginate.paginate(CafeManagement);
CafeManagement.sync();
export default CafeManagement;