From 0bcdf3506008baa9fb5dddc771902caff4e9d74e Mon Sep 17 00:00:00 2001 From: balint1414 Date: Mon, 29 Sep 2025 21:43:17 +0200 Subject: [PATCH] =?UTF-8?q?AllLessons=20t=C3=B6rl=C3=A9se:=20nincs=20r?= =?UTF-8?q?=C3=A1=20sz=C3=BCks=C3=A9g?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- firka/lib/helpers/api/model/all_lessons.dart | 132 ------------------- 1 file changed, 132 deletions(-) delete mode 100644 firka/lib/helpers/api/model/all_lessons.dart diff --git a/firka/lib/helpers/api/model/all_lessons.dart b/firka/lib/helpers/api/model/all_lessons.dart deleted file mode 100644 index f1c0804..0000000 --- a/firka/lib/helpers/api/model/all_lessons.dart +++ /dev/null @@ -1,132 +0,0 @@ -import 'dart:convert'; - -class AllLessons { - final String schoolId; - final String yearId; - final dynamic classId; - final String? className; - final bool classWorkspace; - final dynamic groupId; - final String? groupName; - final bool groupWorkspace; - final String groupWorkspaceName; - final dynamic subjectId; - final String subjectName; - final dynamic teacherId; - final String teacherGuid; - final String teacherName; - final dynamic teacherAnnoId; - final dynamic annoId; - final String? languageId; - final dynamic subjectCategoryId; - final String subjectCategoryName; - final dynamic typeId; - final String typeName; - final dynamic gradeTypeId; - final String gradeTypeName; - final dynamic taskPlaceId; - final String taskPlaceName; - final dynamic teacherAvatarTypeId; - final String teacherAvatarTypePath; - final dynamic taskGroupId; - - AllLessons({ - required this.schoolId, - required this.yearId, - this.classId, - this.className, - required this.classWorkspace, - this.groupId, - this.groupName, - required this.groupWorkspace, - required this.groupWorkspaceName, - required this.subjectId, - required this.subjectName, - required this.teacherId, - required this.teacherGuid, - required this.teacherName, - this.teacherAnnoId, - this.annoId, - this.languageId, - required this.subjectCategoryId, - required this.subjectCategoryName, - required this.typeId, - required this.typeName, - required this.gradeTypeId, - required this.gradeTypeName, - required this.taskPlaceId, - required this.taskPlaceName, - required this.teacherAvatarTypeId, - required this.teacherAvatarTypePath, - this.taskGroupId, - }); - - factory AllLessons.fromJson(Map json) => AllLessons( - schoolId: json['intezmenyId']?.toString() ?? '', - yearId: json['tanevId']?.toString() ?? '', - classId: json['osztalyId'], - className: json['osztalyNev']?.toString(), - classWorkspace: json['osztalyMunkaTer'] == true, - groupId: json['csoportId'], - groupName: json['csoportNev']?.toString(), - groupWorkspace: json['csoportMunkaTer'] == true, - groupWorkspaceName: json['osztalyCsoportNev']?.toString() ?? '', - subjectId: json['tantargyId'], - subjectName: json['tantargyNev']?.toString() ?? '', - teacherId: json['alkalmazottId'], - teacherGuid: json['alkalmazottGuid']?.toString() ?? '', - teacherName: json['alkalmazottNev']?.toString() ?? '', - teacherAnnoId: json['alkalmazottUzenoFalId'], - annoId: json['uzenoFalId'], - languageId: json['nyelvId']?.toString(), - subjectCategoryId: json['tantargyKategoriaId'], - subjectCategoryName: json['tantargyKategoriaNev']?.toString() ?? '', - typeId: json['tipusId'], - typeName: json['tipusNev']?.toString() ?? '', - gradeTypeId: json['evfolyamTipusId'], - gradeTypeName: json['evfolyamTipusNev']?.toString() ?? '', - taskPlaceId: json['feladatEllatasiHelyId'], - taskPlaceName: json['feladatEllatasiHelyNev']?.toString() ?? '', - teacherAvatarTypeId: json['alkalmazottAvatarTipusId'], - teacherAvatarTypePath: - json['alkalmazottAvatarEleres']?.toString() ?? '', - taskGroupId: json['oraiFeladatGroupId'], - ); - - Map toJson() => { - 'intezmenyId': schoolId, - 'tanevId': yearId, - 'osztalyId': classId, - 'osztalyNev': className, - 'osztalyMunkaTer': classWorkspace, - 'csoportId': groupId, - 'csoportNev': groupName, - 'csoportMunkaTer': groupWorkspace, - 'osztalyCsoportNev': groupWorkspaceName, - 'tantargyId': subjectId, - 'tantargyNev': subjectName, - 'alkalmazottId': teacherId, - 'alkalmazottGuid': teacherGuid, - 'alkalmazottNev': teacherName, - 'alkalmazottUzenoFalId': teacherAnnoId, - 'uzenoFalId': annoId, - 'nyelvId': languageId, - 'tantargyKategoriaId': subjectCategoryId, - 'tantargyKategoriaNev': subjectCategoryName, - 'tipusId': typeId, - 'tipusNev': typeName, - 'evfolyamTipusId': gradeTypeId, - 'evfolyamTipusNev': gradeTypeName, - 'feladatEllatasiHelyId': taskPlaceId, - 'feladatEllatasiHelyNev': taskPlaceName, - 'alkalmazottAvatarTipusId': teacherAvatarTypeId, - 'alkalmazottAvatarEleres': teacherAvatarTypePath, - 'oraiFeladatGroupId': taskGroupId, - }; -} - -List lessonsFromJson(String str) => - List.from(json.decode(str).map((x) => AllLessons.fromJson(x))); - -String lessonsToJson(List data) => - json.encode(List.from(data.map((x) => x.toJson())));