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

26 lines
564 B
Go

package ports
import "github.com/jobs-scraper/internal/domain"
type JobCommands struct {
CreateJob JobCommandHandler
ApplyForJob ApplyForJobCommandHandler
}
// CreateJobCommand represents the command to create a job
type CreateJobCommand struct {
Location string
Keywords string
FWT string
Provider domain.JobProvider
NumPages int
}
// JobCommandHandler defines the interface for handling job commands
type JobCommandHandler interface {
Handle(cmd CreateJobCommand) error
}
type ApplyForJobCommandHandler interface {
Handle(jobId int) error
}