2025-12-19 01:59:59 +00:00
|
|
|
import 'dart:io';
|
|
|
|
|
|
2025-12-13 13:27:05 +00:00
|
|
|
import 'package:injectable/injectable.dart';
|
|
|
|
|
import '../../database/database.dart';
|
|
|
|
|
import '../../main.dart' as backend_main;
|
2025-12-19 00:56:58 +00:00
|
|
|
import '../../storage/minio_config.dart';
|
2026-01-03 14:05:17 +00:00
|
|
|
import '../purchase/yoo_money.dart';
|
2025-12-13 13:27:05 +00:00
|
|
|
|
|
|
|
|
@module
|
|
|
|
|
abstract class AppModule {
|
|
|
|
|
@singleton
|
|
|
|
|
AppDatabase get database => backend_main.database;
|
|
|
|
|
|
2026-01-03 14:05:17 +00:00
|
|
|
@singleton
|
|
|
|
|
YooMoneyHandler get yooMoneyHandler => YooMoneyHandler(
|
|
|
|
|
shopId: Platform.environment['YOOKASSA_SHOP_ID'] ?? '',
|
|
|
|
|
secretKey: Platform.environment['YOOKASSA_SECRET_KEY'] ?? '',
|
|
|
|
|
);
|
2025-12-19 00:56:58 +00:00
|
|
|
|
|
|
|
|
@singleton
|
|
|
|
|
MinioConfig get minioConfig => MinioConfig.fromEnvironment();
|
2025-12-20 18:26:15 +00:00
|
|
|
}
|