| 16 | } |
| 17 | |
| 18 | interface AccountActions { |
| 19 | // IEntityStore 接口方法 |
| 20 | init: () => Promise<void> |
| 21 | getById: (id: string) => Account | undefined |
| 22 | getAll: () => Account[] |
| 23 | create: (data: AccountCreateDTO) => Promise<Account> |
| 24 | createMany: (data: AccountCreateDTO[]) => Promise<Account[]> |
| 25 | update: (id: string, changes: Partial<Account>) => Promise<void> |
| 26 | updateMany: (updates: Array<{ id: string; changes: Partial<Account> }>) => Promise<void> |
| 27 | delete: (id: string) => Promise<void> |
| 28 | deleteMany: (ids: string[]) => Promise<void> |
| 29 | reset: () => Promise<void> |
| 30 | // 扩展方法 |
| 31 | setCurrentAccountId: (id: string | null) => Promise<void> |
| 32 | setInitialized: (initialized: boolean) => void |
| 33 | } |
| 34 | |
| 35 | type AccountStore = AccountState & AccountActions |
| 36 |
nothing calls this directly
no outgoing calls
no test coverage detected