code refactor

This commit is contained in:
MaysWind
2025-03-23 21:57:20 +08:00
parent f9b7be2f74
commit 399b5c03a2
4 changed files with 64 additions and 6 deletions
+10 -2
View File
@@ -1,5 +1,5 @@
import type { ColorValue } from '@/core/color.ts';
import { type LocalizedPresetCategory, CategoryType } from '@/core/category.ts';
import { CategoryType } from '@/core/category.ts';
import { DEFAULT_CATEGORY_ICON_ID } from '@/consts/icon.ts';
import { DEFAULT_CATEGORY_COLOR } from '@/consts/color.ts';
@@ -137,7 +137,15 @@ export interface TransactionCategoryCreateRequest {
}
export interface TransactionCategoryCreateBatchRequest {
readonly categories: LocalizedPresetCategory[];
readonly categories: TransactionCategoryCreateWithSubCategories[];
}
export interface TransactionCategoryCreateWithSubCategories {
readonly name: string;
readonly type: CategoryType;
readonly icon: string;
readonly color: ColorValue;
readonly subCategories: TransactionCategoryCreateRequest[];
}
export interface TransactionCategoryModifyRequest {