first commit

This commit is contained in:
2026-09-21 17:37:53 +08:00
commit 67d4dd5b7c
141 changed files with 8558 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
/// 分类(type: 1=支出,2=收入)
class Category {
final int id;
final String name;
final String icon; // emoji
final int type;
final int? sortOrder;
const Category({
required this.id,
required this.name,
required this.icon,
required this.type,
this.sortOrder,
});
factory Category.fromJson(Map<String, dynamic> json) => Category(
id: (json['id'] as num?)?.toInt() ?? 0,
name: json['name']?.toString() ?? '',
icon: json['icon']?.toString() ?? '📦',
type: (json['type'] as num?)?.toInt() ?? 1,
sortOrder: (json['sortOrder'] as num?)?.toInt(),
);
}