package tagsvc

import (
	tagdomain "legalgo-BE-go/internal/domain/tag"
	timeutils "legalgo-BE-go/internal/utilities/time_utils"
)

func (i *impl) Update(id string, spec tagdomain.TagReq) error {
	newData := tagdomain.Tag{
		ID:        id,
		Code:      spec.Code,
		Name:      spec.Name,
		UpdatedAt: timeutils.Now(),
	}
	return i.tagRepo.Update(newData)
}
