Skip to content

Instantly share code, notes, and snippets.

@percybolmer
Last active September 10, 2021 09:43
Show Gist options
  • Save percybolmer/f3dc3fbff9f0756ebf2ba8231f771af1 to your computer and use it in GitHub Desktop.
Save percybolmer/f3dc3fbff9f0756ebf2ba8231f771af1 to your computer and use it in GitHub Desktop.
graphql
package job
// Repository is used to specify whats needed to fulfill the job storage requirements
type Repository interface {
// GetJobs will search for all jobs related to and EmployeeID
GetJobs(employeeID string) ([]Job, error)
}
// Job is how a job is presented
type Job struct {
ID string `json:"id"`
// EmployeeID is the employee related to the job
EmployeeID string `json:"employeeID"`
Company string `json:"company"`
Title string `json:"title"`
// Start is when the job started
Start string `json:"start"`
// End is when the employment ended
End string `json:"end"`
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment