-
Notifications
You must be signed in to change notification settings - Fork 0
CharacterImage
Richard Lucas edited this page May 17, 2024
·
5 revisions
The CharacterImage class represents the relationship between a character and an image.
The attributes associated with the characters_images
table in the database:
-
user_id: int
The ID of the user who created the entry in the database -
character_id: int
The Character ID -
image_id: int
The Image ID -
position: int
Defines the order of this image among all images associated with the same character -
is_default: bool
Determines whether the Image is to be considered the default image for the character -
created: str
This is actually a Python Datetime object except for input and output -
modified: str
This is also a Python Datetime object and is updated with every update of the relationship of the image to the character
The complex attributes supplied by the ORM:
-
user: User
The User class is associated with theusers
table in the database. -
character: Character
The character that is associated with the image -
image: Image
The image that is associated with the character. This attribute is eager-loaded.
serialize ( ) -> dict
Only the attributes mapped to the characters_images
table will be present in the returned dictionary.