74 lines
2.1 KiB
Dart
74 lines
2.1 KiB
Dart
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
|
|
|
import '../../../common/domain/metal_type.dart';
|
|
import 'asset_models.dart';
|
|
|
|
final mockAssetRepositoryProvider = Provider<MockAssetRepository>(
|
|
(ref) => MockAssetRepository(),
|
|
);
|
|
|
|
class MockAssetRepository {
|
|
List<GoldAssetHolding> loadHoldings() {
|
|
final now = DateTime(2026, 6, 18, 16, 11);
|
|
return [
|
|
GoldAssetHolding(
|
|
id: 'holding_gold_bar_001',
|
|
name: '投资金条',
|
|
metal: MetalType.gold,
|
|
category: AssetCategory.bar,
|
|
purity: 0.9999,
|
|
purityLabel: '足金9999',
|
|
weightGram: 50,
|
|
costAmount: 43200,
|
|
purchaseDate: DateTime(2025, 10, 12),
|
|
channel: '银行',
|
|
createdAt: now.subtract(const Duration(days: 249)),
|
|
updatedAt: now,
|
|
),
|
|
GoldAssetHolding(
|
|
id: 'holding_gold_ring_001',
|
|
name: '素圈戒指',
|
|
metal: MetalType.gold,
|
|
category: AssetCategory.ring,
|
|
purity: 0.999,
|
|
purityLabel: '足金999',
|
|
weightGram: 8.6,
|
|
costAmount: 7820,
|
|
purchaseDate: DateTime(2024, 12, 4),
|
|
channel: '金店',
|
|
createdAt: now.subtract(const Duration(days: 196)),
|
|
updatedAt: now,
|
|
),
|
|
GoldAssetHolding(
|
|
id: 'holding_platinum_001',
|
|
name: 'PT950 项链',
|
|
metal: MetalType.platinum,
|
|
category: AssetCategory.platinumPiece,
|
|
purity: 0.95,
|
|
purityLabel: 'PT950',
|
|
weightGram: 12.3,
|
|
costAmount: 5200,
|
|
purchaseDate: DateTime(2023, 8, 21),
|
|
channel: '金店',
|
|
createdAt: now.subtract(const Duration(days: 667)),
|
|
updatedAt: now,
|
|
),
|
|
GoldAssetHolding(
|
|
id: 'holding_silver_001',
|
|
name: '银手镯',
|
|
metal: MetalType.silver,
|
|
category: AssetCategory.bracelet,
|
|
purity: 0.999,
|
|
purityLabel: '999银',
|
|
weightGram: 31.8,
|
|
costAmount: 980,
|
|
purchaseDate: DateTime(2024, 4, 7),
|
|
channel: '金店',
|
|
note: '材料价值偏低',
|
|
createdAt: now.subtract(const Duration(days: 802)),
|
|
updatedAt: now,
|
|
),
|
|
];
|
|
}
|
|
}
|