From 5d94b780b653e2e7ced6a5e8e9087f53ef36e91b Mon Sep 17 00:00:00 2001 From: 4831c0 <4831c0@proton.me> Date: Thu, 13 Mar 2025 20:01:10 +0100 Subject: [PATCH] fix BankAccount type and move it to student.dart --- firka/lib/helpers/api/model/bank_account.dart | 27 ------------------- firka/lib/helpers/api/model/student.dart | 26 +++++++++++++++++- 2 files changed, 25 insertions(+), 28 deletions(-) delete mode 100644 firka/lib/helpers/api/model/bank_account.dart diff --git a/firka/lib/helpers/api/model/bank_account.dart b/firka/lib/helpers/api/model/bank_account.dart deleted file mode 100644 index 4faf3474..00000000 --- a/firka/lib/helpers/api/model/bank_account.dart +++ /dev/null @@ -1,27 +0,0 @@ -/* - Firka, alternative e-Kréta client. - Copyright (C) 2025 QwIT Development - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as - published by the Free Software Foundation, either version 3 of the - License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see . -*/ - -class BankAccount { - - final List addressDataList; - - BankAccount({ - required this.addressDataList - }); - -} \ No newline at end of file diff --git a/firka/lib/helpers/api/model/student.dart b/firka/lib/helpers/api/model/student.dart index 3086a1ca..ced038a4 100644 --- a/firka/lib/helpers/api/model/student.dart +++ b/firka/lib/helpers/api/model/student.dart @@ -16,7 +16,6 @@ along with this program. If not, see . */ -import 'package:firka/helpers/api/model/bank_account.dart'; import 'package:firka/helpers/api/model/guardian.dart'; import 'package:firka/helpers/api/model/institution.dart'; @@ -79,4 +78,29 @@ class Student { ); } +} + +class BankAccount { + + final String accountNumber; + final String isReadOnly; + final String ownerName; + final String ownerType; + + BankAccount({ + required this.accountNumber, + required this.isReadOnly, + required this.ownerName, + required this.ownerType + }); + + factory BankAccount.fromJson(Map json) { + return BankAccount( + accountNumber: json['BankszamlaSzam'], + isReadOnly: json['IsReadOnly'], + ownerName: json['BankszamlaTulajdonosNeve'], + ownerType: json['BankszamlaTulajdonosTipusId'] + ); + } + } \ No newline at end of file