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 IDuser_id: int
The system user or the User currently logged inis_pseudonym: bool
Indicates whether the Author name is a pseudonymname: str
The Author nameinitials: str
The Author's initialscreated: 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 Author
The complex attributes supplied by the ORM:
user: User
The User class is associated with theusers
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 theauthors_stories
table in the database
serialize()
serialize ( ) -> dict
Only the attributes mapped to the authors
table will be present in the returned dictionary.