-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(refs): support direct declarations of Refs
- Loading branch information
1 parent
4cdcb6f
commit a15d001
Showing
30 changed files
with
1,160 additions
and
140 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
src/logic/__test_assets__/exampleProject/src/domain/objects/CarriageCargo.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { DomainEntity, Ref } from 'domain-objects'; | ||
import { Carriage } from './Carriage'; | ||
|
||
/** | ||
* .what = cargo which has been allocated to a carriage at a given point in time | ||
*/ | ||
export interface CarriageCargo { | ||
id?: number; | ||
uuid?: string; | ||
|
||
/** | ||
* the itinerary during which it is allocated | ||
*/ | ||
itineraryUuid: string; // todo: ref to an itinerary once we declare it | ||
|
||
/** | ||
* the carriage it has been allocated to | ||
*/ | ||
carriageRef: Ref<typeof Carriage>; | ||
|
||
/** | ||
* the slot that it has been allocated to on the carriage | ||
*/ | ||
slot: number; | ||
|
||
/** | ||
* the cargo that has been allocated | ||
*/ | ||
cargoExid: null | string; | ||
} | ||
export class CarriageCargo extends DomainEntity<CarriageCargo> implements CarriageCargo { | ||
public static primary = ['uuid'] as const; | ||
public static unique = ['itineraryUuid', 'carriageRef', 'slot'] as const; | ||
public static updatable = ['cargoExid']; | ||
} |
1 change: 1 addition & 0 deletions
1
src/logic/__test_assets__/exampleProject/src/domain/objects/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.