Optional
item: BelongsToLinkReadonly
createdThe timestamp marking when the link was created
Readonly
foreignThe name of the entity type to which the link points (the "parent" entity in the relationship).
Readonly
foreignThe foreign key value identifying the specific instance of the foreign entity to which the link belongs. While it is a string, it represents the value of a ForeignKey
attribute in the related entity.
Readonly
idA unique identifier for the link itself, automatically generated upon creation.
Readonly
typeThe type of the link, statically set to "BelongsToLink".
Readonly
updatedThe timestamp marking the last update to the link. Initially set to the same value as createdAt
.
Static
buildA static method to construct a BelongsToLinkProps
object with specified properties, including auto-generated id
and timestamp fields. This method facilitates the creation of new link instances without directly instantiating the class.
The name of the entity type to which the new link will belong.
The foreign key value identifying the specific instance of the foreign entity.
BelongsToLinkProps
object ready for use in creating or managing a "BelongsTo" relationship.Generated using TypeDoc
Represents a "BelongsTo" relationship link between entities within the ORM system. Instances of this class are used to track and manage associations where one entity belongs to another, encapsulating the connection details including the type of the foreign entity and its foreign key.
This class implements the
BelongsToLinkProps
interface, ensuring consistency in the properties used to describe the "BelongsTo" relationship.