Skip to content

Commit

Permalink
objects
Browse files Browse the repository at this point in the history
  • Loading branch information
LovroG05 committed Jul 21, 2022
0 parents commit ec4e04b
Show file tree
Hide file tree
Showing 8 changed files with 54 additions and 0 deletions.
Empty file added .gitignore
Empty file.
3 changes: 3 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module github.com/OpenTimetable/GOTTF

go 1.18
11 changes: 11 additions & 0 deletions objects/class.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package objects

type Class struct {
Substitution bool `json:"substitution"`
Examination bool `json:"examination"`
Canceled bool `json:"canceled"`
Name string `json:"name"`
Abbreviation string `json:"abbreviation"`
Location string `json:"location"`
Hosts []string `json:"hosts"`
}
6 changes: 6 additions & 0 deletions objects/cues.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package objects

type Cues struct {
Periods map[string]Span `json:"periods"`
Recesses []Span `json:"recesses"`
}
8 changes: 8 additions & 0 deletions objects/day.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package objects

type Day struct {
Date string `json:"date"`
Classes map[string]Class `json:"classes"`
Events []Event `json:"events"`
DayEvents []DayEvent `json:"day_events"`
}
7 changes: 7 additions & 0 deletions objects/dayevent.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package objects

type DayEvent struct {
Title string `json:"title"`
Location string `json:"location"`
Hosts []string `json:"hosts"`
}
11 changes: 11 additions & 0 deletions objects/event.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package objects

import "time"

type Event struct {
From time.Time `json:"from"`
To time.Time `json:"to"`
Title string `json:"title"`
Location string `json:"location"`
Hosts []string `json:"hosts"`
}
8 changes: 8 additions & 0 deletions objects/span.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package objects

import "time"

type Span struct {
From time.Time `json:"from"`
To time.Time `json:"to"`
}

0 comments on commit ec4e04b

Please sign in to comment.