Airplane Record¶
Represents a single record in the Startkladde Airplane table. The table stores information about any airplane referenced in a Flight Record record.
Interface¶
-
class
pysk.db.model.Airplane(id=None, registration=None, club=None, num_seats=None, type=None, category=None, callsign=None, comments=None)¶ Airplane representation used in Startkladde database
Implements a single record in the Startkladde planes table. Each member represents the value of the column with the same name and type.
Parameters: - id (int) – ID of this record in table
planes. - registration (str) – Airplane registration
- club (str) – Club name to which airplane belongs as string
- num_seats (int) – Number of seats
- type (str) – Type (Manufacturer & Model) of the plane as string
- category (str) –
Category. The following values are supported:
- ‘airplane‘
- ‘glider‘
- ‘motorglider‘
- ‘ultralight‘
- callsign (str) – Callsign (e.g. competition call sign for gliders)
- comments (str) – any comment
-
__eq__(other)¶ Equal comparison
Two airplanes are defined equal, if and only if their registration is equal.
Parameters: other ( Airplane) – Other instance to compare toReturns: Trueif and only ifselfand other are equal
-
__hash__()¶ Hash for object.
Returns: self.registration.__hash__()
-
__lt__(other)¶ Less comparison by registration string
Parameters: other ( Airplane) – Other instance to compare toReturns: Trueif and only ifselfis less than other.
-
__str__()¶ Convert instance to string
Returns: registrationstring
-
static
tableName()¶ Get name of MySQL table, where this data type is used
Returns: ‘planes‘
- id (int) – ID of this record in table