tcrudge.models module

Module contains basic model class.

class tcrudge.models.BaseModel(*args, **kwargs)

Bases: peewee.Model

Basic abstract ORM model.


alias of BaseModelDoesNotExist

id = <peewee.PrimaryKeyField object>
classmethod to_schema(excluded=None)

Generates JSON schema from ORM model. User can exclude some fields from serialization, by default the only fields to exclude are pagination settings.

Parameters:excluded (list or tuple.) – Excluded parameters.
Returns:JSON schema.
Return type:dict.