diff --git a/.travis.yml b/.travis.yml
index 80628cc2..d6d0cb03 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -14,7 +14,7 @@ cache:
branches:
only:
- develop
- - 0.15.0
+ - 0.14.0
android:
licenses:
diff --git a/README.en.md b/README.en.md
index 7444ccca..4da00e5d 100644
--- a/README.en.md
+++ b/README.en.md
@@ -7,11 +7,11 @@
[](https://f-droid.org/packages/io.github.wulkanowy/)
[](https://github.com/wulkanowy/wulkanowy/releases)
-Unofficial android VULCAN UONET+ register client for both students and their parents
+Unofficial android VULCAN UONET+ register client for student and parent
## Features
-* logging in using the email and password OR using token and pin
+* logging in using the email and password
* functions from the register website:
* grades
* grade statistics
@@ -24,7 +24,7 @@ Unofficial android VULCAN UONET+ register client for both students and their par
* homework
* notes
* lucky number
-* calculation of the average independently of school's preferences
+* calculation of the average
* notifications, e.g. about a new grade
* dark and black (AMOLED) theme
* offline mode
@@ -32,16 +32,16 @@ Unofficial android VULCAN UONET+ register client for both students and their par
## Download
-You can download the current beta version from the Google Play or the F-Droid store
+You can download the current beta from the Google Play or Fdroid store
[
](https://play.google.com/store/apps/details?id=io.github.wulkanowy)
[
](https://f-droid.org/packages/io.github.wulkanowy/)
-You can also download a [development version](https://wulkanowy.github.io/#download) that includes new features being prepared for the next release
+You can also download a [development version](https://wulkanowy.github.io/#download) that includes new features prepared for the next release
## Built With
diff --git a/README.md b/README.md
index 61b13444..d51115d5 100644
--- a/README.md
+++ b/README.md
@@ -11,7 +11,7 @@ Nieoficjalny klient dziennika VULCAN UONET+ dla ucznia i rodzica
## Funkcje
-* logowanie za pomocą e-maila i hasła LUB tokena i pinu
+* logowanie za pomocą e-maila i hasła
* funkcje ze strony internetowej dziennika:
* oceny
* statystyki ocen
@@ -24,7 +24,7 @@ Nieoficjalny klient dziennika VULCAN UONET+ dla ucznia i rodzica
* zadania domowe
* uwagi
* szczęśliwy numerek
-* obliczanie średniej niezależnie od preferencji szkoły
+* obliczanie średniej
* powiadomienia np. o nowej ocenie
* ciemny i czarny (AMOLED) motyw
* tryb offilne
@@ -32,13 +32,13 @@ Nieoficjalny klient dziennika VULCAN UONET+ dla ucznia i rodzica
## Pobierz
-Aktualną wersję beta możesz pobrać ze sklepu Google Play lub F-Droid
+Aktualną wersję beta możesz pobrać ze sklepu Google Play lub Fdroid
[
](https://play.google.com/store/apps/details?id=io.github.wulkanowy)
[
](https://f-droid.org/packages/io.github.wulkanowy/)
@@ -59,4 +59,4 @@ Wnieś swój wkład w projekt, tworząc PR lub wysyłając issue na GitHub.
## Licencja
-Ten projekt udostępniany jest na licencji Apache License 2.0 - szczegóły w pliku [LICENSE](LICENSE)
+Ten projekt jest licencjonowany w ramach Apache License 2.0 - szczegóły w pliku [LICENSE](LICENSE)
\ No newline at end of file
diff --git a/app/build.gradle b/app/build.gradle
index 24306cd1..d7551376 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -17,8 +17,8 @@ android {
testApplicationId "io.github.tests.wulkanowy"
minSdkVersion 16
targetSdkVersion 29
- versionCode 52
- versionName "0.15.0"
+ versionCode 49
+ versionName "0.14.0"
multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
@@ -110,9 +110,9 @@ play {
}
ext {
- work_manager = "2.3.0"
+ work_manager = "2.3.0-beta02"
room = "2.2.3"
- dagger = "2.25.4"
+ dagger = "2.25.3"
chucker = "2.0.4"
mockk = "1.9.2"
}
@@ -122,14 +122,14 @@ configurations.all {
}
dependencies {
- implementation "io.github.wulkanowy:sdk:0.15.0"
+ implementation "io.github.wulkanowy:sdk:0.14.0"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation "androidx.core:core-ktx:1.2.0-rc01"
- implementation "androidx.activity:activity-ktx:1.1.0"
+ implementation "androidx.activity:activity-ktx:1.1.0-rc03"
implementation "androidx.appcompat:appcompat:1.1.0"
implementation "androidx.appcompat:appcompat-resources:1.1.0"
- implementation "androidx.fragment:fragment-ktx:1.2.0"
+ implementation "androidx.fragment:fragment-ktx:1.2.0-rc04"
implementation "androidx.annotation:annotation:1.1.0"
implementation "androidx.multidex:multidex:2.0.1"
@@ -139,7 +139,7 @@ dependencies {
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0-alpha03"
implementation "androidx.constraintlayout:constraintlayout:1.1.3"
implementation "androidx.coordinatorlayout:coordinatorlayout:1.1.0"
- implementation "com.google.android.material:material:1.1.0-rc02"
+ implementation "com.google.android.material:material:1.1.0-rc01"
implementation "com.github.wulkanowy:material-chips-input:2.0.1"
implementation "com.github.PhilJay:MPAndroidChart:v3.1.0"
implementation "me.zhanghai.android.materialprogressbar:library:1.6.1"
@@ -167,18 +167,17 @@ dependencies {
implementation "com.github.pwittchen:reactivenetwork-rx2:3.0.6"
implementation "io.reactivex.rxjava2:rxandroid:2.1.1"
- implementation "io.reactivex.rxjava2:rxjava:2.2.17"
+ implementation "io.reactivex.rxjava2:rxjava:2.2.16"
implementation "com.google.code.gson:gson:2.8.6"
- implementation "com.jakewharton.threetenabp:threetenabp:1.2.2"
+ implementation "com.jakewharton.threetenabp:threetenabp:1.2.1"
implementation "com.jakewharton.timber:timber:4.7.1"
implementation "at.favre.lib:slf4j-timber:1.0.1"
- implementation "com.mikepenz:aboutlibraries-core:7.1.0"
+ implementation "com.squareup.okhttp3:logging-interceptor:3.12.6"
+ implementation "com.mikepenz:aboutlibraries:7.0.4"
implementation 'com.wdullaer:materialdatetimepicker:4.2.3'
- implementation("io.coil-kt:coil:0.9.2")
-
- playImplementation "com.google.firebase:firebase-core:17.2.2"
+ playImplementation "com.google.firebase:firebase-core:17.2.1"
playImplementation "com.crashlytics.sdk.android:crashlytics:2.10.1"
releaseImplementation "fr.o80.chucker:library-no-op:$chucker"
@@ -186,9 +185,9 @@ dependencies {
debugImplementation "fr.o80.chucker:library:$chucker"
debugImplementation "com.amitshekhar.android:debug-db:1.0.6"
- testImplementation "junit:junit:4.13"
+ testImplementation "junit:junit:4.12"
testImplementation "io.mockk:mockk:$mockk"
- testImplementation "org.threeten:threetenbp:1.4.1"
+ testImplementation "org.threeten:threetenbp:1.4.0"
testImplementation "org.mockito:mockito-inline:3.2.4"
androidTestImplementation "androidx.test:core:1.2.0"
diff --git a/app/jacoco.gradle b/app/jacoco.gradle
index e9abfb61..48a8fed9 100644
--- a/app/jacoco.gradle
+++ b/app/jacoco.gradle
@@ -1,7 +1,7 @@
apply plugin: "jacoco"
jacoco {
- toolVersion "0.8.5"
+ toolVersion "0.8.4"
reportsDir = file("$buildDir/reports")
}
diff --git a/app/schemas/io.github.wulkanowy.data.db.AppDatabase/20.json b/app/schemas/io.github.wulkanowy.data.db.AppDatabase/20.json
deleted file mode 100644
index 925d787a..00000000
--- a/app/schemas/io.github.wulkanowy.data.db.AppDatabase/20.json
+++ /dev/null
@@ -1,1634 +0,0 @@
-{
- "formatVersion": 1,
- "database": {
- "version": 20,
- "identityHash": "37a216a7afcea922b66001ca5ed6cf74",
- "entities": [
- {
- "tableName": "Students",
- "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `scrapper_base_url` TEXT NOT NULL, `mobile_base_url` TEXT NOT NULL, `login_type` TEXT NOT NULL, `login_mode` TEXT NOT NULL, `certificate_key` TEXT NOT NULL, `private_key` TEXT NOT NULL, `is_parent` INTEGER NOT NULL, `email` TEXT NOT NULL, `password` TEXT NOT NULL, `symbol` TEXT NOT NULL, `student_id` INTEGER NOT NULL, `user_login_id` INTEGER NOT NULL, `student_name` TEXT NOT NULL, `school_id` TEXT NOT NULL, `school_name` TEXT NOT NULL, `class_name` TEXT NOT NULL, `class_id` INTEGER NOT NULL, `is_current` INTEGER NOT NULL, `registration_date` INTEGER NOT NULL)",
- "fields": [
- {
- "fieldPath": "id",
- "columnName": "id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "scrapperBaseUrl",
- "columnName": "scrapper_base_url",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "mobileBaseUrl",
- "columnName": "mobile_base_url",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "loginType",
- "columnName": "login_type",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "loginMode",
- "columnName": "login_mode",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "certificateKey",
- "columnName": "certificate_key",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "privateKey",
- "columnName": "private_key",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "isParent",
- "columnName": "is_parent",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "email",
- "columnName": "email",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "password",
- "columnName": "password",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "symbol",
- "columnName": "symbol",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "studentId",
- "columnName": "student_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "userLoginId",
- "columnName": "user_login_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "studentName",
- "columnName": "student_name",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "schoolSymbol",
- "columnName": "school_id",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "schoolName",
- "columnName": "school_name",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "className",
- "columnName": "class_name",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "classId",
- "columnName": "class_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "isCurrent",
- "columnName": "is_current",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "registrationDate",
- "columnName": "registration_date",
- "affinity": "INTEGER",
- "notNull": true
- }
- ],
- "primaryKey": {
- "columnNames": [
- "id"
- ],
- "autoGenerate": true
- },
- "indices": [
- {
- "name": "index_Students_email_symbol_student_id_school_id_class_id",
- "unique": true,
- "columnNames": [
- "email",
- "symbol",
- "student_id",
- "school_id",
- "class_id"
- ],
- "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_Students_email_symbol_student_id_school_id_class_id` ON `${TABLE_NAME}` (`email`, `symbol`, `student_id`, `school_id`, `class_id`)"
- }
- ],
- "foreignKeys": []
- },
- {
- "tableName": "Semesters",
- "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `student_id` INTEGER NOT NULL, `diary_id` INTEGER NOT NULL, `diary_name` TEXT NOT NULL, `school_year` INTEGER NOT NULL, `semester_id` INTEGER NOT NULL, `semester_name` INTEGER NOT NULL, `is_current` INTEGER NOT NULL, `start` INTEGER NOT NULL, `end` INTEGER NOT NULL, `class_id` INTEGER NOT NULL, `unit_id` INTEGER NOT NULL)",
- "fields": [
- {
- "fieldPath": "id",
- "columnName": "id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "studentId",
- "columnName": "student_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "diaryId",
- "columnName": "diary_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "diaryName",
- "columnName": "diary_name",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "schoolYear",
- "columnName": "school_year",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "semesterId",
- "columnName": "semester_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "semesterName",
- "columnName": "semester_name",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "isCurrent",
- "columnName": "is_current",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "start",
- "columnName": "start",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "end",
- "columnName": "end",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "classId",
- "columnName": "class_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "unitId",
- "columnName": "unit_id",
- "affinity": "INTEGER",
- "notNull": true
- }
- ],
- "primaryKey": {
- "columnNames": [
- "id"
- ],
- "autoGenerate": true
- },
- "indices": [
- {
- "name": "index_Semesters_student_id_diary_id_semester_id",
- "unique": true,
- "columnNames": [
- "student_id",
- "diary_id",
- "semester_id"
- ],
- "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_Semesters_student_id_diary_id_semester_id` ON `${TABLE_NAME}` (`student_id`, `diary_id`, `semester_id`)"
- }
- ],
- "foreignKeys": []
- },
- {
- "tableName": "Exams",
- "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `student_id` INTEGER NOT NULL, `diary_id` INTEGER NOT NULL, `date` INTEGER NOT NULL, `entry_date` INTEGER NOT NULL, `subject` TEXT NOT NULL, `group` TEXT NOT NULL, `type` TEXT NOT NULL, `description` TEXT NOT NULL, `teacher` TEXT NOT NULL, `teacher_symbol` TEXT NOT NULL)",
- "fields": [
- {
- "fieldPath": "id",
- "columnName": "id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "studentId",
- "columnName": "student_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "diaryId",
- "columnName": "diary_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "date",
- "columnName": "date",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "entryDate",
- "columnName": "entry_date",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "subject",
- "columnName": "subject",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "group",
- "columnName": "group",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "type",
- "columnName": "type",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "description",
- "columnName": "description",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "teacher",
- "columnName": "teacher",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "teacherSymbol",
- "columnName": "teacher_symbol",
- "affinity": "TEXT",
- "notNull": true
- }
- ],
- "primaryKey": {
- "columnNames": [
- "id"
- ],
- "autoGenerate": true
- },
- "indices": [],
- "foreignKeys": []
- },
- {
- "tableName": "Timetable",
- "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `student_id` INTEGER NOT NULL, `diary_id` INTEGER NOT NULL, `number` INTEGER NOT NULL, `start` INTEGER NOT NULL, `end` INTEGER NOT NULL, `date` INTEGER NOT NULL, `subject` TEXT NOT NULL, `subjectOld` TEXT NOT NULL, `group` TEXT NOT NULL, `room` TEXT NOT NULL, `roomOld` TEXT NOT NULL, `teacher` TEXT NOT NULL, `teacherOld` TEXT NOT NULL, `info` TEXT NOT NULL, `student_plan` INTEGER NOT NULL, `changes` INTEGER NOT NULL, `canceled` INTEGER NOT NULL)",
- "fields": [
- {
- "fieldPath": "id",
- "columnName": "id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "studentId",
- "columnName": "student_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "diaryId",
- "columnName": "diary_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "number",
- "columnName": "number",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "start",
- "columnName": "start",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "end",
- "columnName": "end",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "date",
- "columnName": "date",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "subject",
- "columnName": "subject",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "subjectOld",
- "columnName": "subjectOld",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "group",
- "columnName": "group",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "room",
- "columnName": "room",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "roomOld",
- "columnName": "roomOld",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "teacher",
- "columnName": "teacher",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "teacherOld",
- "columnName": "teacherOld",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "info",
- "columnName": "info",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "studentPlan",
- "columnName": "student_plan",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "changes",
- "columnName": "changes",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "canceled",
- "columnName": "canceled",
- "affinity": "INTEGER",
- "notNull": true
- }
- ],
- "primaryKey": {
- "columnNames": [
- "id"
- ],
- "autoGenerate": true
- },
- "indices": [],
- "foreignKeys": []
- },
- {
- "tableName": "Attendance",
- "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `student_id` INTEGER NOT NULL, `diary_id` INTEGER NOT NULL, `date` INTEGER NOT NULL, `number` INTEGER NOT NULL, `subject` TEXT NOT NULL, `name` TEXT NOT NULL, `presence` INTEGER NOT NULL, `absence` INTEGER NOT NULL, `exemption` INTEGER NOT NULL, `lateness` INTEGER NOT NULL, `excused` INTEGER NOT NULL, `deleted` INTEGER NOT NULL)",
- "fields": [
- {
- "fieldPath": "id",
- "columnName": "id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "studentId",
- "columnName": "student_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "diaryId",
- "columnName": "diary_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "date",
- "columnName": "date",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "number",
- "columnName": "number",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "subject",
- "columnName": "subject",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "name",
- "columnName": "name",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "presence",
- "columnName": "presence",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "absence",
- "columnName": "absence",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "exemption",
- "columnName": "exemption",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "lateness",
- "columnName": "lateness",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "excused",
- "columnName": "excused",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "deleted",
- "columnName": "deleted",
- "affinity": "INTEGER",
- "notNull": true
- }
- ],
- "primaryKey": {
- "columnNames": [
- "id"
- ],
- "autoGenerate": true
- },
- "indices": [],
- "foreignKeys": []
- },
- {
- "tableName": "AttendanceSummary",
- "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `student_id` INTEGER NOT NULL, `diary_id` INTEGER NOT NULL, `subject_id` INTEGER NOT NULL, `month` INTEGER NOT NULL, `presence` INTEGER NOT NULL, `absence` INTEGER NOT NULL, `absence_excused` INTEGER NOT NULL, `absence_for_school_reasons` INTEGER NOT NULL, `lateness` INTEGER NOT NULL, `lateness_excused` INTEGER NOT NULL, `exemption` INTEGER NOT NULL)",
- "fields": [
- {
- "fieldPath": "id",
- "columnName": "id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "studentId",
- "columnName": "student_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "diaryId",
- "columnName": "diary_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "subjectId",
- "columnName": "subject_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "month",
- "columnName": "month",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "presence",
- "columnName": "presence",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "absence",
- "columnName": "absence",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "absenceExcused",
- "columnName": "absence_excused",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "absenceForSchoolReasons",
- "columnName": "absence_for_school_reasons",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "lateness",
- "columnName": "lateness",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "latenessExcused",
- "columnName": "lateness_excused",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "exemption",
- "columnName": "exemption",
- "affinity": "INTEGER",
- "notNull": true
- }
- ],
- "primaryKey": {
- "columnNames": [
- "id"
- ],
- "autoGenerate": true
- },
- "indices": [],
- "foreignKeys": []
- },
- {
- "tableName": "Grades",
- "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `is_read` INTEGER NOT NULL, `is_notified` INTEGER NOT NULL, `semester_id` INTEGER NOT NULL, `student_id` INTEGER NOT NULL, `subject` TEXT NOT NULL, `entry` TEXT NOT NULL, `value` REAL NOT NULL, `modifier` REAL NOT NULL, `comment` TEXT NOT NULL, `color` TEXT NOT NULL, `grade_symbol` TEXT NOT NULL, `description` TEXT NOT NULL, `weight` TEXT NOT NULL, `weightValue` REAL NOT NULL, `date` INTEGER NOT NULL, `teacher` TEXT NOT NULL)",
- "fields": [
- {
- "fieldPath": "id",
- "columnName": "id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "isRead",
- "columnName": "is_read",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "isNotified",
- "columnName": "is_notified",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "semesterId",
- "columnName": "semester_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "studentId",
- "columnName": "student_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "subject",
- "columnName": "subject",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "entry",
- "columnName": "entry",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "value",
- "columnName": "value",
- "affinity": "REAL",
- "notNull": true
- },
- {
- "fieldPath": "modifier",
- "columnName": "modifier",
- "affinity": "REAL",
- "notNull": true
- },
- {
- "fieldPath": "comment",
- "columnName": "comment",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "color",
- "columnName": "color",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "gradeSymbol",
- "columnName": "grade_symbol",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "description",
- "columnName": "description",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "weight",
- "columnName": "weight",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "weightValue",
- "columnName": "weightValue",
- "affinity": "REAL",
- "notNull": true
- },
- {
- "fieldPath": "date",
- "columnName": "date",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "teacher",
- "columnName": "teacher",
- "affinity": "TEXT",
- "notNull": true
- }
- ],
- "primaryKey": {
- "columnNames": [
- "id"
- ],
- "autoGenerate": true
- },
- "indices": [],
- "foreignKeys": []
- },
- {
- "tableName": "GradesSummary",
- "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `semester_id` INTEGER NOT NULL, `student_id` INTEGER NOT NULL, `position` INTEGER NOT NULL, `subject` TEXT NOT NULL, `predicted_grade` TEXT NOT NULL, `final_grade` TEXT NOT NULL, `proposed_points` TEXT NOT NULL, `final_points` TEXT NOT NULL, `points_sum` TEXT NOT NULL, `average` REAL NOT NULL)",
- "fields": [
- {
- "fieldPath": "id",
- "columnName": "id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "semesterId",
- "columnName": "semester_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "studentId",
- "columnName": "student_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "position",
- "columnName": "position",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "subject",
- "columnName": "subject",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "predictedGrade",
- "columnName": "predicted_grade",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "finalGrade",
- "columnName": "final_grade",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "proposedPoints",
- "columnName": "proposed_points",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "finalPoints",
- "columnName": "final_points",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "pointsSum",
- "columnName": "points_sum",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "average",
- "columnName": "average",
- "affinity": "REAL",
- "notNull": true
- }
- ],
- "primaryKey": {
- "columnNames": [
- "id"
- ],
- "autoGenerate": true
- },
- "indices": [],
- "foreignKeys": []
- },
- {
- "tableName": "GradesStatistics",
- "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `student_id` INTEGER NOT NULL, `semester_id` INTEGER NOT NULL, `subject` TEXT NOT NULL, `grade` INTEGER NOT NULL, `amount` INTEGER NOT NULL, `is_semester` INTEGER NOT NULL)",
- "fields": [
- {
- "fieldPath": "id",
- "columnName": "id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "studentId",
- "columnName": "student_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "semesterId",
- "columnName": "semester_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "subject",
- "columnName": "subject",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "grade",
- "columnName": "grade",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "amount",
- "columnName": "amount",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "semester",
- "columnName": "is_semester",
- "affinity": "INTEGER",
- "notNull": true
- }
- ],
- "primaryKey": {
- "columnNames": [
- "id"
- ],
- "autoGenerate": true
- },
- "indices": [],
- "foreignKeys": []
- },
- {
- "tableName": "GradesPointsStatistics",
- "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `student_id` INTEGER NOT NULL, `semester_id` INTEGER NOT NULL, `subject` TEXT NOT NULL, `others` REAL NOT NULL, `student` REAL NOT NULL)",
- "fields": [
- {
- "fieldPath": "id",
- "columnName": "id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "studentId",
- "columnName": "student_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "semesterId",
- "columnName": "semester_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "subject",
- "columnName": "subject",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "others",
- "columnName": "others",
- "affinity": "REAL",
- "notNull": true
- },
- {
- "fieldPath": "student",
- "columnName": "student",
- "affinity": "REAL",
- "notNull": true
- }
- ],
- "primaryKey": {
- "columnNames": [
- "id"
- ],
- "autoGenerate": true
- },
- "indices": [],
- "foreignKeys": []
- },
- {
- "tableName": "Messages",
- "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `is_notified` INTEGER NOT NULL, `student_id` INTEGER NOT NULL, `real_id` INTEGER NOT NULL, `message_id` INTEGER NOT NULL, `sender_name` TEXT NOT NULL, `sender_id` INTEGER NOT NULL, `recipient_name` TEXT NOT NULL, `subject` TEXT NOT NULL, `content` TEXT NOT NULL, `date` INTEGER NOT NULL, `folder_id` INTEGER NOT NULL, `unread` INTEGER NOT NULL, `unread_by` INTEGER NOT NULL, `read_by` INTEGER NOT NULL, `removed` INTEGER NOT NULL)",
- "fields": [
- {
- "fieldPath": "id",
- "columnName": "id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "isNotified",
- "columnName": "is_notified",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "studentId",
- "columnName": "student_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "realId",
- "columnName": "real_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "messageId",
- "columnName": "message_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "sender",
- "columnName": "sender_name",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "senderId",
- "columnName": "sender_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "recipient",
- "columnName": "recipient_name",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "subject",
- "columnName": "subject",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "content",
- "columnName": "content",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "date",
- "columnName": "date",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "folderId",
- "columnName": "folder_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "unread",
- "columnName": "unread",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "unreadBy",
- "columnName": "unread_by",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "readBy",
- "columnName": "read_by",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "removed",
- "columnName": "removed",
- "affinity": "INTEGER",
- "notNull": true
- }
- ],
- "primaryKey": {
- "columnNames": [
- "id"
- ],
- "autoGenerate": true
- },
- "indices": [],
- "foreignKeys": []
- },
- {
- "tableName": "Notes",
- "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `is_read` INTEGER NOT NULL, `is_notified` INTEGER NOT NULL, `student_id` INTEGER NOT NULL, `date` INTEGER NOT NULL, `teacher` TEXT NOT NULL, `category` TEXT NOT NULL, `content` TEXT NOT NULL)",
- "fields": [
- {
- "fieldPath": "id",
- "columnName": "id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "isRead",
- "columnName": "is_read",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "isNotified",
- "columnName": "is_notified",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "studentId",
- "columnName": "student_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "date",
- "columnName": "date",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "teacher",
- "columnName": "teacher",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "category",
- "columnName": "category",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "content",
- "columnName": "content",
- "affinity": "TEXT",
- "notNull": true
- }
- ],
- "primaryKey": {
- "columnNames": [
- "id"
- ],
- "autoGenerate": true
- },
- "indices": [],
- "foreignKeys": []
- },
- {
- "tableName": "Homework",
- "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `semester_id` INTEGER NOT NULL, `student_id` INTEGER NOT NULL, `date` INTEGER NOT NULL, `entry_date` INTEGER NOT NULL, `subject` TEXT NOT NULL, `content` TEXT NOT NULL, `teacher` TEXT NOT NULL, `teacher_symbol` TEXT NOT NULL)",
- "fields": [
- {
- "fieldPath": "id",
- "columnName": "id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "semesterId",
- "columnName": "semester_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "studentId",
- "columnName": "student_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "date",
- "columnName": "date",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "entryDate",
- "columnName": "entry_date",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "subject",
- "columnName": "subject",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "content",
- "columnName": "content",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "teacher",
- "columnName": "teacher",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "teacherSymbol",
- "columnName": "teacher_symbol",
- "affinity": "TEXT",
- "notNull": true
- }
- ],
- "primaryKey": {
- "columnNames": [
- "id"
- ],
- "autoGenerate": true
- },
- "indices": [],
- "foreignKeys": []
- },
- {
- "tableName": "Subjects",
- "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `student_id` INTEGER NOT NULL, `diary_id` INTEGER NOT NULL, `real_id` INTEGER NOT NULL, `name` TEXT NOT NULL)",
- "fields": [
- {
- "fieldPath": "id",
- "columnName": "id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "studentId",
- "columnName": "student_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "diaryId",
- "columnName": "diary_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "realId",
- "columnName": "real_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "name",
- "columnName": "name",
- "affinity": "TEXT",
- "notNull": true
- }
- ],
- "primaryKey": {
- "columnNames": [
- "id"
- ],
- "autoGenerate": true
- },
- "indices": [],
- "foreignKeys": []
- },
- {
- "tableName": "LuckyNumbers",
- "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `is_notified` INTEGER NOT NULL, `student_id` INTEGER NOT NULL, `date` INTEGER NOT NULL, `lucky_number` INTEGER NOT NULL)",
- "fields": [
- {
- "fieldPath": "id",
- "columnName": "id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "isNotified",
- "columnName": "is_notified",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "studentId",
- "columnName": "student_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "date",
- "columnName": "date",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "luckyNumber",
- "columnName": "lucky_number",
- "affinity": "INTEGER",
- "notNull": true
- }
- ],
- "primaryKey": {
- "columnNames": [
- "id"
- ],
- "autoGenerate": true
- },
- "indices": [],
- "foreignKeys": []
- },
- {
- "tableName": "CompletedLesson",
- "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `student_id` INTEGER NOT NULL, `diary_id` INTEGER NOT NULL, `date` INTEGER NOT NULL, `number` INTEGER NOT NULL, `subject` TEXT NOT NULL, `topic` TEXT NOT NULL, `teacher` TEXT NOT NULL, `teacher_symbol` TEXT NOT NULL, `substitution` TEXT NOT NULL, `absence` TEXT NOT NULL, `resources` TEXT NOT NULL)",
- "fields": [
- {
- "fieldPath": "id",
- "columnName": "id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "studentId",
- "columnName": "student_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "diaryId",
- "columnName": "diary_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "date",
- "columnName": "date",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "number",
- "columnName": "number",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "subject",
- "columnName": "subject",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "topic",
- "columnName": "topic",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "teacher",
- "columnName": "teacher",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "teacherSymbol",
- "columnName": "teacher_symbol",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "substitution",
- "columnName": "substitution",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "absence",
- "columnName": "absence",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "resources",
- "columnName": "resources",
- "affinity": "TEXT",
- "notNull": true
- }
- ],
- "primaryKey": {
- "columnNames": [
- "id"
- ],
- "autoGenerate": true
- },
- "indices": [],
- "foreignKeys": []
- },
- {
- "tableName": "ReportingUnits",
- "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `student_id` INTEGER NOT NULL, `real_id` INTEGER NOT NULL, `short` TEXT NOT NULL, `sender_id` INTEGER NOT NULL, `sender_name` TEXT NOT NULL, `roles` TEXT NOT NULL)",
- "fields": [
- {
- "fieldPath": "id",
- "columnName": "id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "studentId",
- "columnName": "student_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "realId",
- "columnName": "real_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "shortName",
- "columnName": "short",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "senderId",
- "columnName": "sender_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "senderName",
- "columnName": "sender_name",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "roles",
- "columnName": "roles",
- "affinity": "TEXT",
- "notNull": true
- }
- ],
- "primaryKey": {
- "columnNames": [
- "id"
- ],
- "autoGenerate": true
- },
- "indices": [],
- "foreignKeys": []
- },
- {
- "tableName": "Recipients",
- "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `student_id` INTEGER NOT NULL, `real_id` TEXT NOT NULL, `name` TEXT NOT NULL, `real_name` TEXT NOT NULL, `login_id` INTEGER NOT NULL, `unit_id` INTEGER NOT NULL, `role` INTEGER NOT NULL, `hash` TEXT NOT NULL)",
- "fields": [
- {
- "fieldPath": "id",
- "columnName": "id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "studentId",
- "columnName": "student_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "realId",
- "columnName": "real_id",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "name",
- "columnName": "name",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "realName",
- "columnName": "real_name",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "loginId",
- "columnName": "login_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "unitId",
- "columnName": "unit_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "role",
- "columnName": "role",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "hash",
- "columnName": "hash",
- "affinity": "TEXT",
- "notNull": true
- }
- ],
- "primaryKey": {
- "columnNames": [
- "id"
- ],
- "autoGenerate": true
- },
- "indices": [],
- "foreignKeys": []
- },
- {
- "tableName": "MobileDevices",
- "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `student_id` INTEGER NOT NULL, `device_id` INTEGER NOT NULL, `name` TEXT NOT NULL, `date` INTEGER NOT NULL)",
- "fields": [
- {
- "fieldPath": "id",
- "columnName": "id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "studentId",
- "columnName": "student_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "deviceId",
- "columnName": "device_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "name",
- "columnName": "name",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "date",
- "columnName": "date",
- "affinity": "INTEGER",
- "notNull": true
- }
- ],
- "primaryKey": {
- "columnNames": [
- "id"
- ],
- "autoGenerate": true
- },
- "indices": [],
- "foreignKeys": []
- },
- {
- "tableName": "Teachers",
- "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `student_id` INTEGER NOT NULL, `class_id` INTEGER NOT NULL, `subject` TEXT NOT NULL, `name` TEXT NOT NULL, `short_name` TEXT NOT NULL)",
- "fields": [
- {
- "fieldPath": "id",
- "columnName": "id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "studentId",
- "columnName": "student_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "classId",
- "columnName": "class_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "subject",
- "columnName": "subject",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "name",
- "columnName": "name",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "shortName",
- "columnName": "short_name",
- "affinity": "TEXT",
- "notNull": true
- }
- ],
- "primaryKey": {
- "columnNames": [
- "id"
- ],
- "autoGenerate": true
- },
- "indices": [],
- "foreignKeys": []
- },
- {
- "tableName": "School",
- "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `student_id` INTEGER NOT NULL, `class_id` INTEGER NOT NULL, `name` TEXT NOT NULL, `address` TEXT NOT NULL, `contact` TEXT NOT NULL, `headmaster` TEXT NOT NULL, `pedagogue` TEXT NOT NULL)",
- "fields": [
- {
- "fieldPath": "id",
- "columnName": "id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "studentId",
- "columnName": "student_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "classId",
- "columnName": "class_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "name",
- "columnName": "name",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "address",
- "columnName": "address",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "contact",
- "columnName": "contact",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "headmaster",
- "columnName": "headmaster",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "pedagogue",
- "columnName": "pedagogue",
- "affinity": "TEXT",
- "notNull": true
- }
- ],
- "primaryKey": {
- "columnNames": [
- "id"
- ],
- "autoGenerate": true
- },
- "indices": [],
- "foreignKeys": []
- }
- ],
- "views": [],
- "setupQueries": [
- "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
- "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '37a216a7afcea922b66001ca5ed6cf74')"
- ]
- }
-}
\ No newline at end of file
diff --git a/app/schemas/io.github.wulkanowy.data.db.AppDatabase/21.json b/app/schemas/io.github.wulkanowy.data.db.AppDatabase/21.json
deleted file mode 100644
index dfad69f5..00000000
--- a/app/schemas/io.github.wulkanowy.data.db.AppDatabase/21.json
+++ /dev/null
@@ -1,1652 +0,0 @@
-{
- "formatVersion": 1,
- "database": {
- "version": 21,
- "identityHash": "f905d8a3ff4718d30ae7413a5a717b1f",
- "entities": [
- {
- "tableName": "Students",
- "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `scrapper_base_url` TEXT NOT NULL, `mobile_base_url` TEXT NOT NULL, `login_type` TEXT NOT NULL, `login_mode` TEXT NOT NULL, `certificate_key` TEXT NOT NULL, `private_key` TEXT NOT NULL, `is_parent` INTEGER NOT NULL, `email` TEXT NOT NULL, `password` TEXT NOT NULL, `symbol` TEXT NOT NULL, `student_id` INTEGER NOT NULL, `user_login_id` INTEGER NOT NULL, `student_name` TEXT NOT NULL, `school_id` TEXT NOT NULL, `school_name` TEXT NOT NULL, `class_name` TEXT NOT NULL, `class_id` INTEGER NOT NULL, `is_current` INTEGER NOT NULL, `registration_date` INTEGER NOT NULL)",
- "fields": [
- {
- "fieldPath": "id",
- "columnName": "id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "scrapperBaseUrl",
- "columnName": "scrapper_base_url",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "mobileBaseUrl",
- "columnName": "mobile_base_url",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "loginType",
- "columnName": "login_type",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "loginMode",
- "columnName": "login_mode",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "certificateKey",
- "columnName": "certificate_key",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "privateKey",
- "columnName": "private_key",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "isParent",
- "columnName": "is_parent",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "email",
- "columnName": "email",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "password",
- "columnName": "password",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "symbol",
- "columnName": "symbol",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "studentId",
- "columnName": "student_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "userLoginId",
- "columnName": "user_login_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "studentName",
- "columnName": "student_name",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "schoolSymbol",
- "columnName": "school_id",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "schoolName",
- "columnName": "school_name",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "className",
- "columnName": "class_name",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "classId",
- "columnName": "class_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "isCurrent",
- "columnName": "is_current",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "registrationDate",
- "columnName": "registration_date",
- "affinity": "INTEGER",
- "notNull": true
- }
- ],
- "primaryKey": {
- "columnNames": [
- "id"
- ],
- "autoGenerate": true
- },
- "indices": [
- {
- "name": "index_Students_email_symbol_student_id_school_id_class_id",
- "unique": true,
- "columnNames": [
- "email",
- "symbol",
- "student_id",
- "school_id",
- "class_id"
- ],
- "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_Students_email_symbol_student_id_school_id_class_id` ON `${TABLE_NAME}` (`email`, `symbol`, `student_id`, `school_id`, `class_id`)"
- }
- ],
- "foreignKeys": []
- },
- {
- "tableName": "Semesters",
- "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `student_id` INTEGER NOT NULL, `diary_id` INTEGER NOT NULL, `diary_name` TEXT NOT NULL, `school_year` INTEGER NOT NULL, `semester_id` INTEGER NOT NULL, `semester_name` INTEGER NOT NULL, `is_current` INTEGER NOT NULL, `start` INTEGER NOT NULL, `end` INTEGER NOT NULL, `class_id` INTEGER NOT NULL, `unit_id` INTEGER NOT NULL)",
- "fields": [
- {
- "fieldPath": "id",
- "columnName": "id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "studentId",
- "columnName": "student_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "diaryId",
- "columnName": "diary_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "diaryName",
- "columnName": "diary_name",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "schoolYear",
- "columnName": "school_year",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "semesterId",
- "columnName": "semester_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "semesterName",
- "columnName": "semester_name",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "isCurrent",
- "columnName": "is_current",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "start",
- "columnName": "start",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "end",
- "columnName": "end",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "classId",
- "columnName": "class_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "unitId",
- "columnName": "unit_id",
- "affinity": "INTEGER",
- "notNull": true
- }
- ],
- "primaryKey": {
- "columnNames": [
- "id"
- ],
- "autoGenerate": true
- },
- "indices": [
- {
- "name": "index_Semesters_student_id_diary_id_semester_id",
- "unique": true,
- "columnNames": [
- "student_id",
- "diary_id",
- "semester_id"
- ],
- "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_Semesters_student_id_diary_id_semester_id` ON `${TABLE_NAME}` (`student_id`, `diary_id`, `semester_id`)"
- }
- ],
- "foreignKeys": []
- },
- {
- "tableName": "Exams",
- "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `student_id` INTEGER NOT NULL, `diary_id` INTEGER NOT NULL, `date` INTEGER NOT NULL, `entry_date` INTEGER NOT NULL, `subject` TEXT NOT NULL, `group` TEXT NOT NULL, `type` TEXT NOT NULL, `description` TEXT NOT NULL, `teacher` TEXT NOT NULL, `teacher_symbol` TEXT NOT NULL)",
- "fields": [
- {
- "fieldPath": "id",
- "columnName": "id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "studentId",
- "columnName": "student_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "diaryId",
- "columnName": "diary_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "date",
- "columnName": "date",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "entryDate",
- "columnName": "entry_date",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "subject",
- "columnName": "subject",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "group",
- "columnName": "group",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "type",
- "columnName": "type",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "description",
- "columnName": "description",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "teacher",
- "columnName": "teacher",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "teacherSymbol",
- "columnName": "teacher_symbol",
- "affinity": "TEXT",
- "notNull": true
- }
- ],
- "primaryKey": {
- "columnNames": [
- "id"
- ],
- "autoGenerate": true
- },
- "indices": [],
- "foreignKeys": []
- },
- {
- "tableName": "Timetable",
- "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `student_id` INTEGER NOT NULL, `diary_id` INTEGER NOT NULL, `number` INTEGER NOT NULL, `start` INTEGER NOT NULL, `end` INTEGER NOT NULL, `date` INTEGER NOT NULL, `subject` TEXT NOT NULL, `subjectOld` TEXT NOT NULL, `group` TEXT NOT NULL, `room` TEXT NOT NULL, `roomOld` TEXT NOT NULL, `teacher` TEXT NOT NULL, `teacherOld` TEXT NOT NULL, `info` TEXT NOT NULL, `student_plan` INTEGER NOT NULL, `changes` INTEGER NOT NULL, `canceled` INTEGER NOT NULL)",
- "fields": [
- {
- "fieldPath": "id",
- "columnName": "id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "studentId",
- "columnName": "student_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "diaryId",
- "columnName": "diary_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "number",
- "columnName": "number",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "start",
- "columnName": "start",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "end",
- "columnName": "end",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "date",
- "columnName": "date",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "subject",
- "columnName": "subject",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "subjectOld",
- "columnName": "subjectOld",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "group",
- "columnName": "group",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "room",
- "columnName": "room",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "roomOld",
- "columnName": "roomOld",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "teacher",
- "columnName": "teacher",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "teacherOld",
- "columnName": "teacherOld",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "info",
- "columnName": "info",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "studentPlan",
- "columnName": "student_plan",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "changes",
- "columnName": "changes",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "canceled",
- "columnName": "canceled",
- "affinity": "INTEGER",
- "notNull": true
- }
- ],
- "primaryKey": {
- "columnNames": [
- "id"
- ],
- "autoGenerate": true
- },
- "indices": [],
- "foreignKeys": []
- },
- {
- "tableName": "Attendance",
- "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `student_id` INTEGER NOT NULL, `diary_id` INTEGER NOT NULL, `time_id` INTEGER NOT NULL, `date` INTEGER NOT NULL, `number` INTEGER NOT NULL, `subject` TEXT NOT NULL, `name` TEXT NOT NULL, `presence` INTEGER NOT NULL, `absence` INTEGER NOT NULL, `exemption` INTEGER NOT NULL, `lateness` INTEGER NOT NULL, `excused` INTEGER NOT NULL, `deleted` INTEGER NOT NULL, `excusable` INTEGER NOT NULL, `excuse_status` TEXT)",
- "fields": [
- {
- "fieldPath": "id",
- "columnName": "id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "studentId",
- "columnName": "student_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "diaryId",
- "columnName": "diary_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "timeId",
- "columnName": "time_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "date",
- "columnName": "date",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "number",
- "columnName": "number",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "subject",
- "columnName": "subject",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "name",
- "columnName": "name",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "presence",
- "columnName": "presence",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "absence",
- "columnName": "absence",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "exemption",
- "columnName": "exemption",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "lateness",
- "columnName": "lateness",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "excused",
- "columnName": "excused",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "deleted",
- "columnName": "deleted",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "excusable",
- "columnName": "excusable",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "excuseStatus",
- "columnName": "excuse_status",
- "affinity": "TEXT",
- "notNull": false
- }
- ],
- "primaryKey": {
- "columnNames": [
- "id"
- ],
- "autoGenerate": true
- },
- "indices": [],
- "foreignKeys": []
- },
- {
- "tableName": "AttendanceSummary",
- "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `student_id` INTEGER NOT NULL, `diary_id` INTEGER NOT NULL, `subject_id` INTEGER NOT NULL, `month` INTEGER NOT NULL, `presence` INTEGER NOT NULL, `absence` INTEGER NOT NULL, `absence_excused` INTEGER NOT NULL, `absence_for_school_reasons` INTEGER NOT NULL, `lateness` INTEGER NOT NULL, `lateness_excused` INTEGER NOT NULL, `exemption` INTEGER NOT NULL)",
- "fields": [
- {
- "fieldPath": "id",
- "columnName": "id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "studentId",
- "columnName": "student_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "diaryId",
- "columnName": "diary_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "subjectId",
- "columnName": "subject_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "month",
- "columnName": "month",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "presence",
- "columnName": "presence",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "absence",
- "columnName": "absence",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "absenceExcused",
- "columnName": "absence_excused",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "absenceForSchoolReasons",
- "columnName": "absence_for_school_reasons",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "lateness",
- "columnName": "lateness",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "latenessExcused",
- "columnName": "lateness_excused",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "exemption",
- "columnName": "exemption",
- "affinity": "INTEGER",
- "notNull": true
- }
- ],
- "primaryKey": {
- "columnNames": [
- "id"
- ],
- "autoGenerate": true
- },
- "indices": [],
- "foreignKeys": []
- },
- {
- "tableName": "Grades",
- "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `is_read` INTEGER NOT NULL, `is_notified` INTEGER NOT NULL, `semester_id` INTEGER NOT NULL, `student_id` INTEGER NOT NULL, `subject` TEXT NOT NULL, `entry` TEXT NOT NULL, `value` REAL NOT NULL, `modifier` REAL NOT NULL, `comment` TEXT NOT NULL, `color` TEXT NOT NULL, `grade_symbol` TEXT NOT NULL, `description` TEXT NOT NULL, `weight` TEXT NOT NULL, `weightValue` REAL NOT NULL, `date` INTEGER NOT NULL, `teacher` TEXT NOT NULL)",
- "fields": [
- {
- "fieldPath": "id",
- "columnName": "id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "isRead",
- "columnName": "is_read",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "isNotified",
- "columnName": "is_notified",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "semesterId",
- "columnName": "semester_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "studentId",
- "columnName": "student_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "subject",
- "columnName": "subject",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "entry",
- "columnName": "entry",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "value",
- "columnName": "value",
- "affinity": "REAL",
- "notNull": true
- },
- {
- "fieldPath": "modifier",
- "columnName": "modifier",
- "affinity": "REAL",
- "notNull": true
- },
- {
- "fieldPath": "comment",
- "columnName": "comment",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "color",
- "columnName": "color",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "gradeSymbol",
- "columnName": "grade_symbol",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "description",
- "columnName": "description",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "weight",
- "columnName": "weight",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "weightValue",
- "columnName": "weightValue",
- "affinity": "REAL",
- "notNull": true
- },
- {
- "fieldPath": "date",
- "columnName": "date",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "teacher",
- "columnName": "teacher",
- "affinity": "TEXT",
- "notNull": true
- }
- ],
- "primaryKey": {
- "columnNames": [
- "id"
- ],
- "autoGenerate": true
- },
- "indices": [],
- "foreignKeys": []
- },
- {
- "tableName": "GradesSummary",
- "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `semester_id` INTEGER NOT NULL, `student_id` INTEGER NOT NULL, `position` INTEGER NOT NULL, `subject` TEXT NOT NULL, `predicted_grade` TEXT NOT NULL, `final_grade` TEXT NOT NULL, `proposed_points` TEXT NOT NULL, `final_points` TEXT NOT NULL, `points_sum` TEXT NOT NULL, `average` REAL NOT NULL)",
- "fields": [
- {
- "fieldPath": "id",
- "columnName": "id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "semesterId",
- "columnName": "semester_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "studentId",
- "columnName": "student_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "position",
- "columnName": "position",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "subject",
- "columnName": "subject",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "predictedGrade",
- "columnName": "predicted_grade",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "finalGrade",
- "columnName": "final_grade",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "proposedPoints",
- "columnName": "proposed_points",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "finalPoints",
- "columnName": "final_points",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "pointsSum",
- "columnName": "points_sum",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "average",
- "columnName": "average",
- "affinity": "REAL",
- "notNull": true
- }
- ],
- "primaryKey": {
- "columnNames": [
- "id"
- ],
- "autoGenerate": true
- },
- "indices": [],
- "foreignKeys": []
- },
- {
- "tableName": "GradesStatistics",
- "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `student_id` INTEGER NOT NULL, `semester_id` INTEGER NOT NULL, `subject` TEXT NOT NULL, `grade` INTEGER NOT NULL, `amount` INTEGER NOT NULL, `is_semester` INTEGER NOT NULL)",
- "fields": [
- {
- "fieldPath": "id",
- "columnName": "id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "studentId",
- "columnName": "student_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "semesterId",
- "columnName": "semester_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "subject",
- "columnName": "subject",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "grade",
- "columnName": "grade",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "amount",
- "columnName": "amount",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "semester",
- "columnName": "is_semester",
- "affinity": "INTEGER",
- "notNull": true
- }
- ],
- "primaryKey": {
- "columnNames": [
- "id"
- ],
- "autoGenerate": true
- },
- "indices": [],
- "foreignKeys": []
- },
- {
- "tableName": "GradesPointsStatistics",
- "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `student_id` INTEGER NOT NULL, `semester_id` INTEGER NOT NULL, `subject` TEXT NOT NULL, `others` REAL NOT NULL, `student` REAL NOT NULL)",
- "fields": [
- {
- "fieldPath": "id",
- "columnName": "id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "studentId",
- "columnName": "student_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "semesterId",
- "columnName": "semester_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "subject",
- "columnName": "subject",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "others",
- "columnName": "others",
- "affinity": "REAL",
- "notNull": true
- },
- {
- "fieldPath": "student",
- "columnName": "student",
- "affinity": "REAL",
- "notNull": true
- }
- ],
- "primaryKey": {
- "columnNames": [
- "id"
- ],
- "autoGenerate": true
- },
- "indices": [],
- "foreignKeys": []
- },
- {
- "tableName": "Messages",
- "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `is_notified` INTEGER NOT NULL, `student_id` INTEGER NOT NULL, `real_id` INTEGER NOT NULL, `message_id` INTEGER NOT NULL, `sender_name` TEXT NOT NULL, `sender_id` INTEGER NOT NULL, `recipient_name` TEXT NOT NULL, `subject` TEXT NOT NULL, `content` TEXT NOT NULL, `date` INTEGER NOT NULL, `folder_id` INTEGER NOT NULL, `unread` INTEGER NOT NULL, `unread_by` INTEGER NOT NULL, `read_by` INTEGER NOT NULL, `removed` INTEGER NOT NULL)",
- "fields": [
- {
- "fieldPath": "id",
- "columnName": "id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "isNotified",
- "columnName": "is_notified",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "studentId",
- "columnName": "student_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "realId",
- "columnName": "real_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "messageId",
- "columnName": "message_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "sender",
- "columnName": "sender_name",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "senderId",
- "columnName": "sender_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "recipient",
- "columnName": "recipient_name",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "subject",
- "columnName": "subject",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "content",
- "columnName": "content",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "date",
- "columnName": "date",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "folderId",
- "columnName": "folder_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "unread",
- "columnName": "unread",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "unreadBy",
- "columnName": "unread_by",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "readBy",
- "columnName": "read_by",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "removed",
- "columnName": "removed",
- "affinity": "INTEGER",
- "notNull": true
- }
- ],
- "primaryKey": {
- "columnNames": [
- "id"
- ],
- "autoGenerate": true
- },
- "indices": [],
- "foreignKeys": []
- },
- {
- "tableName": "Notes",
- "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `is_read` INTEGER NOT NULL, `is_notified` INTEGER NOT NULL, `student_id` INTEGER NOT NULL, `date` INTEGER NOT NULL, `teacher` TEXT NOT NULL, `category` TEXT NOT NULL, `content` TEXT NOT NULL)",
- "fields": [
- {
- "fieldPath": "id",
- "columnName": "id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "isRead",
- "columnName": "is_read",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "isNotified",
- "columnName": "is_notified",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "studentId",
- "columnName": "student_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "date",
- "columnName": "date",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "teacher",
- "columnName": "teacher",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "category",
- "columnName": "category",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "content",
- "columnName": "content",
- "affinity": "TEXT",
- "notNull": true
- }
- ],
- "primaryKey": {
- "columnNames": [
- "id"
- ],
- "autoGenerate": true
- },
- "indices": [],
- "foreignKeys": []
- },
- {
- "tableName": "Homework",
- "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `semester_id` INTEGER NOT NULL, `student_id` INTEGER NOT NULL, `date` INTEGER NOT NULL, `entry_date` INTEGER NOT NULL, `subject` TEXT NOT NULL, `content` TEXT NOT NULL, `teacher` TEXT NOT NULL, `teacher_symbol` TEXT NOT NULL)",
- "fields": [
- {
- "fieldPath": "id",
- "columnName": "id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "semesterId",
- "columnName": "semester_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "studentId",
- "columnName": "student_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "date",
- "columnName": "date",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "entryDate",
- "columnName": "entry_date",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "subject",
- "columnName": "subject",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "content",
- "columnName": "content",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "teacher",
- "columnName": "teacher",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "teacherSymbol",
- "columnName": "teacher_symbol",
- "affinity": "TEXT",
- "notNull": true
- }
- ],
- "primaryKey": {
- "columnNames": [
- "id"
- ],
- "autoGenerate": true
- },
- "indices": [],
- "foreignKeys": []
- },
- {
- "tableName": "Subjects",
- "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `student_id` INTEGER NOT NULL, `diary_id` INTEGER NOT NULL, `real_id` INTEGER NOT NULL, `name` TEXT NOT NULL)",
- "fields": [
- {
- "fieldPath": "id",
- "columnName": "id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "studentId",
- "columnName": "student_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "diaryId",
- "columnName": "diary_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "realId",
- "columnName": "real_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "name",
- "columnName": "name",
- "affinity": "TEXT",
- "notNull": true
- }
- ],
- "primaryKey": {
- "columnNames": [
- "id"
- ],
- "autoGenerate": true
- },
- "indices": [],
- "foreignKeys": []
- },
- {
- "tableName": "LuckyNumbers",
- "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `is_notified` INTEGER NOT NULL, `student_id` INTEGER NOT NULL, `date` INTEGER NOT NULL, `lucky_number` INTEGER NOT NULL)",
- "fields": [
- {
- "fieldPath": "id",
- "columnName": "id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "isNotified",
- "columnName": "is_notified",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "studentId",
- "columnName": "student_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "date",
- "columnName": "date",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "luckyNumber",
- "columnName": "lucky_number",
- "affinity": "INTEGER",
- "notNull": true
- }
- ],
- "primaryKey": {
- "columnNames": [
- "id"
- ],
- "autoGenerate": true
- },
- "indices": [],
- "foreignKeys": []
- },
- {
- "tableName": "CompletedLesson",
- "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `student_id` INTEGER NOT NULL, `diary_id` INTEGER NOT NULL, `date` INTEGER NOT NULL, `number` INTEGER NOT NULL, `subject` TEXT NOT NULL, `topic` TEXT NOT NULL, `teacher` TEXT NOT NULL, `teacher_symbol` TEXT NOT NULL, `substitution` TEXT NOT NULL, `absence` TEXT NOT NULL, `resources` TEXT NOT NULL)",
- "fields": [
- {
- "fieldPath": "id",
- "columnName": "id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "studentId",
- "columnName": "student_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "diaryId",
- "columnName": "diary_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "date",
- "columnName": "date",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "number",
- "columnName": "number",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "subject",
- "columnName": "subject",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "topic",
- "columnName": "topic",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "teacher",
- "columnName": "teacher",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "teacherSymbol",
- "columnName": "teacher_symbol",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "substitution",
- "columnName": "substitution",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "absence",
- "columnName": "absence",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "resources",
- "columnName": "resources",
- "affinity": "TEXT",
- "notNull": true
- }
- ],
- "primaryKey": {
- "columnNames": [
- "id"
- ],
- "autoGenerate": true
- },
- "indices": [],
- "foreignKeys": []
- },
- {
- "tableName": "ReportingUnits",
- "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `student_id` INTEGER NOT NULL, `real_id` INTEGER NOT NULL, `short` TEXT NOT NULL, `sender_id` INTEGER NOT NULL, `sender_name` TEXT NOT NULL, `roles` TEXT NOT NULL)",
- "fields": [
- {
- "fieldPath": "id",
- "columnName": "id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "studentId",
- "columnName": "student_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "realId",
- "columnName": "real_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "shortName",
- "columnName": "short",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "senderId",
- "columnName": "sender_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "senderName",
- "columnName": "sender_name",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "roles",
- "columnName": "roles",
- "affinity": "TEXT",
- "notNull": true
- }
- ],
- "primaryKey": {
- "columnNames": [
- "id"
- ],
- "autoGenerate": true
- },
- "indices": [],
- "foreignKeys": []
- },
- {
- "tableName": "Recipients",
- "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `student_id` INTEGER NOT NULL, `real_id` TEXT NOT NULL, `name` TEXT NOT NULL, `real_name` TEXT NOT NULL, `login_id` INTEGER NOT NULL, `unit_id` INTEGER NOT NULL, `role` INTEGER NOT NULL, `hash` TEXT NOT NULL)",
- "fields": [
- {
- "fieldPath": "id",
- "columnName": "id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "studentId",
- "columnName": "student_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "realId",
- "columnName": "real_id",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "name",
- "columnName": "name",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "realName",
- "columnName": "real_name",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "loginId",
- "columnName": "login_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "unitId",
- "columnName": "unit_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "role",
- "columnName": "role",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "hash",
- "columnName": "hash",
- "affinity": "TEXT",
- "notNull": true
- }
- ],
- "primaryKey": {
- "columnNames": [
- "id"
- ],
- "autoGenerate": true
- },
- "indices": [],
- "foreignKeys": []
- },
- {
- "tableName": "MobileDevices",
- "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `student_id` INTEGER NOT NULL, `device_id` INTEGER NOT NULL, `name` TEXT NOT NULL, `date` INTEGER NOT NULL)",
- "fields": [
- {
- "fieldPath": "id",
- "columnName": "id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "studentId",
- "columnName": "student_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "deviceId",
- "columnName": "device_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "name",
- "columnName": "name",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "date",
- "columnName": "date",
- "affinity": "INTEGER",
- "notNull": true
- }
- ],
- "primaryKey": {
- "columnNames": [
- "id"
- ],
- "autoGenerate": true
- },
- "indices": [],
- "foreignKeys": []
- },
- {
- "tableName": "Teachers",
- "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `student_id` INTEGER NOT NULL, `class_id` INTEGER NOT NULL, `subject` TEXT NOT NULL, `name` TEXT NOT NULL, `short_name` TEXT NOT NULL)",
- "fields": [
- {
- "fieldPath": "id",
- "columnName": "id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "studentId",
- "columnName": "student_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "classId",
- "columnName": "class_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "subject",
- "columnName": "subject",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "name",
- "columnName": "name",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "shortName",
- "columnName": "short_name",
- "affinity": "TEXT",
- "notNull": true
- }
- ],
- "primaryKey": {
- "columnNames": [
- "id"
- ],
- "autoGenerate": true
- },
- "indices": [],
- "foreignKeys": []
- },
- {
- "tableName": "School",
- "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `student_id` INTEGER NOT NULL, `class_id` INTEGER NOT NULL, `name` TEXT NOT NULL, `address` TEXT NOT NULL, `contact` TEXT NOT NULL, `headmaster` TEXT NOT NULL, `pedagogue` TEXT NOT NULL)",
- "fields": [
- {
- "fieldPath": "id",
- "columnName": "id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "studentId",
- "columnName": "student_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "classId",
- "columnName": "class_id",
- "affinity": "INTEGER",
- "notNull": true
- },
- {
- "fieldPath": "name",
- "columnName": "name",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "address",
- "columnName": "address",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "contact",
- "columnName": "contact",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "headmaster",
- "columnName": "headmaster",
- "affinity": "TEXT",
- "notNull": true
- },
- {
- "fieldPath": "pedagogue",
- "columnName": "pedagogue",
- "affinity": "TEXT",
- "notNull": true
- }
- ],
- "primaryKey": {
- "columnNames": [
- "id"
- ],
- "autoGenerate": true
- },
- "indices": [],
- "foreignKeys": []
- }
- ],
- "views": [],
- "setupQueries": [
- "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
- "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'f905d8a3ff4718d30ae7413a5a717b1f')"
- ]
- }
-}
\ No newline at end of file
diff --git a/app/src/androidTest/java/io/github/wulkanowy/data/repositories/attendance/AttendanceLocalTest.kt b/app/src/androidTest/java/io/github/wulkanowy/data/repositories/attendance/AttendanceLocalTest.kt
index 5fd5b193..69502e74 100644
--- a/app/src/androidTest/java/io/github/wulkanowy/data/repositories/attendance/AttendanceLocalTest.kt
+++ b/app/src/androidTest/java/io/github/wulkanowy/data/repositories/attendance/AttendanceLocalTest.kt
@@ -35,9 +35,9 @@ class AttendanceLocalTest {
@Test
fun saveAndReadTest() {
attendanceLocal.saveAttendance(listOf(
- Attendance(1, 2, 3, LocalDate.of(2018, 9, 10), 0, "", "", false, false, false, false, false, false, false, SentExcuseStatus.ACCEPTED.name),
- Attendance(1, 2, 3, LocalDate.of(2018, 9, 14), 0, "", "", false, false, false, false, false, false, false, SentExcuseStatus.WAITING.name),
- Attendance(1, 2, 3, LocalDate.of(2018, 9, 17), 0, "", "", false, false, false, false, false, false, false, SentExcuseStatus.ACCEPTED.name)
+ Attendance(1, 2, LocalDate.of(2018, 9, 10), 0, "", "", false, false, false, false, false, false),
+ Attendance(1, 2, LocalDate.of(2018, 9, 14), 0, "", "", false, false, false, false, false, false),
+ Attendance(1, 2, LocalDate.of(2018, 9, 17), 0, "", "", false, false, false, false, false, false)
))
val attendance = attendanceLocal
diff --git a/app/src/androidTest/java/io/github/wulkanowy/data/repositories/timetable/TestTimetableEntityCreator.kt b/app/src/androidTest/java/io/github/wulkanowy/data/repositories/timetable/TestTimetableEntityCreator.kt
index 77c06182..e2ce2255 100644
--- a/app/src/androidTest/java/io/github/wulkanowy/data/repositories/timetable/TestTimetableEntityCreator.kt
+++ b/app/src/androidTest/java/io/github/wulkanowy/data/repositories/timetable/TestTimetableEntityCreator.kt
@@ -2,8 +2,8 @@ package io.github.wulkanowy.data.repositories.timetable
import org.threeten.bp.LocalDateTime
import org.threeten.bp.LocalDateTime.now
-import io.github.wulkanowy.data.db.entities.Timetable as TimetableLocal
import io.github.wulkanowy.sdk.pojo.Timetable as TimetableRemote
+import io.github.wulkanowy.data.db.entities.Timetable as TimetableLocal
fun createTimetableLocal(start: LocalDateTime, number: Int, room: String = "", subject: String = "", teacher: String = "", changes: Boolean = false): TimetableLocal {
return TimetableLocal(
@@ -21,7 +21,6 @@ fun createTimetableLocal(start: LocalDateTime, number: Int, room: String = "", s
teacher = teacher,
teacherOld = "",
info = "",
- studentPlan = true,
changes = changes,
canceled = false
)
diff --git a/app/src/debug/res/drawable-anydpi-v24/ic_stat_grade.xml b/app/src/debug/res/drawable-anydpi-v24/ic_stat_grade.xml
deleted file mode 100644
index 832eba83..00000000
--- a/app/src/debug/res/drawable-anydpi-v24/ic_stat_grade.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
diff --git a/app/src/debug/res/drawable-anydpi-v24/ic_stat_luckynumber.xml b/app/src/debug/res/drawable-anydpi-v24/ic_stat_luckynumber.xml
deleted file mode 100644
index 4f3eb98e..00000000
--- a/app/src/debug/res/drawable-anydpi-v24/ic_stat_luckynumber.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
diff --git a/app/src/debug/res/drawable-anydpi-v24/ic_stat_message.xml b/app/src/debug/res/drawable-anydpi-v24/ic_stat_message.xml
deleted file mode 100644
index 8fe12de4..00000000
--- a/app/src/debug/res/drawable-anydpi-v24/ic_stat_message.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
diff --git a/app/src/debug/res/drawable-anydpi-v24/ic_stat_note.xml b/app/src/debug/res/drawable-anydpi-v24/ic_stat_note.xml
deleted file mode 100644
index d30f2233..00000000
--- a/app/src/debug/res/drawable-anydpi-v24/ic_stat_note.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
diff --git a/app/src/debug/res/drawable-hdpi/ic_stat_grade.png b/app/src/debug/res/drawable-hdpi/ic_stat_grade.png
deleted file mode 100644
index 013b7ac4..00000000
Binary files a/app/src/debug/res/drawable-hdpi/ic_stat_grade.png and /dev/null differ
diff --git a/app/src/debug/res/drawable-hdpi/ic_stat_luckynumber.png b/app/src/debug/res/drawable-hdpi/ic_stat_luckynumber.png
deleted file mode 100644
index 74a4d0c5..00000000
Binary files a/app/src/debug/res/drawable-hdpi/ic_stat_luckynumber.png and /dev/null differ
diff --git a/app/src/debug/res/drawable-hdpi/ic_stat_message.png b/app/src/debug/res/drawable-hdpi/ic_stat_message.png
deleted file mode 100644
index be41e343..00000000
Binary files a/app/src/debug/res/drawable-hdpi/ic_stat_message.png and /dev/null differ
diff --git a/app/src/debug/res/drawable-hdpi/ic_stat_note.png b/app/src/debug/res/drawable-hdpi/ic_stat_note.png
deleted file mode 100644
index 1992edf2..00000000
Binary files a/app/src/debug/res/drawable-hdpi/ic_stat_note.png and /dev/null differ
diff --git a/app/src/debug/res/drawable-mdpi/ic_stat_grade.png b/app/src/debug/res/drawable-mdpi/ic_stat_grade.png
deleted file mode 100644
index a5df2a35..00000000
Binary files a/app/src/debug/res/drawable-mdpi/ic_stat_grade.png and /dev/null differ
diff --git a/app/src/debug/res/drawable-mdpi/ic_stat_luckynumber.png b/app/src/debug/res/drawable-mdpi/ic_stat_luckynumber.png
deleted file mode 100644
index 278ed2c6..00000000
Binary files a/app/src/debug/res/drawable-mdpi/ic_stat_luckynumber.png and /dev/null differ
diff --git a/app/src/debug/res/drawable-mdpi/ic_stat_message.png b/app/src/debug/res/drawable-mdpi/ic_stat_message.png
deleted file mode 100644
index 7327a02f..00000000
Binary files a/app/src/debug/res/drawable-mdpi/ic_stat_message.png and /dev/null differ
diff --git a/app/src/debug/res/drawable-mdpi/ic_stat_note.png b/app/src/debug/res/drawable-mdpi/ic_stat_note.png
deleted file mode 100644
index 2fb02098..00000000
Binary files a/app/src/debug/res/drawable-mdpi/ic_stat_note.png and /dev/null differ
diff --git a/app/src/debug/res/drawable-xhdpi/ic_stat_grade.png b/app/src/debug/res/drawable-xhdpi/ic_stat_grade.png
deleted file mode 100644
index c63f810f..00000000
Binary files a/app/src/debug/res/drawable-xhdpi/ic_stat_grade.png and /dev/null differ
diff --git a/app/src/debug/res/drawable-xhdpi/ic_stat_luckynumber.png b/app/src/debug/res/drawable-xhdpi/ic_stat_luckynumber.png
deleted file mode 100644
index 4035ceba..00000000
Binary files a/app/src/debug/res/drawable-xhdpi/ic_stat_luckynumber.png and /dev/null differ
diff --git a/app/src/debug/res/drawable-xhdpi/ic_stat_message.png b/app/src/debug/res/drawable-xhdpi/ic_stat_message.png
deleted file mode 100644
index c4140be8..00000000
Binary files a/app/src/debug/res/drawable-xhdpi/ic_stat_message.png and /dev/null differ
diff --git a/app/src/debug/res/drawable-xhdpi/ic_stat_note.png b/app/src/debug/res/drawable-xhdpi/ic_stat_note.png
deleted file mode 100644
index 6b533c8e..00000000
Binary files a/app/src/debug/res/drawable-xhdpi/ic_stat_note.png and /dev/null differ
diff --git a/app/src/debug/res/drawable-xxhdpi/ic_stat_grade.png b/app/src/debug/res/drawable-xxhdpi/ic_stat_grade.png
deleted file mode 100644
index 13c26b77..00000000
Binary files a/app/src/debug/res/drawable-xxhdpi/ic_stat_grade.png and /dev/null differ
diff --git a/app/src/debug/res/drawable-xxhdpi/ic_stat_luckynumber.png b/app/src/debug/res/drawable-xxhdpi/ic_stat_luckynumber.png
deleted file mode 100644
index da435745..00000000
Binary files a/app/src/debug/res/drawable-xxhdpi/ic_stat_luckynumber.png and /dev/null differ
diff --git a/app/src/debug/res/drawable-xxhdpi/ic_stat_message.png b/app/src/debug/res/drawable-xxhdpi/ic_stat_message.png
deleted file mode 100644
index 9d0fa781..00000000
Binary files a/app/src/debug/res/drawable-xxhdpi/ic_stat_message.png and /dev/null differ
diff --git a/app/src/debug/res/drawable-xxhdpi/ic_stat_note.png b/app/src/debug/res/drawable-xxhdpi/ic_stat_note.png
deleted file mode 100644
index 64da443f..00000000
Binary files a/app/src/debug/res/drawable-xxhdpi/ic_stat_note.png and /dev/null differ
diff --git a/app/src/main/assets/creators.json b/app/src/main/assets/creators.json
deleted file mode 100644
index b99f51e2..00000000
--- a/app/src/main/assets/creators.json
+++ /dev/null
@@ -1,34 +0,0 @@
-[
- {
- "displayName": "Mikołaj Pich",
- "githubUsername": "mklkj"
- },
- {
- "displayName": "Rafał Borcz",
- "githubUsername": "Faierbel"
- },
- {
- "displayName": "Dominik Korsa",
- "githubUsername": "dominik-korsa"
- },
- {
- "displayName": "Kacper Ziubryniewicz",
- "githubUsername": "kapi2289"
- },
- {
- "displayName": "doteq",
- "githubUsername": "doteq"
- },
- {
- "displayName": "Pavuloff",
- "githubUsername": "pavuloff"
- },
- {
- "displayName": "Piotr Romanowski",
- "githubUsername": "v0idzz"
- },
- {
- "displayName": "Dinolek",
- "githubUsername": "Dinolek"
- }
-]
diff --git a/app/src/main/java/io/github/wulkanowy/data/RepositoryModule.kt b/app/src/main/java/io/github/wulkanowy/data/RepositoryModule.kt
index 48e51e3c..1bc4eb61 100644
--- a/app/src/main/java/io/github/wulkanowy/data/RepositoryModule.kt
+++ b/app/src/main/java/io/github/wulkanowy/data/RepositoryModule.kt
@@ -2,7 +2,6 @@ package io.github.wulkanowy.data
import android.content.Context
import android.content.SharedPreferences
-import android.content.res.AssetManager
import android.content.res.Resources
import androidx.preference.PreferenceManager
import com.github.pwittchen.reactivenetwork.library.rx2.internet.observing.InternetObservingSettings
@@ -59,10 +58,6 @@ internal class RepositoryModule {
@Provides
fun provideResources(context: Context): Resources = context.resources
- @Singleton
- @Provides
- fun provideAssets(context: Context): AssetManager = context.assets
-
@Singleton
@Provides
fun provideSharedPref(context: Context): SharedPreferences = PreferenceManager.getDefaultSharedPreferences(context)
diff --git a/app/src/main/java/io/github/wulkanowy/data/db/AppDatabase.kt b/app/src/main/java/io/github/wulkanowy/data/db/AppDatabase.kt
index b5293a53..9ee1b263 100644
--- a/app/src/main/java/io/github/wulkanowy/data/db/AppDatabase.kt
+++ b/app/src/main/java/io/github/wulkanowy/data/db/AppDatabase.kt
@@ -60,8 +60,6 @@ import io.github.wulkanowy.data.db.migrations.Migration17
import io.github.wulkanowy.data.db.migrations.Migration18
import io.github.wulkanowy.data.db.migrations.Migration19
import io.github.wulkanowy.data.db.migrations.Migration2
-import io.github.wulkanowy.data.db.migrations.Migration20
-import io.github.wulkanowy.data.db.migrations.Migration21
import io.github.wulkanowy.data.db.migrations.Migration3
import io.github.wulkanowy.data.db.migrations.Migration4
import io.github.wulkanowy.data.db.migrations.Migration5
@@ -103,7 +101,7 @@ import javax.inject.Singleton
abstract class AppDatabase : RoomDatabase() {
companion object {
- const val VERSION_SCHEMA = 21
+ const val VERSION_SCHEMA = 19
fun getMigrations(sharedPrefProvider: SharedPrefProvider): Array {
return arrayOf(
@@ -124,9 +122,7 @@ abstract class AppDatabase : RoomDatabase() {
Migration16(),
Migration17(),
Migration18(),
- Migration19(sharedPrefProvider),
- Migration20(),
- Migration21()
+ Migration19(sharedPrefProvider)
)
}
diff --git a/app/src/main/java/io/github/wulkanowy/data/db/entities/Attendance.kt b/app/src/main/java/io/github/wulkanowy/data/db/entities/Attendance.kt
index aa8da8db..3c58971a 100644
--- a/app/src/main/java/io/github/wulkanowy/data/db/entities/Attendance.kt
+++ b/app/src/main/java/io/github/wulkanowy/data/db/entities/Attendance.kt
@@ -15,9 +15,6 @@ data class Attendance(
@ColumnInfo(name = "diary_id")
val diaryId: Int,
- @ColumnInfo(name = "time_id")
- val timeId: Int,
-
val date: LocalDate,
val number: Int,
@@ -36,13 +33,7 @@ data class Attendance(
val excused: Boolean,
- val deleted: Boolean,
-
- val excusable: Boolean,
-
- @ColumnInfo(name = "excuse_status")
- val excuseStatus: String?
-
+ val deleted: Boolean
) : Serializable {
@PrimaryKey(autoGenerate = true)
diff --git a/app/src/main/java/io/github/wulkanowy/data/db/entities/Timetable.kt b/app/src/main/java/io/github/wulkanowy/data/db/entities/Timetable.kt
index 313feb62..9bc3d214 100644
--- a/app/src/main/java/io/github/wulkanowy/data/db/entities/Timetable.kt
+++ b/app/src/main/java/io/github/wulkanowy/data/db/entities/Timetable.kt
@@ -40,9 +40,6 @@ data class Timetable(
val info: String,
- @ColumnInfo(name = "student_plan")
- val studentPlan: Boolean,
-
val changes: Boolean,
val canceled: Boolean
diff --git a/app/src/main/java/io/github/wulkanowy/data/db/migrations/Migration20.kt b/app/src/main/java/io/github/wulkanowy/data/db/migrations/Migration20.kt
deleted file mode 100644
index 2fcfc183..00000000
--- a/app/src/main/java/io/github/wulkanowy/data/db/migrations/Migration20.kt
+++ /dev/null
@@ -1,42 +0,0 @@
-package io.github.wulkanowy.data.db.migrations
-
-import androidx.room.migration.Migration
-import androidx.sqlite.db.SupportSQLiteDatabase
-
-class Migration20 : Migration(19, 20) {
-
- override fun migrate(database: SupportSQLiteDatabase) {
- migrateTimetable(database)
- truncateSubjects(database)
- }
-
- private fun migrateTimetable(database: SupportSQLiteDatabase) {
- database.execSQL("DROP TABLE Timetable")
- database.execSQL("""
- CREATE TABLE IF NOT EXISTS `Timetable` (
- `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
- `student_id` INTEGER NOT NULL,
- `diary_id` INTEGER NOT NULL,
- `number` INTEGER NOT NULL,
- `start` INTEGER NOT NULL,
- `end` INTEGER NOT NULL,
- `date` INTEGER NOT NULL,
- `subject` TEXT NOT NULL,
- `subjectOld` TEXT NOT NULL,
- `group` TEXT NOT NULL,
- `room` TEXT NOT NULL,
- `roomOld` TEXT NOT NULL,
- `teacher` TEXT NOT NULL,
- `teacherOld` TEXT NOT NULL,
- `info` TEXT NOT NULL,
- `student_plan` INTEGER NOT NULL,
- `changes` INTEGER NOT NULL,
- `canceled` INTEGER NOT NULL
- )
- """)
- }
-
- private fun truncateSubjects(database: SupportSQLiteDatabase) {
- database.execSQL("DELETE FROM Subjects")
- }
-}
diff --git a/app/src/main/java/io/github/wulkanowy/data/db/migrations/Migration21.kt b/app/src/main/java/io/github/wulkanowy/data/db/migrations/Migration21.kt
deleted file mode 100644
index bc0ff900..00000000
--- a/app/src/main/java/io/github/wulkanowy/data/db/migrations/Migration21.kt
+++ /dev/null
@@ -1,15 +0,0 @@
-package io.github.wulkanowy.data.db.migrations
-
-import androidx.room.migration.Migration
-import androidx.sqlite.db.SupportSQLiteDatabase
-
-class Migration21 : Migration(20, 21) {
-
- override fun migrate(database: SupportSQLiteDatabase) {
- database.execSQL("ALTER TABLE Attendance ADD COLUMN excusable INTEGER NOT NULL DEFAULT 0")
- database.execSQL("ALTER TABLE Attendance ADD COLUMN time_id INTEGER NOT NULL DEFAULT 0")
- database.execSQL("ALTER TABLE Attendance ADD COLUMN excuse_status TEXT DEFAULT NULL")
-
- database.execSQL("DELETE FROM Semesters")
- }
-}
diff --git a/app/src/main/java/io/github/wulkanowy/data/pojos/AppCreator.kt b/app/src/main/java/io/github/wulkanowy/data/pojos/AppCreator.kt
deleted file mode 100644
index d67aa2a7..00000000
--- a/app/src/main/java/io/github/wulkanowy/data/pojos/AppCreator.kt
+++ /dev/null
@@ -1,3 +0,0 @@
-package io.github.wulkanowy.data.pojos
-
-class AppCreator(val displayName: String, val githubUsername: String)
diff --git a/app/src/main/java/io/github/wulkanowy/data/repositories/appcreator/AppCreatorRepository.kt b/app/src/main/java/io/github/wulkanowy/data/repositories/appcreator/AppCreatorRepository.kt
deleted file mode 100644
index 095b3716..00000000
--- a/app/src/main/java/io/github/wulkanowy/data/repositories/appcreator/AppCreatorRepository.kt
+++ /dev/null
@@ -1,20 +0,0 @@
-package io.github.wulkanowy.data.repositories.appcreator
-
-import android.content.res.AssetManager
-import com.google.gson.Gson
-import io.github.wulkanowy.data.pojos.AppCreator
-import io.reactivex.Single
-import javax.inject.Inject
-import javax.inject.Singleton
-
-@Singleton
-class AppCreatorRepository @Inject constructor(private val assets: AssetManager) {
- fun getAppCreators(): Single> {
- return Single.fromCallable> {
- Gson().fromJson(
- assets.open("creators.json").bufferedReader().use { it.readText() },
- Array::class.java
- ).toList()
- }
- }
-}
diff --git a/app/src/main/java/io/github/wulkanowy/data/repositories/attendance/AttendanceRemote.kt b/app/src/main/java/io/github/wulkanowy/data/repositories/attendance/AttendanceRemote.kt
index 1828c2bd..cd7702c1 100644
--- a/app/src/main/java/io/github/wulkanowy/data/repositories/attendance/AttendanceRemote.kt
+++ b/app/src/main/java/io/github/wulkanowy/data/repositories/attendance/AttendanceRemote.kt
@@ -3,11 +3,8 @@ package io.github.wulkanowy.data.repositories.attendance
import io.github.wulkanowy.data.db.entities.Attendance
import io.github.wulkanowy.data.db.entities.Semester
import io.github.wulkanowy.sdk.Sdk
-import io.github.wulkanowy.sdk.pojo.Absent
import io.reactivex.Single
import org.threeten.bp.LocalDate
-import org.threeten.bp.LocalDateTime
-import org.threeten.bp.LocalTime
import javax.inject.Inject
import javax.inject.Singleton
@@ -22,7 +19,6 @@ class AttendanceRemote @Inject constructor(private val sdk: Sdk) {
studentId = semester.studentId,
diaryId = semester.diaryId,
date = it.date,
- timeId = it.timeId,
number = it.number,
subject = it.subject,
name = it.name,
@@ -31,20 +27,9 @@ class AttendanceRemote @Inject constructor(private val sdk: Sdk) {
exemption = it.exemption,
lateness = it.lateness,
excused = it.excused,
- deleted = it.deleted,
- excusable = it.excusable,
- excuseStatus = it.excuseStatus?.name
+ deleted = it.deleted
)
}
}
}
-
- fun excuseAbsence(semester: Semester, absenceList: List, reason: String?): Single {
- return sdk.switchDiary(semester.diaryId, semester.schoolYear).excuseForAbsence(absenceList.map { attendance ->
- Absent(
- date = LocalDateTime.of(attendance.date, LocalTime.of(0, 0)),
- timeId = attendance.timeId
- )
- }, reason)
- }
}
diff --git a/app/src/main/java/io/github/wulkanowy/data/repositories/attendance/AttendanceRepository.kt b/app/src/main/java/io/github/wulkanowy/data/repositories/attendance/AttendanceRepository.kt
index fc3830c2..85102b3c 100644
--- a/app/src/main/java/io/github/wulkanowy/data/repositories/attendance/AttendanceRepository.kt
+++ b/app/src/main/java/io/github/wulkanowy/data/repositories/attendance/AttendanceRepository.kt
@@ -41,8 +41,4 @@ class AttendanceRepository @Inject constructor(
}).map { list -> list.filter { it.date in startDate..endDate } }
}
}
-
- fun excuseForAbsence(semester: Semester, attendanceList: List, reason: String? = null): Single {
- return remote.excuseAbsence(semester, attendanceList, reason)
- }
}
diff --git a/app/src/main/java/io/github/wulkanowy/data/repositories/attendance/SentExcuseStatus.kt b/app/src/main/java/io/github/wulkanowy/data/repositories/attendance/SentExcuseStatus.kt
deleted file mode 100644
index 50d6b8ed..00000000
--- a/app/src/main/java/io/github/wulkanowy/data/repositories/attendance/SentExcuseStatus.kt
+++ /dev/null
@@ -1,7 +0,0 @@
-package io.github.wulkanowy.data.repositories.attendance
-
-enum class SentExcuseStatus(val id: Int = 0) {
- WAITING,
- ACCEPTED,
- DENIED
-}
diff --git a/app/src/main/java/io/github/wulkanowy/data/repositories/gradestatistics/GradeStatisticsLocal.kt b/app/src/main/java/io/github/wulkanowy/data/repositories/gradestatistics/GradeStatisticsLocal.kt
index 279e2959..d636b91a 100644
--- a/app/src/main/java/io/github/wulkanowy/data/repositories/gradestatistics/GradeStatisticsLocal.kt
+++ b/app/src/main/java/io/github/wulkanowy/data/repositories/gradestatistics/GradeStatisticsLocal.kt
@@ -5,7 +5,6 @@ import io.github.wulkanowy.data.db.dao.GradeStatisticsDao
import io.github.wulkanowy.data.db.entities.GradePointsStatistics
import io.github.wulkanowy.data.db.entities.GradeStatistics
import io.github.wulkanowy.data.db.entities.Semester
-import io.github.wulkanowy.utils.roundToDecimalPlaces
import io.reactivex.Maybe
import javax.inject.Inject
import javax.inject.Singleton
@@ -41,9 +40,9 @@ class GradeStatisticsLocal @Inject constructor(
"Wszystkie" -> gradePointsStatisticsDb.loadAll(semester.semesterId, semester.studentId).flatMap { list ->
if (list.isEmpty()) return@flatMap Maybe.empty()
Maybe.just(GradePointsStatistics(semester.studentId, semester.semesterId, subjectName,
- (list.fold(.0) { acc, e -> acc + e.others } / list.size).roundToDecimalPlaces(2),
- (list.fold(.0) { acc, e -> acc + e.student } / list.size).roundToDecimalPlaces(2)
- ))
+ list.fold(.0) { acc, e -> acc + e.others },
+ list.fold(.0) { acc, e -> acc + e.student })
+ )
}
else -> gradePointsStatisticsDb.loadSubject(semester.semesterId, semester.studentId, subjectName)
}
diff --git a/app/src/main/java/io/github/wulkanowy/data/repositories/preferences/PreferencesRepository.kt b/app/src/main/java/io/github/wulkanowy/data/repositories/preferences/PreferencesRepository.kt
index 523caf6c..07a3654a 100644
--- a/app/src/main/java/io/github/wulkanowy/data/repositories/preferences/PreferencesRepository.kt
+++ b/app/src/main/java/io/github/wulkanowy/data/repositories/preferences/PreferencesRepository.kt
@@ -65,9 +65,6 @@ class PreferencesRepository @Inject constructor(
val fillMessageContent: Boolean
get() = getBoolean(R.string.pref_key_fill_message_content, R.bool.pref_default_fill_message_content)
- val showWholeClassPlan: String
- get() = getString(R.string.pref_key_timetable_show_whole_class, R.string.pref_default_timetable_show_whole_class)
-
private fun getString(id: Int, default: Int) = getString(context.getString(id), default)
private fun getString(id: String, default: Int) = sharedPref.getString(id, context.getString(default)) ?: context.getString(default)
diff --git a/app/src/main/java/io/github/wulkanowy/data/repositories/semester/SemesterRepository.kt b/app/src/main/java/io/github/wulkanowy/data/repositories/semester/SemesterRepository.kt
index 6377cb78..95fddc1b 100644
--- a/app/src/main/java/io/github/wulkanowy/data/repositories/semester/SemesterRepository.kt
+++ b/app/src/main/java/io/github/wulkanowy/data/repositories/semester/SemesterRepository.kt
@@ -36,7 +36,7 @@ class SemesterRepository @Inject constructor(
local.saveSemesters(new.uniqueSubtract(old))
}
} else {
- Timber.i("Current semesters list:\n${new.joinToString(separator = "\n")}")
+ Timber.i("Current semesters list:\n${currentSemesters.joinToString(separator = "\n")}")
throw IllegalArgumentException("Current semester can be only one.")
}
}.flatMap { local.getSemesters(student).toSingle(emptyList()) })
diff --git a/app/src/main/java/io/github/wulkanowy/data/repositories/timetable/TimetableRemote.kt b/app/src/main/java/io/github/wulkanowy/data/repositories/timetable/TimetableRemote.kt
index 26e7836a..6036bd40 100644
--- a/app/src/main/java/io/github/wulkanowy/data/repositories/timetable/TimetableRemote.kt
+++ b/app/src/main/java/io/github/wulkanowy/data/repositories/timetable/TimetableRemote.kt
@@ -30,7 +30,6 @@ class TimetableRemote @Inject constructor(private val sdk: Sdk) {
teacher = it.teacher,
teacherOld = it.teacherOld,
info = it.info,
- studentPlan = it.studentPlan,
changes = it.changes,
canceled = it.canceled
)
diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/about/AboutFragment.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/about/AboutFragment.kt
index d9430a47..22276bdf 100644
--- a/app/src/main/java/io/github/wulkanowy/ui/modules/about/AboutFragment.kt
+++ b/app/src/main/java/io/github/wulkanowy/ui/modules/about/AboutFragment.kt
@@ -16,7 +16,6 @@ import eu.davidea.flexibleadapter.common.SmoothScrollLinearLayoutManager
import eu.davidea.flexibleadapter.items.AbstractFlexibleItem
import io.github.wulkanowy.R
import io.github.wulkanowy.ui.base.BaseFragment
-import io.github.wulkanowy.ui.modules.about.creator.CreatorFragment
import io.github.wulkanowy.ui.modules.about.license.LicenseFragment
import io.github.wulkanowy.ui.modules.main.MainActivity
import io.github.wulkanowy.ui.modules.main.MainView
@@ -43,11 +42,6 @@ class AboutFragment : BaseFragment(), AboutView, MainView.TitledView {
Triple(getString(R.string.about_version), "${appInfo.versionName} (${appInfo.versionCode})", getCompatDrawable(R.drawable.ic_all_about))
}
- override val creatorsRes: Triple?
- get() = context?.run {
- Triple(getString(R.string.about_creator), getString(R.string.about_creator_summary), getCompatDrawable(R.drawable.ic_about_creator))
- }
-
override val feedbackRes: Triple?
get() = context?.run {
Triple(getString(R.string.about_feedback), getString(R.string.about_feedback_summary), getCompatDrawable(R.drawable.ic_about_feedback))
@@ -149,10 +143,6 @@ class AboutFragment : BaseFragment(), AboutView, MainView.TitledView {
(activity as? MainActivity)?.pushView(LicenseFragment.newInstance())
}
- override fun openCreators() {
- (activity as? MainActivity)?.pushView(CreatorFragment.newInstance())
- }
-
override fun openPrivacyPolicy() {
context?.openInternetBrowser("https://wulkanowy.github.io/polityka-prywatnosci.html", ::showMessage)
}
diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/about/AboutPresenter.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/about/AboutPresenter.kt
index 66293983..8087c955 100644
--- a/app/src/main/java/io/github/wulkanowy/ui/modules/about/AboutPresenter.kt
+++ b/app/src/main/java/io/github/wulkanowy/ui/modules/about/AboutPresenter.kt
@@ -52,11 +52,6 @@ class AboutPresenter @Inject constructor(
openLicenses()
analytics.logEvent("about_open", "name" to "licenses")
}
- creatorsRes?.first -> {
- Timber.i("Opening creators view")
- openCreators()
- analytics.logEvent("about_open", "name" to "creators")
- }
privacyRes?.first -> {
Timber.i("Opening privacy page ")
openPrivacyPolicy()
@@ -70,7 +65,6 @@ class AboutPresenter @Inject constructor(
view?.run {
updateData(AboutScrollableHeader(), listOfNotNull(
versionRes?.let { (title, summary, image) -> AboutItem(title, summary, image) },
- creatorsRes?.let { (title, summary, image) -> AboutItem(title, summary, image) },
feedbackRes?.let { (title, summary, image) -> AboutItem(title, summary, image) },
faqRes?.let { (title, summary, image) -> AboutItem(title, summary, image) },
discordRes?.let { (title, summary, image) -> AboutItem(title, summary, image) },
diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/about/AboutView.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/about/AboutView.kt
index 228225ec..34850bae 100644
--- a/app/src/main/java/io/github/wulkanowy/ui/modules/about/AboutView.kt
+++ b/app/src/main/java/io/github/wulkanowy/ui/modules/about/AboutView.kt
@@ -7,8 +7,6 @@ interface AboutView : BaseView {
val versionRes: Triple?
- val creatorsRes: Triple?
-
val feedbackRes: Triple?
val faqRes: Triple?
@@ -35,7 +33,5 @@ interface AboutView : BaseView {
fun openLicenses()
- fun openCreators()
-
fun openPrivacyPolicy()
}
diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/about/creator/CreatorFragment.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/about/creator/CreatorFragment.kt
deleted file mode 100644
index 299657ba..00000000
--- a/app/src/main/java/io/github/wulkanowy/ui/modules/about/creator/CreatorFragment.kt
+++ /dev/null
@@ -1,76 +0,0 @@
-package io.github.wulkanowy.ui.modules.about.creator
-
-import android.os.Bundle
-import android.view.LayoutInflater
-import android.view.View
-import android.view.View.GONE
-import android.view.View.VISIBLE
-import android.view.ViewGroup
-import eu.davidea.flexibleadapter.FlexibleAdapter
-import eu.davidea.flexibleadapter.common.FlexibleItemDecoration
-import eu.davidea.flexibleadapter.common.SmoothScrollLinearLayoutManager
-import eu.davidea.flexibleadapter.items.AbstractFlexibleItem
-import io.github.wulkanowy.R
-import io.github.wulkanowy.ui.base.BaseFragment
-import io.github.wulkanowy.ui.modules.main.MainView
-import io.github.wulkanowy.utils.openInternetBrowser
-import io.github.wulkanowy.utils.setOnItemClickListener
-import kotlinx.android.synthetic.main.fragment_creator.*
-import javax.inject.Inject
-
-class CreatorFragment : BaseFragment(), CreatorView, MainView.TitledView {
-
- @Inject
- lateinit var presenter: CreatorPresenter
-
- @Inject
- lateinit var creatorsAdapter: FlexibleAdapter>
-
- override val titleStringId get() = R.string.creators_title
-
- companion object {
- fun newInstance() = CreatorFragment()
- }
-
- override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
- return inflater.inflate(R.layout.fragment_creator, container, false)
- }
-
- override fun onActivityCreated(savedInstanceState: Bundle?) {
- super.onActivityCreated(savedInstanceState)
- presenter.onAttachView(this)
- }
-
- override fun initView() {
- with(creatorRecycler) {
- layoutManager = SmoothScrollLinearLayoutManager(context)
- adapter = creatorsAdapter
- addItemDecoration(FlexibleItemDecoration(context)
- .withDefaultDivider()
- .withDrawDividerOnLastItem(false))
- }
- creatorsAdapter.setOnItemClickListener(presenter::onItemSelected)
- creatorSeeMore.setOnClickListener { presenter.onSeeMoreClick() }
- }
-
- override fun updateData(data: List) {
- creatorsAdapter.updateDataSet(data)
- }
-
- override fun openUserGithubPage(username: String) {
- context?.openInternetBrowser("https://github.com/${username}", ::showMessage)
- }
-
- override fun openGithubContributorsPage() {
- context?.openInternetBrowser("https://github.com/wulkanowy/wulkanowy/graphs/contributors", ::showMessage)
- }
-
- override fun showProgress(show: Boolean) {
- creatorProgress.visibility = if (show) VISIBLE else GONE
- }
-
- override fun onDestroyView() {
- presenter.onDetachView()
- super.onDestroyView()
- }
-}
diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/about/creator/CreatorItem.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/about/creator/CreatorItem.kt
deleted file mode 100644
index 909919bb..00000000
--- a/app/src/main/java/io/github/wulkanowy/ui/modules/about/creator/CreatorItem.kt
+++ /dev/null
@@ -1,50 +0,0 @@
-package io.github.wulkanowy.ui.modules.about.creator
-
-import android.view.View
-import coil.api.load
-import coil.transform.RoundedCornersTransformation
-import eu.davidea.flexibleadapter.FlexibleAdapter
-import eu.davidea.flexibleadapter.items.AbstractFlexibleItem
-import eu.davidea.flexibleadapter.items.IFlexible
-import eu.davidea.viewholders.FlexibleViewHolder
-import io.github.wulkanowy.R
-import io.github.wulkanowy.data.pojos.AppCreator
-import kotlinx.android.extensions.LayoutContainer
-import kotlinx.android.synthetic.main.item_creator.*
-
-class CreatorItem(val creator: AppCreator) : AbstractFlexibleItem() {
-
- override fun getLayoutRes() = R.layout.item_creator
-
- override fun createViewHolder(view: View, adapter: FlexibleAdapter>) = ViewHolder(view, adapter)
-
- override fun bindViewHolder(adapter: FlexibleAdapter>, holder: ViewHolder, position: Int, payloads: MutableList) {
- with(holder) {
- creatorItemName.text = creator.displayName
-
- creatorItemAvatar.load("https://github.com/${creator.githubUsername}.png") {
- transformations(RoundedCornersTransformation(8f))
- crossfade(true)
- }
- }
- }
-
- override fun equals(other: Any?): Boolean {
- if (this === other) return true
- if (javaClass != other?.javaClass) return false
-
- other as CreatorItem
-
- if (creator != other.creator) return false
-
- return true
- }
-
- override fun hashCode() = creator.hashCode()
-
- class ViewHolder(view: View, adapter: FlexibleAdapter>) : FlexibleViewHolder(view, adapter),
- LayoutContainer {
-
- override val containerView: View? get() = contentView
- }
-}
diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/about/creator/CreatorPresenter.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/about/creator/CreatorPresenter.kt
deleted file mode 100644
index bc8034ab..00000000
--- a/app/src/main/java/io/github/wulkanowy/ui/modules/about/creator/CreatorPresenter.kt
+++ /dev/null
@@ -1,43 +0,0 @@
-package io.github.wulkanowy.ui.modules.about.creator
-
-import eu.davidea.flexibleadapter.items.AbstractFlexibleItem
-import io.github.wulkanowy.data.pojos.AppCreator
-import io.github.wulkanowy.data.repositories.appcreator.AppCreatorRepository
-import io.github.wulkanowy.data.repositories.student.StudentRepository
-import io.github.wulkanowy.ui.base.BasePresenter
-import io.github.wulkanowy.ui.base.ErrorHandler
-import io.github.wulkanowy.utils.SchedulersProvider
-import io.reactivex.Single
-import javax.inject.Inject
-
-class CreatorPresenter @Inject constructor(
- schedulers: SchedulersProvider,
- errorHandler: ErrorHandler,
- studentRepository: StudentRepository,
- private val appCreatorRepository: AppCreatorRepository
-) : BasePresenter(errorHandler, studentRepository, schedulers) {
-
- override fun onAttachView(view: CreatorView) {
- super.onAttachView(view)
- view.initView()
- loadData()
- }
-
- fun onItemSelected(item: AbstractFlexibleItem<*>) {
- if (item !is CreatorItem) return
- view?.openUserGithubPage(item.creator.githubUsername)
- }
-
- fun onSeeMoreClick() {
- view?.openGithubContributorsPage()
- }
-
- private fun loadData() {
- disposable.add(appCreatorRepository.getAppCreators()
- .map { it.map { creator -> CreatorItem(creator) } }
- .subscribeOn(schedulers.backgroundThread)
- .observeOn(schedulers.mainThread)
- .doFinally { view?.showProgress(false) }
- .subscribe({ view?.run { updateData(it) } }, { errorHandler.dispatch(it) }))
- }
-}
diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/about/creator/CreatorView.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/about/creator/CreatorView.kt
deleted file mode 100644
index 2a6a4303..00000000
--- a/app/src/main/java/io/github/wulkanowy/ui/modules/about/creator/CreatorView.kt
+++ /dev/null
@@ -1,16 +0,0 @@
-package io.github.wulkanowy.ui.modules.about.creator
-
-import io.github.wulkanowy.ui.base.BaseView
-
-interface CreatorView : BaseView {
-
- fun initView()
-
- fun updateData(data: List)
-
- fun openUserGithubPage(username: String)
-
- fun openGithubContributorsPage()
-
- fun showProgress(show: Boolean)
-}
diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/attendance/AttendanceAdapter.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/attendance/AttendanceAdapter.kt
deleted file mode 100644
index 75f99840..00000000
--- a/app/src/main/java/io/github/wulkanowy/ui/modules/attendance/AttendanceAdapter.kt
+++ /dev/null
@@ -1,12 +0,0 @@
-package io.github.wulkanowy.ui.modules.attendance
-
-import eu.davidea.flexibleadapter.FlexibleAdapter
-import eu.davidea.flexibleadapter.items.IFlexible
-import io.github.wulkanowy.data.db.entities.Attendance
-
-class AttendanceAdapter> : FlexibleAdapter(null, null, true) {
-
- var excuseActionMode: Boolean = false
-
- var onExcuseCheckboxSelect: (attendanceItem: Attendance, checked: Boolean) -> Unit = { _, _ -> }
-}
diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/attendance/AttendanceFragment.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/attendance/AttendanceFragment.kt
index 9969b1c7..bc7c1cac 100644
--- a/app/src/main/java/io/github/wulkanowy/ui/modules/attendance/AttendanceFragment.kt
+++ b/app/src/main/java/io/github/wulkanowy/ui/modules/attendance/AttendanceFragment.kt
@@ -1,6 +1,5 @@
package io.github.wulkanowy.ui.modules.attendance
-import android.content.DialogInterface.BUTTON_POSITIVE
import android.os.Bundle
import android.view.LayoutInflater
import android.view.Menu
@@ -11,9 +10,8 @@ import android.view.View.GONE
import android.view.View.INVISIBLE
import android.view.View.VISIBLE
import android.view.ViewGroup
-import androidx.appcompat.app.AlertDialog
-import androidx.appcompat.view.ActionMode
import com.wdullaer.materialdatetimepicker.date.DatePickerDialog
+import eu.davidea.flexibleadapter.FlexibleAdapter
import eu.davidea.flexibleadapter.common.FlexibleItemDecoration
import eu.davidea.flexibleadapter.common.SmoothScrollLinearLayoutManager
import eu.davidea.flexibleadapter.items.AbstractFlexibleItem
@@ -26,7 +24,6 @@ import io.github.wulkanowy.ui.modules.main.MainView
import io.github.wulkanowy.utils.SchooldaysRangeLimiter
import io.github.wulkanowy.utils.dpToPx
import io.github.wulkanowy.utils.setOnItemClickListener
-import kotlinx.android.synthetic.main.dialog_excuse.*
import kotlinx.android.synthetic.main.fragment_attendance.*
import org.threeten.bp.LocalDate
import javax.inject.Inject
@@ -38,13 +35,7 @@ class AttendanceFragment : BaseFragment(), AttendanceView, MainView.MainChildVie
lateinit var presenter: AttendancePresenter
@Inject
- lateinit var attendanceAdapter: AttendanceAdapter>
-
- override val excuseSuccessString: String
- get() = getString(R.string.attendance_excuse_success)
-
- override val excuseNoSelectionString: String
- get() = getString(R.string.attendance_excuse_no_selection)
+ lateinit var attendanceAdapter: FlexibleAdapter>
companion object {
private const val SAVED_DATE_KEY = "CURRENT_DATE"
@@ -58,34 +49,6 @@ class AttendanceFragment : BaseFragment(), AttendanceView, MainView.MainChildVie
override val currentStackSize get() = (activity as? MainActivity)?.currentStackSize
- override val excuseActionMode: Boolean get() = attendanceAdapter.excuseActionMode
-
- private var actionMode: ActionMode? = null
- private val actionModeCallback = object : ActionMode.Callback {
- override fun onCreateActionMode(mode: ActionMode, menu: Menu): Boolean {
- val inflater = mode.menuInflater
- inflater.inflate(R.menu.context_menu_excuse, menu)
- return true
- }
-
- override fun onPrepareActionMode(mode: ActionMode, menu: Menu): Boolean {
- mode.title = getString(R.string.attendance_excuse_title)
- return presenter.onPrepareActionMode()
- }
-
- override fun onDestroyActionMode(mode: ActionMode) {
- presenter.onDestroyActionMode()
- actionMode = null
- }
-
- override fun onActionItemClicked(mode: ActionMode, menu: MenuItem): Boolean {
- return when (menu.itemId) {
- R.id.excuseMenuSubmit -> presenter.onExcuseSubmitButtonClick()
- else -> false
- }
- }
- }
-
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setHasOptionsMenu(true)
@@ -103,7 +66,6 @@ class AttendanceFragment : BaseFragment(), AttendanceView, MainView.MainChildVie
override fun initView() {
attendanceAdapter.setOnItemClickListener(presenter::onAttendanceItemSelected)
- attendanceAdapter.onExcuseCheckboxSelect = presenter::onExcuseCheckboxSelect
with(attendanceRecycler) {
layoutManager = SmoothScrollLinearLayoutManager(context)
@@ -121,8 +83,6 @@ class AttendanceFragment : BaseFragment(), AttendanceView, MainView.MainChildVie
attendanceNavDate.setOnClickListener { presenter.onPickDate() }
attendanceNextButton.setOnClickListener { presenter.onNextDay() }
- attendanceExcuseButton.setOnClickListener { presenter.onExcuseButtonClick() }
-
attendanceNavContainer.setElevationCompat(requireContext().dpToPx(8f))
}
@@ -155,10 +115,6 @@ class AttendanceFragment : BaseFragment(), AttendanceView, MainView.MainChildVie
if (::presenter.isInitialized) presenter.onViewReselected()
}
- override fun onFragmentChanged() {
- if (::presenter.isInitialized) presenter.onMainViewChanged()
- }
-
override fun popView() {
(activity as? MainActivity)?.popView()
}
@@ -199,10 +155,6 @@ class AttendanceFragment : BaseFragment(), AttendanceView, MainView.MainChildVie
attendanceNextButton.visibility = if (show) VISIBLE else INVISIBLE
}
- override fun showExcuseButton(show: Boolean) {
- attendanceExcuseButton.visibility = if (show) VISIBLE else GONE
- }
-
override fun showAttendanceDialog(lesson: Attendance) {
(activity as? MainActivity)?.showDialogFragment(AttendanceDialog.newInstance(lesson))
}
@@ -222,38 +174,10 @@ class AttendanceFragment : BaseFragment(), AttendanceView, MainView.MainChildVie
}
}
- override fun showExcuseDialog() {
- AlertDialog.Builder(requireContext())
- .setTitle(R.string.attendance_excuse_title)
- .setView(R.layout.dialog_excuse)
- .setNegativeButton(android.R.string.cancel) { _, _ -> }
- .create()
- .apply {
- setButton(BUTTON_POSITIVE, getString(R.string.attendance_excuse_dialog_submit)) { _, _ ->
- presenter.onExcuseDialogSubmit(excuseReason.text?.toString().orEmpty())
- }
- }.show()
- }
-
override fun openSummaryView() {
(activity as? MainActivity)?.pushView(AttendanceSummaryFragment.newInstance())
}
- override fun startActionMode() {
- actionMode = (activity as MainActivity?)?.startSupportActionMode(actionModeCallback)
- }
-
- override fun showExcuseCheckboxes(show: Boolean) {
- attendanceAdapter.apply {
- excuseActionMode = show
- notifyDataSetChanged()
- }
- }
-
- override fun finishActionMode() {
- actionMode?.finish()
- }
-
override fun onSaveInstanceState(outState: Bundle) {
super.onSaveInstanceState(outState)
outState.putLong(SAVED_DATE_KEY, presenter.currentDate.toEpochDay())
diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/attendance/AttendanceItem.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/attendance/AttendanceItem.kt
index 7355aec2..16a140cb 100644
--- a/app/src/main/java/io/github/wulkanowy/ui/modules/attendance/AttendanceItem.kt
+++ b/app/src/main/java/io/github/wulkanowy/ui/modules/attendance/AttendanceItem.kt
@@ -1,22 +1,18 @@
package io.github.wulkanowy.ui.modules.attendance
import android.view.View
-import android.view.View.GONE
import android.view.View.INVISIBLE
import android.view.View.VISIBLE
-import androidx.core.view.isVisible
import eu.davidea.flexibleadapter.FlexibleAdapter
import eu.davidea.flexibleadapter.items.AbstractFlexibleItem
import eu.davidea.flexibleadapter.items.IFlexible
import eu.davidea.viewholders.FlexibleViewHolder
import io.github.wulkanowy.R
import io.github.wulkanowy.data.db.entities.Attendance
-import io.github.wulkanowy.data.repositories.attendance.SentExcuseStatus
import kotlinx.android.extensions.LayoutContainer
import kotlinx.android.synthetic.main.item_attendance.*
-class AttendanceItem(val attendance: Attendance) :
- AbstractFlexibleItem() {
+class AttendanceItem(val attendance: Attendance) : AbstractFlexibleItem() {
override fun getLayoutRes() = R.layout.item_attendance
@@ -30,34 +26,6 @@ class AttendanceItem(val attendance: Attendance) :
attendanceItemSubject.text = attendance.subject
attendanceItemDescription.text = attendance.name
attendanceItemAlert.visibility = attendance.run { if (absence && !excused) VISIBLE else INVISIBLE }
- attendanceItemNumber.visibility = GONE
- attendanceItemExcuseInfo.visibility = GONE
- attendanceItemExcuseCheckbox.visibility = GONE
- attendanceItemExcuseCheckbox.isChecked = false
- attendanceItemExcuseCheckbox.setOnCheckedChangeListener { _, checked ->
- (adapter as AttendanceAdapter).onExcuseCheckboxSelect(attendance, checked)
- }
-
- when (if (attendance.excuseStatus != null) SentExcuseStatus.valueOf(attendance.excuseStatus) else null) {
- SentExcuseStatus.WAITING -> {
- attendanceItemExcuseInfo.setImageResource(R.drawable.ic_excuse_waiting)
- attendanceItemExcuseInfo.visibility = VISIBLE
- attendanceItemAlert.visibility = INVISIBLE
- }
- SentExcuseStatus.DENIED -> {
- attendanceItemExcuseInfo.setImageResource(R.drawable.ic_excuse_denied)
- attendanceItemExcuseInfo.visibility = VISIBLE
- }
- else -> {
- if (attendance.excusable && (adapter as AttendanceAdapter).excuseActionMode) {
- attendanceItemNumber.visibility = GONE
- attendanceItemExcuseCheckbox.visibility = VISIBLE
- } else {
- attendanceItemNumber.visibility = VISIBLE
- attendanceItemExcuseCheckbox.visibility = GONE
- }
- }
- }
}
}
@@ -78,20 +46,8 @@ class AttendanceItem(val attendance: Attendance) :
return result
}
- class ViewHolder(view: View, val adapter: FlexibleAdapter<*>) :
- FlexibleViewHolder(view, adapter),
- LayoutContainer {
-
+ class ViewHolder(view: View, adapter: FlexibleAdapter<*>) : FlexibleViewHolder(view, adapter), LayoutContainer {
override val containerView: View
get() = contentView
-
- override fun onClick(view: View?) {
- super.onClick(view)
- attendanceItemExcuseCheckbox.apply {
- if ((adapter as AttendanceAdapter).excuseActionMode && isVisible) {
- isChecked = !isChecked
- }
- }
- }
}
}
diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/attendance/AttendanceModule.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/attendance/AttendanceModule.kt
deleted file mode 100644
index eb35fea1..00000000
--- a/app/src/main/java/io/github/wulkanowy/ui/modules/attendance/AttendanceModule.kt
+++ /dev/null
@@ -1,12 +0,0 @@
-package io.github.wulkanowy.ui.modules.attendance
-
-import dagger.Module
-import dagger.Provides
-import eu.davidea.flexibleadapter.items.AbstractFlexibleItem
-
-@Module
-class AttendanceModule {
-
- @Provides
- fun provideAttendanceFlexibleAdapter() = AttendanceAdapter>()
-}
diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/attendance/AttendancePresenter.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/attendance/AttendancePresenter.kt
index 679d5367..1490ee6e 100644
--- a/app/src/main/java/io/github/wulkanowy/ui/modules/attendance/AttendancePresenter.kt
+++ b/app/src/main/java/io/github/wulkanowy/ui/modules/attendance/AttendancePresenter.kt
@@ -2,7 +2,6 @@ package io.github.wulkanowy.ui.modules.attendance
import android.annotation.SuppressLint
import eu.davidea.flexibleadapter.items.AbstractFlexibleItem
-import io.github.wulkanowy.data.db.entities.Attendance
import io.github.wulkanowy.data.repositories.attendance.AttendanceRepository
import io.github.wulkanowy.data.repositories.preferences.PreferencesRepository
import io.github.wulkanowy.data.repositories.semester.SemesterRepository
@@ -41,8 +40,6 @@ class AttendancePresenter @Inject constructor(
private lateinit var lastError: Throwable
- private val attendanceToExcuseList = mutableListOf()
-
fun onAttachView(view: AttendanceView, date: Long?) {
super.onAttachView(view)
view.initView()
@@ -54,15 +51,11 @@ class AttendancePresenter @Inject constructor(
}
fun onPreviousDay() {
- view?.finishActionMode()
- attendanceToExcuseList.clear()
loadData(currentDate.previousSchoolDay)
reloadView()
}
fun onNextDay() {
- view?.finishActionMode()
- attendanceToExcuseList.clear()
loadData(currentDate.nextSchoolDay)
reloadView()
}
@@ -107,59 +100,10 @@ class AttendancePresenter @Inject constructor(
}
}
- fun onMainViewChanged() {
- view?.finishActionMode()
- }
-
fun onAttendanceItemSelected(item: AbstractFlexibleItem<*>?) {
- view?.apply {
- if (item is AttendanceItem && !excuseActionMode) {
- Timber.i("Select attendance item ${item.attendance.id}")
- showAttendanceDialog(item.attendance)
- }
- }
- }
-
- fun onExcuseButtonClick() {
- view?.startActionMode()
- }
-
- fun onExcuseCheckboxSelect(attendanceItem: Attendance, checked: Boolean) {
- if (checked) attendanceToExcuseList.add(attendanceItem)
- else attendanceToExcuseList.remove(attendanceItem)
- }
-
- fun onExcuseSubmitButtonClick(): Boolean {
- view?.apply {
- return if (attendanceToExcuseList.isNotEmpty()) {
- showExcuseDialog()
- true
- } else {
- showMessage(excuseNoSelectionString)
- false
- }
- }
- return false
- }
-
- fun onExcuseDialogSubmit(reason: String) {
- view?.finishActionMode()
- excuseAbsence(if (reason != "") reason else null, attendanceToExcuseList.toList())
- }
-
- fun onPrepareActionMode(): Boolean {
- view?.apply {
- showExcuseCheckboxes(true)
- showExcuseButton(false)
- }
- attendanceToExcuseList.clear()
- return true
- }
-
- fun onDestroyActionMode() {
- view?.apply {
- showExcuseCheckboxes(false)
- showExcuseButton(true)
+ if (item is AttendanceItem) {
+ Timber.i("Select attendance item ${item.attendance.id}")
+ view?.showAttendanceDialog(item.attendance)
}
}
@@ -213,7 +157,6 @@ class AttendancePresenter @Inject constructor(
showEmpty(it.isEmpty())
showErrorView(false)
showContent(it.isNotEmpty())
- showExcuseButton(it.any { item -> item.attendance.excusable })
}
analytics.logEvent("load_attendance", "items" to it.size, "force_refresh" to forceRefresh)
}) {
@@ -224,39 +167,6 @@ class AttendancePresenter @Inject constructor(
}
}
- private fun excuseAbsence(reason: String?, toExcuseList: List) {
- Timber.i("Excusing absence started")
- disposable.apply {
- add(studentRepository.getCurrentStudent()
- .delay(200, MILLISECONDS)
- .flatMap { semesterRepository.getCurrentSemester(it) }
- .flatMap { attendanceRepository.excuseForAbsence(it, toExcuseList, reason) }
- .subscribeOn(schedulers.backgroundThread)
- .observeOn(schedulers.mainThread)
- .doOnSubscribe {
- view?.apply {
- showProgress(true)
- showContent(false)
- showExcuseButton(false)
- }
- }
- .subscribe({
- Timber.i("Excusing for absence result: Success")
- analytics.logEvent("excuse_absence", "items" to attendanceToExcuseList.size)
- attendanceToExcuseList.clear()
- view?.apply {
- showExcuseButton(false)
- showMessage(excuseSuccessString)
- }
- loadData(currentDate, true)
- }) {
- Timber.i("Excusing for absence result: An exception occurred")
- view?.showProgress(false)
- errorHandler.dispatch(it)
- })
- }
- }
-
private fun showErrorViewOnError(message: String, error: Throwable) {
view?.run {
if (isViewEmpty) {
diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/attendance/AttendanceView.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/attendance/AttendanceView.kt
index 03e95053..a6d0d4ba 100644
--- a/app/src/main/java/io/github/wulkanowy/ui/modules/attendance/AttendanceView.kt
+++ b/app/src/main/java/io/github/wulkanowy/ui/modules/attendance/AttendanceView.kt
@@ -10,12 +10,6 @@ interface AttendanceView : BaseView {
val currentStackSize: Int?
- val excuseSuccessString: String
-
- val excuseNoSelectionString: String
-
- val excuseActionMode: Boolean
-
fun initView()
fun updateData(data: List)
@@ -44,21 +38,11 @@ interface AttendanceView : BaseView {
fun showNextButton(show: Boolean)
- fun showExcuseButton(show: Boolean)
-
fun showAttendanceDialog(lesson: Attendance)
fun showDatePickerDialog(currentDate: LocalDate)
- fun showExcuseDialog()
-
fun openSummaryView()
- fun startActionMode()
-
- fun showExcuseCheckboxes(show: Boolean)
-
- fun finishActionMode()
-
fun popView()
}
diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/grade/GradeAverageProvider.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/grade/GradeAverageProvider.kt
index 37bba4d4..88635c37 100644
--- a/app/src/main/java/io/github/wulkanowy/ui/modules/grade/GradeAverageProvider.kt
+++ b/app/src/main/java/io/github/wulkanowy/ui/modules/grade/GradeAverageProvider.kt
@@ -18,11 +18,7 @@ class GradeAverageProvider @Inject constructor(
private val gradeSummaryRepository: GradeSummaryRepository
) {
- private val plusModifier = preferencesRepository.gradePlusModifier
-
- private val minusModifier = preferencesRepository.gradeMinusModifier
-
- fun getGradeAverage(student: Student, semesters: List, selectedSemesterId: Int, forceRefresh: Boolean): Single>> {
+ fun getGradeAverage(student: Student, semesters: List, selectedSemesterId: Int, forceRefresh: Boolean): Single