wuttjamaican.db.model.base
¶
Base Models
- class wuttjamaican.db.model.base.Base¶
This is the base class for all data models.
- class wuttjamaican.db.model.base.Person(**kwargs)[source]¶
Represents a person.
The use for this table in the base framework, is to associate with a
User
to provide first and last name etc. (However a user does not have to be associated with any person.)But this table could also be used as a basis for a Customer or Employee relationship etc.
- first_name¶
The person’s first name.
- full_name¶
Full name for the person. Note that this is required.
- last_name¶
The person’s last name.
- middle_name¶
The person’s middle name or initial.
- property user¶
Reference to the “first”
User
account for the person, orNone
.Warning
Note that the database schema supports multiple users per person, but this property logic ignores that and will only ever return “one or none”. That might be fine in 99% of cases, but if multiple accounts exist for a person, the one returned is indeterminate.
See
users
to access the full list.
- class wuttjamaican.db.model.base.Setting(**kwargs)[source]¶
Represents a config setting.
- name¶
Unique name for the setting.
- value¶
String value for the setting.