Client/lib/api/webuntis/queries/getSubjects/getSubjectsResponse.dart

30 lines
927 B
Dart

import 'package:json_annotation/json_annotation.dart';
import '../../../apiResponse.dart';
part 'getSubjectsResponse.g.dart';
@JsonSerializable(explicitToJson: true)
class GetSubjectsResponse extends ApiResponse {
Set<GetSubjectsResponseObject> result;
GetSubjectsResponse(this.result);
factory GetSubjectsResponse.fromJson(Map<String, dynamic> json) => _$GetSubjectsResponseFromJson(json);
Map<String, dynamic> toJson() => _$GetSubjectsResponseToJson(this);
}
@JsonSerializable(explicitToJson: true)
class GetSubjectsResponseObject {
int id;
String name;
String longName;
String alternateName;
bool active;
GetSubjectsResponseObject(this.id, this.name, this.longName, this.alternateName, this.active);
factory GetSubjectsResponseObject.fromJson(Map<String, dynamic> json) => _$GetSubjectsResponseObjectFromJson(json);
Map<String, dynamic> toJson() => _$GetSubjectsResponseObjectToJson(this);
}