const BaseCrud = require("./baseCrud");
class StaffMembersService extends BaseCrud {
  constructor(logger, sequelize) {
    super(sequelize.models.StaffMember);
    this.logger = logger;
    this.sequelize = sequelize;

    const { Feature, StaffMember, Robot } = this.sequelize.models;
    this.inclusionModel = [
      {
        model: Robot,
        as: "robots",
        include: [
          {
            model: StaffMember,
            as: "experts",
          },
          {
            model: Feature,
            as: "features",
          },
        ],
      },
    ];
  }

  async getList(filters = {}) {
    return super.getList(filters, this.inclusionModel);
  }
}

module.exports = StaffMembersService;
