winterthur.models.mission_report ================================ .. py:module:: winterthur.models.mission_report Attributes ---------- .. autoapisummary:: winterthur.models.mission_report.MissionType winterthur.models.mission_report.MISSION_TYPES Classes ------- .. autoapisummary:: winterthur.models.mission_report.MissionReportFile winterthur.models.mission_report.MissionReport winterthur.models.mission_report.MissionReportVehicle winterthur.models.mission_report.MissionReportVehicleUse Module Contents --------------- .. py:type:: MissionType :canonical: Literal['single', 'multi'] .. py:data:: MISSION_TYPES :type: tuple[MissionType, Ellipsis] :value: ('single', 'multi') .. py:class:: MissionReportFile Bases: :py:obj:`onegov.file.File` A general file (image, document, pdf, etc), referenced in the database. Thanks to the use of `Depot `_ files can be seemingly stored in the database (with transaction guarantees), without actually storing it in the database. .. py:attribute:: __mapper_args__ .. py:class:: MissionReport Bases: :py:obj:`onegov.core.orm.Base`, :py:obj:`onegov.core.orm.mixins.ContentMixin`, :py:obj:`onegov.org.models.AccessExtension` Mixin providing a meta/content JSON pair. Meta is a JSON column loaded with each request, content is a JSON column loaded deferred (to be shown only in the detail view). .. py:attribute:: __tablename__ :value: 'mission_reports' .. py:attribute:: id :type: sqlalchemy.Column[uuid.UUID] .. py:attribute:: date :type: sqlalchemy.Column[datetime.datetime] .. py:attribute:: duration :type: sqlalchemy.Column[decimal.Decimal] .. py:attribute:: nature :type: sqlalchemy.Column[str] .. py:attribute:: location :type: sqlalchemy.Column[str] .. py:attribute:: personnel :type: sqlalchemy.Column[int] .. py:attribute:: backup :type: sqlalchemy.Column[int] .. py:attribute:: civil_defence :type: sqlalchemy.Column[bool] .. py:attribute:: pictures :value: None .. py:attribute:: mission_count :type: sqlalchemy.Column[int] .. py:attribute:: mission_type :type: sqlalchemy.Column[MissionType] .. py:attribute:: used_vehicles :type: sqlalchemy.orm.relationship[list[MissionReportVehicleUse]] .. py:property:: title :type: str .. py:property:: readable_duration :type: str .. py:property:: local_date :type: datetime.datetime .. py:class:: MissionReportVehicle Bases: :py:obj:`onegov.core.orm.Base`, :py:obj:`onegov.core.orm.mixins.ContentMixin`, :py:obj:`onegov.org.models.AccessExtension` Mixin providing a meta/content JSON pair. Meta is a JSON column loaded with each request, content is a JSON column loaded deferred (to be shown only in the detail view). .. py:attribute:: __tablename__ :value: 'mission_report_vehicles' .. py:attribute:: id :type: sqlalchemy.Column[uuid.UUID] .. py:attribute:: name :type: sqlalchemy.Column[str] .. py:attribute:: description :type: sqlalchemy.Column[str] .. py:attribute:: symbol :value: None .. py:attribute:: website :type: sqlalchemy.Column[str | None] .. py:attribute:: uses :type: sqlalchemy.orm.relationship[list[MissionReportVehicleUse]] .. py:property:: title :type: str .. py:property:: readable_website :type: str | None .. py:class:: MissionReportVehicleUse Bases: :py:obj:`onegov.core.orm.Base` Many to many association between vehicles and reports. .. py:attribute:: __tablename__ :value: 'mission_report_vehicle_usees' .. py:attribute:: mission_report_id :type: sqlalchemy.Column[uuid.UUID] .. py:attribute:: mission_report :type: sqlalchemy.orm.relationship[MissionReport] .. py:attribute:: vehicle_id :type: sqlalchemy.Column[uuid.UUID] .. py:attribute:: vehicle :type: sqlalchemy.orm.relationship[MissionReportVehicle] .. py:attribute:: count