Understand Shortcuts
Shortcuts are a way to implement Polymorphic Relations
with Tortoise-ORM.
Shortcuts can be used as a ForeignKey in a model and can be
created (or retrieved) with the create_shortcut() function.
There are different types of shortcuts:
StuffShortcut
A shortcut to
StuffShortcutablemodels. Used for rewards/costs of crafts, jobs… It points to everythings that can be earned and stored.
OwnerShortcut
A shortcut to
OwnerShortcutablemodels. Used to define banks/shops owners and for inventories. It points to everythings that can be able to own something.
AccessRuleShortcut
A shortcut to
AccessRuleShortcutablemodels. Used to define access to something. It points to everythings that can have access to a system, things that receive permissions.
TradeStuffShortcut
A shortcut to
TradeStuffShortcutablemodels. Used to define traded stuff (in aTrade).