-
Notifications
You must be signed in to change notification settings - Fork 1
/
repair.go
67 lines (57 loc) · 2.92 KB
/
repair.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
package structs
import "time"
type RepairRequest struct {
SysID string `json:"sys_id,omitempty"`
Number string `json:"number,omitempty"`
Service string `json:"u_service,omitempty"`
AssignmentGroup string `json:"assignment_group,omitempty"`
RequestOriginator string `json:"u_requested_by,omitempty"`
Parent string `json:"parent,omitempty"`
RequestOrigination string `json:"u_request_origination,omitempty"`
RequestDate string `json:"u_dropped_off_date,omitempty"`
Building string `json:"u_building,omitempty"`
State string `json:"state,omitempty"`
Room string `json:"u_room,omitempty"`
ShortDescription string `json:"short_description,omitempty"`
Description string `json:"description,omitempty"`
DateNeeded string `json:"u_completion_asap_or_date,omitempty"`
EquipmentReturn string `json:"u_pickup_or_delivery,omitempty"`
InternalNotes string `json:"work_notes,omitempty"`
WorkLog string `json:"comments,omitempty"`
}
type RepairResponse struct {
SysID string `json:"sys_id,omitempty"`
Number string `json:"number,omitempty"`
InternalNotes string `json:"work_notes,omitempty"`
//we are commenting these out because they don't come back consistent (sometimes "", sometimes a struct)
//and that doesn't play nice with GO
// Service ServiceNowLinkValue `json:"u_service,omitempty"`
// AssignmentGroup ServiceNowLinkValue `json:"assignment_group,omitempty"`
// RequestOriginator string `json:"u_requested_by,omitempty"`
// Parent ServiceNowLinkValue `json:"parent,omitempty"`
// RequestOrigination string `json:"u_request_origination,omitempty"`
// RequestDate string `json:"u_dropped_off_date,omitempty"`
// Building ServiceNowLinkValue `json:"u_building,omitempty"`
// State string `json:"state,omitempty"`
// Room ServiceNowLinkValue `json:"u_room,omitempty"`
// ShortDescription string `json:"short_description,omitempty"`
// Description string `json:"description,omitempty"`
// DateNeeded string `json:"u_completion_asap_or_date,omitempty"`
// EquipmentReturn string `json:"u_pickup_or_delivery,omitempty"`
}
type RepairResponseWrapper struct {
Result RepairResponse `json:"result"`
}
type MultiRepairResponseWrapper struct {
Result []RepairResponse `json:"result"`
}
// ClassHalfHourBlock defines the information needed for a 30 min block of a class
type ClassHalfHourBlock struct {
BlockStart string `json:"block-start"`
ClassName string `json:"class-name"`
ClassTime string `json:"class-time"`
Teacher Person `json:"teacher"`
Days string `json:"days"`
ClassStartTime time.Time `json:"class-start-time"`
ClassEndTime time.Time `json:"class-end-time"`
}