package comment import ( "context" "errors" "tercul/internal/domain" ) // CommentQueries contains the query handlers for the comment aggregate. type CommentQueries struct { repo domain.CommentRepository } // NewCommentQueries creates a new CommentQueries handler. func NewCommentQueries(repo domain.CommentRepository) *CommentQueries { return &CommentQueries{ repo: repo, } } // GetCommentByID retrieves a comment by ID. func (q *CommentQueries) GetCommentByID(ctx context.Context, id uint) (*domain.Comment, error) { if id == 0 { return nil, errors.New("invalid comment ID") } return q.repo.GetByID(ctx, id) }