import { ModelBase } from "../../Storage/ModelBase"; import { IKey } from "../../Storage/IKey"; import { Key } from "../../Storage/Key"; export class BlockReceipt extends ModelBase { id: string; blockNumber: number; constructor(idOrPrimaryKey?: string, secondaryKey?: string) { super(); this.id = idOrPrimaryKey; this.blockNumber = +secondaryKey; } getStorageKey(): IKey { if (this.id == null) { throw new Error("id cannot be null"); } return new Key(this.id, this.blockNumber.toString()); } }