package categoryrepository

import (
	"legalgo-BE-go/database"
)

func (a *accessor) GetAllModel() ([]database.CategoryModel, error) {
	var categories []database.CategoryModel

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

	return categories, nil
}
