const Sequelize = require("sequelize");
const sequelizeConnect = require("../connection/db");

const OrderStatusEventsAdminReads = sequelizeConnect.define(
  "order_status_events_admin_reads",
  {
    id: {
      type: Sequelize.BIGINT,
      primaryKey: true,
      allowNull: false,
      autoIncrement: true,
    },
    order_status_events_id: {
      type: Sequelize.BIGINT,
      allowNull: false,
    },
    user_id: {
      type: Sequelize.BIGINT,
      allowNull: true,
    },
    seller_account_id: {
      type: Sequelize.BIGINT,
      allowNull: true,
    },
    is_read: {
      type: Sequelize.BOOLEAN,
      allowNull: false,
      defaultValue: false,
    },
  },
  {
    tableName: "order_status_events_admin_reads",
    timestamps: false,
  },
);

module.exports = OrderStatusEventsAdminReads;
