package categoryrepository

import (
	categorydomain "legalgo-BE-go/internal/domain/category"
)

func (a *accessor) GetByIDs(ids []string) ([]categorydomain.Category, error) {
	var categories []categorydomain.Category

	if err := a.db.Find(&categories, "id IN ?", ids).Error; err != nil {
		return nil, err
	}

	return categories, nil
}
