CharacterLink - applebiter/gnatwriter GitHub Wiki

The CharacterLink class represents the relationship between a character and a link.

Attributes

The attributes that are mapped to the characters_links 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
  • link_id: int The Link ID
  • created: str The creation datetime of the database entry, stored in 'yyyy-mm-dd hh:mm:ss.f' format

The complex attributes returned by the ORM:

  • user: User The user who created this database entry. The User is associated with the users table in the database.
  • character: Character The Character with which the Link is associated
  • link: Link The Link with which the Character is associated. This attribute is eager-loaded.

serialize()

serialize ( ) -> dict Only the attributes mapped to the characters_links table will be present in the returned dictionary.