package engineer

import "time"

type EngineerAvailability struct {
	IsOnCall      bool       `json:"is_oncall"`
	OnCallStartAt *time.Time `json:"on_call_start_at,omitempty"`
	OnCallEndAt   *time.Time `json:"on_call_end_at,omitempty"`
}

type DispatchState struct {
	DispatchEnabled     bool       `json:"dispatch_enabled"`
	LastDispatchedAt    *time.Time `json:"last_dispatched_at,omitempty"`
	LastDispatchedIssue string     `json:"last_dispatched_issue"`
}

type Engineer struct {
	Email         string               `json:"email"`
	DispatchState DispatchState        `json:"dispatch_state"`
	Availability  EngineerAvailability `json:"availability"`
}
