jobs-monorepo/libs/ports/job-queries.go
2026-01-26 17:33:48 +05:00

25 lines
704 B
Go

package ports
import (
"github.com/jobs-scraper/internal/dto"
"github.com/jobs-scraper/internal/domain"
)
type JobQueries struct {
GetJobs JobQueryHandler
}
// GetJobQuery represents the command to create a job
type GetJobQuery struct {
Location string `schema:"location"`
Keywords string `schema:"keywords"`
FWT string `schema:"fwt"`
Provider domain.JobProvider `schema:"provider"`
PageNumber int `schema:"pageNumber"`
PageSize int `schema:"pageSize"`
}
// JobQueryHandler defines the interface for handling job queries
type JobQueryHandler interface {
Handle(query GetJobQuery) ([]dto.JobDTO, int, error)
}