CharacterImage - applebiter/gnatwriter GitHub Wiki
The CharacterImage class represents the relationship between a character and an image.
Attributes
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 databasecharacter_id: int
The Character IDimage_id: int
The Image IDposition: int
Defines the order of this image among all images associated with the same characteris_default: bool
Determines whether the Image is to be considered the default image for the charactercreated: str
This is actually a Python Datetime object except for input and outputmodified: 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 imageimage: Image
The image that is associated with the character. This attribute is eager-loaded.
serialize()
serialize ( ) -> dict
Only the attributes mapped to the characters_images
table will be present in the returned dictionary.