Frontend first draft

This commit is contained in:
Arseni
2025-11-13 15:06:15 +03:00
parent e47f343afb
commit ddb54ddfdc
504 changed files with 25498 additions and 1 deletions

View File

@@ -0,0 +1,18 @@
import 'package:pshared/models/payment/methods/data.dart';
import 'package:pshared/models/payment/type.dart';
class CardPaymentMethod extends PaymentMethodData {
@override
final PaymentType type = PaymentType.card;
final String pan;
final String firstName;
final String lastName;
CardPaymentMethod({
required this.pan,
required this.firstName,
required this.lastName,
});
}

View File

@@ -0,0 +1,6 @@
import 'package:pshared/models/payment/type.dart';
abstract class PaymentMethodData {
PaymentType get type;
}

View File

@@ -0,0 +1,20 @@
import 'package:pshared/models/payment/methods/data.dart';
import 'package:pshared/models/payment/type.dart';
class IbanPaymentMethod extends PaymentMethodData {
@override
final PaymentType type = PaymentType.iban;
final String iban; // e.g. DE89 3704 0044 0532 0130 00
final String accountHolder; // Full name of the recipient
final String? bic; // Optional: for cross-border transfers
final String? bankName; // Optional: for UI clarity
IbanPaymentMethod({
required this.iban,
required this.accountHolder,
this.bic,
this.bankName,
});
}

View File

@@ -0,0 +1,26 @@
import 'package:pshared/models/payment/methods/data.dart';
import 'package:pshared/models/payment/type.dart';
class RussianBankAccountPaymentMethod extends PaymentMethodData {
@override
final PaymentType type = PaymentType.bankAccount;
final String recipientName;
final String inn;
final String kpp;
final String bankName;
final String bik;
final String accountNumber;
final String correspondentAccount;
RussianBankAccountPaymentMethod({
required this.recipientName,
required this.inn,
required this.kpp,
required this.bankName,
required this.bik,
required this.accountNumber,
required this.correspondentAccount,
});
}

View File

@@ -0,0 +1,21 @@
import 'package:pshared/models/payment/type.dart';
class PaymentMethod {
PaymentMethod({
required this.id,
required this.label,
required this.details,
required this.type,
this.isEnabled = true,
this.isMain = false,
});
final String id;
final String label;
final String details;
final PaymentType type;
bool isEnabled;
bool isMain;
}

View File

@@ -0,0 +1,12 @@
import 'package:pshared/models/payment/methods/data.dart';
import 'package:pshared/models/payment/type.dart';
class WalletPaymentMethod extends PaymentMethodData {
@override
final PaymentType type = PaymentType.wallet;
final String walletId;
WalletPaymentMethod({required this.walletId});
}