22 lines
683 B
TypeScript
22 lines
683 B
TypeScript
import type { ICityEntity } from "./Entity/CityEntity.js";
|
|
import { LazyEntityUpdater } from "./LazyEntityUpdater.js";
|
|
import type { IResourceController } from "./ResourceController.js";
|
|
import type { CityID } from "./defs.js";
|
|
|
|
export class City extends LazyEntityUpdater<ICityEntity>{
|
|
protected readonly _indirectNames: (keyof ICityEntity)[] = ["id", "nationID"];
|
|
protected readonly _entityType = "City";
|
|
protected readonly _raw: ICityEntity;
|
|
|
|
constructor(
|
|
raw: ICityEntity,
|
|
protected readonly resourceController: IResourceController
|
|
){
|
|
super();
|
|
this._raw = raw;
|
|
}
|
|
|
|
get id(): CityID {
|
|
return this._raw.id;
|
|
}
|
|
} |