Author - applebiter/gnatwriter GitHub Wiki

The Author class represents an author of a Story.

Attributes

The attributes that are mapped to the authors table in the database:

  • id: int The Author ID
  • user_id: int The system user or the User currently logged in
  • is_pseudonym: bool Indicates whether the Author name is a pseudonym
  • name: str The Author name
  • initials: str The Author's initials
  • 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 Author

The complex attributes supplied by the ORM:

  • user: User The User class is associated with the users table in the database.
  • stories: List[AuthorStory] AuthorStory objects point to the Stories the Author is associated with in the database. The AuthorStory class is associated with the authors_stories table in the database

serialize()

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