Client/lib/api/webuntis/queries/getTimetable/getTimetableResponse.dart

140 lines
4.1 KiB
Dart

import 'package:json_annotation/json_annotation.dart';
import '../../../apiResponse.dart';
part 'getTimetableResponse.g.dart';
@JsonSerializable(explicitToJson: true)
class GetTimetableResponse extends ApiResponse {
Set<GetTimetableResponseObject> result;
GetTimetableResponse(this.result);
factory GetTimetableResponse.fromJson(Map<String, dynamic> json) => _$GetTimetableResponseFromJson(json);
Map<String, dynamic> toJson() => _$GetTimetableResponseToJson(this);
}
@JsonSerializable(explicitToJson: true)
class GetTimetableResponseObject {
int id;
int date;
int startTime;
int endTime;
String? lstype;
String? code;
String? info;
String? substText;
String? lstext;
int? lsnumber;
String? statflags;
String? activityType;
String? sg;
String? bkRemark;
String? bkText;
List<GetTimetableResponseObjectClass> kl;
List<GetTimetableResponseObjectTeacher> te;
List<GetTimetableResponseObjectSubject> su;
List<GetTimetableResponseObjectRoom> ro;
GetTimetableResponseObject({
required this.id,
required this.date,
required this.startTime,
required this.endTime,
this.lstype,
this.code,
this.info,
this.substText,
this.lstext,
this.lsnumber,
this.statflags,
this.activityType,
this.sg,
this.bkRemark,
required this.kl,
required this.te,
required this.su,
required this.ro
});
factory GetTimetableResponseObject.fromJson(Map<String, dynamic> json) => _$GetTimetableResponseObjectFromJson(json);
Map<String, dynamic> toJson() => _$GetTimetableResponseObjectToJson(this);
}
@JsonSerializable(explicitToJson: true)
class GetTimetableResponseObjectFields {
List<GetTimetableResponseObjectFieldsObject>? te;
GetTimetableResponseObjectFields(this.te);
factory GetTimetableResponseObjectFields.fromJson(Map<String, dynamic> json) => _$GetTimetableResponseObjectFieldsFromJson(json);
Map<String, dynamic> toJson() => _$GetTimetableResponseObjectFieldsToJson(this);
}
@JsonSerializable()
class GetTimetableResponseObjectFieldsObject {
int? id;
String? name;
String? longname;
String? externalkey;
GetTimetableResponseObjectFieldsObject({this.id, this.name, this.longname, this.externalkey});
factory GetTimetableResponseObjectFieldsObject.fromJson(Map<String, dynamic> json) => _$GetTimetableResponseObjectFieldsObjectFromJson(json);
Map<String, dynamic> toJson() => _$GetTimetableResponseObjectFieldsObjectToJson(this);
}
@JsonSerializable()
class GetTimetableResponseObjectClass {
int id;
String name;
String longname;
String? externalkey;
GetTimetableResponseObjectClass(this.id, this.name, this.longname, this.externalkey);
factory GetTimetableResponseObjectClass.fromJson(Map<String, dynamic> json) => _$GetTimetableResponseObjectClassFromJson(json);
Map<String, dynamic> toJson() => _$GetTimetableResponseObjectClassToJson(this);
}
@JsonSerializable()
class GetTimetableResponseObjectTeacher {
int id;
String name;
String longname;
int? orgid;
String? orgname;
String? externalkey;
GetTimetableResponseObjectTeacher(this.id, this.name, this.longname, this.orgid, this.orgname, this.externalkey);
factory GetTimetableResponseObjectTeacher.fromJson(Map<String, dynamic> json) => _$GetTimetableResponseObjectTeacherFromJson(json);
Map<String, dynamic> toJson() => _$GetTimetableResponseObjectTeacherToJson(this);
}
@JsonSerializable()
class GetTimetableResponseObjectSubject {
int id;
String name;
String longname;
GetTimetableResponseObjectSubject(this.id, this.name, this.longname);
factory GetTimetableResponseObjectSubject.fromJson(Map<String, dynamic> json) => _$GetTimetableResponseObjectSubjectFromJson(json);
Map<String, dynamic> toJson() => _$GetTimetableResponseObjectSubjectToJson(this);
}
@JsonSerializable()
class GetTimetableResponseObjectRoom {
int id;
String name;
String longname;
GetTimetableResponseObjectRoom(this.id, this.name, this.longname);
factory GetTimetableResponseObjectRoom.fromJson(Map<String, dynamic> json) => _$GetTimetableResponseObjectRoomFromJson(json);
Map<String, dynamic> toJson() => _$GetTimetableResponseObjectRoomToJson(this);
}