2019-03-11 20:12:49 +01:00
/ * *
* TheCitadelofRicks
*
* Copyright 2019 < seil0 @mosad . xyz >
*
* This program is free software ; you can redistribute it and / or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation ; either version 3 of the License , or
* ( at your option ) any later version .
*
* This program is distributed in the hope that it will be useful ,
* but WITHOUT ANY WARRANTY ; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
* GNU General Public License for more details .
*
* You should have received a copy of the GNU General Public License
* along with this program ; if not , write to the Free Software
* Foundation , Inc . , 51 Franklin Street , Fifth Floor , Boston ,
* MA 02110 - 1301 , USA .
*
* /
package org.mosad.thecitadelofricks
2019-03-13 15:13:53 +01:00
import java.time.LocalDateTime
import java.util.*
2019-03-12 22:06:04 +01:00
// data classes for the course part
data class Course ( val courseName : String , val courseLink : String )
2019-03-11 20:12:49 +01:00
2019-05-28 12:49:25 +02:00
data class CourseMeta ( val updateTime : Long , val totalCourses : Int )
2019-03-11 20:12:49 +01:00
2019-05-28 12:49:25 +02:00
data class CourseList ( val meta : CourseMeta , val courses : ArrayList < Course > )
2019-03-12 22:06:04 +01:00
// data classes for the Mensa part
2019-03-11 20:12:49 +01:00
data class Meal ( val day : String , val heading : String , val parts : ArrayList < String > , val additives : String )
2019-03-12 22:06:04 +01:00
data class Meals ( val meals : ArrayList < Meal > )
2019-03-13 15:13:53 +01:00
data class MensaWeek ( val days : Array < Meals > = Array ( 7 ) { Meals ( ArrayList ( ) ) } )
2019-03-12 22:06:04 +01:00
2019-03-16 00:00:34 +01:00
data class MensaMeta ( val updateTime : Long , val mensaName : String )
2019-03-12 22:06:04 +01:00
2019-06-02 19:04:20 +02:00
data class MensaMenu ( val meta : MensaMeta , val currentWeek : MensaWeek , val nextWeek : MensaWeek )
2019-03-12 22:06:04 +01:00
// data classes for the timetable part
2019-03-13 19:12:05 +01:00
data class Lesson (
val lessonID : String ,
val lessonSubject : String ,
val lessonTeacher : String ,
val lessonRoom : String ,
val lessonRemark : String
)
2019-03-12 22:06:04 +01:00
2019-03-13 19:12:05 +01:00
data class TimetableDay ( val timeslots : Array < ArrayList < Lesson > > = Array ( 6 ) { ArrayList < Lesson > ( ) } )
2019-03-11 20:12:49 +01:00
2019-03-12 22:06:04 +01:00
data class TimetableWeek ( val days : Array < TimetableDay > = Array ( 6 ) { TimetableDay ( ) } )
2019-03-11 20:12:49 +01:00
2019-09-06 23:10:35 +02:00
data class TimetableCourseMeta ( var updateTime : Long , val courseName : String , val weekIndex : Int , val weekNumberYear : Int , val link : String )
2019-03-11 20:12:49 +01:00
2019-03-15 23:57:31 +01:00
data class TimetableCourseWeek ( val meta : TimetableCourseMeta , var timetable : TimetableWeek )
2019-03-13 15:13:53 +01:00
// data classes for the status part
2019-10-05 17:17:26 +02:00
data class TimetableCounter ( var courseName : String , var requests : Int )
2019-03-13 19:12:05 +01:00
data class Status (
val time : LocalDateTime ,
val uptime : String ,
val apiVersion : String ,
2019-03-18 16:13:13 +01:00
val softwareVersion : String ,
2019-03-18 19:11:20 +01:00
val requestCount : Int ,
2019-10-05 17:17:26 +02:00
val mensaMenuRequests : Int ,
val timetableRequests : ArrayList < TimetableCounter > ,
2019-06-03 12:20:01 +02:00
val timetableListSize : Int ,
2019-03-13 19:12:05 +01:00
val coursesLastUpdate : Date ,
val mensaLastUpdate : Date ,
val hsoResponseCode : Int ,
val swfrResponseCode : Int
)