package categoryrepository

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

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

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

	return categories, nil
}
