refac: ResouceController 자원 관리 방식 변경
This commit is contained in:
@@ -44,18 +44,19 @@ export interface IResourceController{
|
||||
|
||||
getTroop(id: TroopID, nation: NationID): Troop | undefined;
|
||||
|
||||
_getAllChanges(): Map<`${ValidEntityType<any>}_${number}`, LazyEntityUpdater<any>>;
|
||||
_getAllChanges(): Map<`${ValidEntityType<any>}_${number}`, ['new'|'update'|'delete', LazyEntityUpdater<any>]>;
|
||||
|
||||
setDirty(entity: LazyEntityUpdater<any>): void;
|
||||
reserveDelete(entity: LazyEntityUpdater<any>): void;
|
||||
|
||||
//TODO: create* 방식과 구현 방식 비교
|
||||
reserveNew(entity: LazyEntityUpdater<any>): void;
|
||||
|
||||
//TODO: reserveNew와 구현 방식 비교
|
||||
createGeneral(raw: IGeneralEntity): General;
|
||||
createNation(raw: INationEntity): Nation;
|
||||
createTroop(raw: ITroopEntity): Troop;
|
||||
|
||||
reserveDeleteTroop(id: TroopID): void;
|
||||
reserveDeleteGeneral(id: GeneralID): void;
|
||||
reserveDeleteNation(id: NationID): void;
|
||||
|
||||
resetAndFill(): Promise<void>;
|
||||
saveAll(): Promise<void>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user