Mounting history, maintenance plans and tasks, performed work, out-of-service periods and cleaning.
Mounting history, maintenance plans and tasks, performed work, out-of-service periods and cleaning.A ✓ in the Null column means the field is optional. Constraint definitions are
reproduced verbatim from PostgreSQL, so they are the exact rule being enforced.
Descriptions come from the models; a blank one means the field carries no
description yet, not that it has no meaning.
((((season_end_day IS NOT NULL) AND (season_end_month IS NOT NULL) AND (season_start_day IS NOT NULL) AND (season_start_month IS NOT NULL) AND ((task_type)::text = 'SEASONAL'::text)) OR ((NOT ((task_type)::text = 'SEASONAL'::text)) AND (season_end_day IS NULL) AND (season_end_month IS NULL) AND (season_start_day IS NULL) AND (season_start_month IS NULL))))
((((secondary_interval_type IS NULL) AND (secondary_interval_value IS NULL)) OR ((secondary_interval_type IS NOT NULL) AND (secondary_interval_value IS NOT NULL))))
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"A7 manager","description":"Railway fleet management platform — internal documentation","colors":{"primary":"#3d4700","light":"#859900","dark":"#2a3200"},"favicon":"https://mintcdn.com/a7tech/hppoGf5bH4-HkvDU/favicon.svg?fit=max\u0026auto=format\u0026n=hppoGf5bH4-HkvDU\u0026q=85\u0026s=c13ec973f62604e6266c04ef2d078b42","footer":{"links":[{"header":"Project","items":[{"label":"Repository","href":"https://github.com/Railway-John/Warrantinator"}]}]},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"a7tech","hasAudioNarration":false,"actualSubdomain":"a7tech","customDomains":["docs.a7manager.se"],"gitSource":{"type":"github","owner":"railway-john","repo":"warrantinator","deployBranch":"main","contentDirectory":"docs","isPrivate":true,"mountPath":"","label":""},"chroma":{"latestBuiltDeploymentHistoryId":"6ada63064ca920a4c8408cea","collectionId":"d410dcfe-019a-4194-b121-b5185f986a5b","liveDeploymentHistoryId":"6ada63064ca920a4c8408cea","schemaVersion":"v3"},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6ada63064ca920a4c8408cea","clientVersion":"0.0.3965","searchFilterCounts":[{"language":"default","tag":"Pages","count":24},{"language":"default","tag":"Data","count":20},{"language":"default","tag":"Tables","count":10},{"language":"default","tag":"File formats","count":8},{"language":"default","tag":"Overview","count":8},{"language":"default","tag":"Platform","count":6},{"language":"default","tag":"Service Book","count":5},{"language":"default","tag":"Project Config","count":5},{"language":"default","tag":"Assets","count":2},{"language":"default","tag":"Inspections","count":2}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-nav-generations","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"isAtlas":false,"googleFontsInlined":false},"customCss":[{"filePath":"styles.css","content":"@media (min-width:1400px){[class*=max-w-8xl]{max-width:120rem!important}}"}],"page":{"pagePath":"data/tables/service-book","slug":"/data/tables/service-book","pageMetadata":{"title":"Service Book tables","description":"Mounting history, maintenance plans and tasks, performed work, out-of-service periods and cleaning.","href":"/data/tables/service-book"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Mounting history, maintenance plans and tasks, performed work, out-of-service periods and cleaning.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,p:`p`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{Accordion,Heading,Table}=_components;if(!Accordion)_missingMdxReference(`Accordion`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Mounting history, maintenance plans and tasks, performed work, out-of-service periods and cleaning.`}),`\n`,_jsxs(_components.p,{children:[`A `,_jsx(_components.strong,{children:`✓`}),` in the Null column means the field is optional. Constraint definitions are\nreproduced verbatim from PostgreSQL, so they are the exact rule being enforced.\nDescriptions come from the models; a blank one means the field carries no\ndescription yet, not that it has no meaning.`]}),`\n`,_jsx(Heading,{level:`3`,id:`servicebook_vehicleconfiguration`,children:_jsx(_components.code,{children:`servicebook_vehicleconfiguration`})}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Column`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{style:{textAlign:`center`},children:`Null`}),_jsx(_components.th,{children:`Default`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`id`})}),_jsx(_components.td,{children:`uuid`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`created_at`})}),_jsx(_components.td,{children:`timestamptz`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`updated_at`})}),_jsx(_components.td,{children:`timestamptz`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`mounted_at`})}),_jsx(_components.td,{children:`timestamptz`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{children:`When the component was mounted`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`mounted_mileage_km`})}),_jsx(_components.td,{children:`int`}),_jsx(_components.td,{style:{textAlign:`center`},children:`✓`}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Vehicle odometer at mount time`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`dismounted_at`})}),_jsx(_components.td,{children:`timestamptz`}),_jsx(_components.td,{style:{textAlign:`center`},children:`✓`}),_jsx(_components.td,{}),_jsx(_components.td,{children:`When dismounted (NULL = currently mounted)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`dismounted_mileage_km`})}),_jsx(_components.td,{children:`int`}),_jsx(_components.td,{style:{textAlign:`center`},children:`✓`}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Vehicle odometer at dismount time`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`dismount_reason`})}),_jsx(_components.td,{children:`varchar(255)`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Reason for dismount`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`notes`})}),_jsx(_components.td,{children:`text`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Free-text notes`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`external_system_id`})}),_jsx(_components.td,{children:`varchar(100)`}),_jsx(_components.td,{style:{textAlign:`center`},children:`✓`}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Integration key from master system`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`external_updated_at`})}),_jsx(_components.td,{children:`timestamptz`}),_jsx(_components.td,{style:{textAlign:`center`},children:`✓`}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Source system last-modified timestamp`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`component_id`})}),_jsx(_components.td,{children:`uuid`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{children:`The mounted component`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`project_id`})}),_jsx(_components.td,{children:`uuid`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Parent project for multi-tenancy`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`slot_id`})}),_jsx(_components.td,{children:`uuid`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{children:`The slot position on the vehicle type`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`vehicle_id`})}),_jsx(_components.td,{children:`uuid`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{children:`The vehicle this configuration belongs to`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`component_mileage_at_mount`})}),_jsx(_components.td,{children:`int`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Snapshot of component.total_mileage_km at mount time`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`depot`})}),_jsx(_components.td,{children:`varchar(100)`}),_jsx(_components.td,{style:{textAlign:`center`},children:`✓`}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Where the dismount was performed`})]})]})]}),`\n`,_jsx(Accordion,{title:`Constraints — 1 check, 3 unique indexes, 4 foreign keys, 1 primary key`,id:`constraints-1-check-3-unique-indexes-4-foreign-keys-1-primary-key`,children:_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Kind`}),_jsx(_components.th,{children:`Name`}),_jsx(_components.th,{children:`Definition`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Check`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`depot_required_on_dismount`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`(((dismounted_at IS NULL) OR (depot IS NOT NULL)))`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Foreign key`}),_jsx(_components.td,{}),_jsx(_components.td,{children:_jsx(_components.code,{children:`(component_id) REFERENCES assets_component(id)`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Foreign key`}),_jsx(_components.td,{}),_jsx(_components.td,{children:_jsx(_components.code,{children:`(project_id) REFERENCES project(id)`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Foreign key`}),_jsx(_components.td,{}),_jsx(_components.td,{children:_jsx(_components.code,{children:`(slot_id) REFERENCES assets_vehicletypeslot(id)`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Foreign key`}),_jsx(_components.td,{}),_jsx(_components.td,{children:_jsx(_components.code,{children:`(vehicle_id) REFERENCES assets_vehicle(id)`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Primary key`}),_jsx(_components.td,{}),_jsx(_components.td,{children:_jsx(_components.code,{children:`(id)`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Unique index`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`component_single_active_mount`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`(component_id) WHERE (dismounted_at IS NULL)`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Unique index`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`slot_single_active_component`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`(vehicle_id, slot_id) WHERE (dismounted_at IS NULL)`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Unique index`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`unique_config_external_id_per_project`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`(external_system_id, project_id) WHERE (external_system_id IS NOT NULL)`})})]})]})]})}),`\n`,_jsx(Heading,{level:`3`,id:`servicebook_maintenanceplan`,children:_jsx(_components.code,{children:`servicebook_maintenanceplan`})}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Column`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{style:{textAlign:`center`},children:`Null`}),_jsx(_components.th,{children:`Default`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`id`})}),_jsx(_components.td,{children:`uuid`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`created_at`})}),_jsx(_components.td,{children:`timestamptz`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`updated_at`})}),_jsx(_components.td,{children:`timestamptz`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`external_system_id`})}),_jsx(_components.td,{children:`varchar(100)`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Identity from master maintenance system`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`revision`})}),_jsx(_components.td,{children:`varchar(50)`}),_jsx(_components.td,{style:{textAlign:`center`},children:`✓`}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Informational version (e.g. ‘3’, ‘2024-R2’)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`name`})}),_jsx(_components.td,{children:`varchar(200)`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Plan name (e.g. ‘X60A Maintenance Program’)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`description`})}),_jsx(_components.td,{children:`text`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Plan description`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`external_updated_at`})}),_jsx(_components.td,{children:`timestamptz`}),_jsx(_components.td,{style:{textAlign:`center`},children:`✓`}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Source system last-modified timestamp`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`component_type_id`})}),_jsx(_components.td,{children:`uuid`}),_jsx(_components.td,{style:{textAlign:`center`},children:`✓`}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Target component type (XOR with vehicle_type)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`project_id`})}),_jsx(_components.td,{children:`uuid`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Parent project for multi-tenancy`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`vehicle_type_id`})}),_jsx(_components.td,{children:`uuid`}),_jsx(_components.td,{style:{textAlign:`center`},children:`✓`}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Target vehicle type (XOR with component_type)`})]})]})]}),`\n`,_jsx(Accordion,{title:`Constraints — 1 check, 1 unique, 2 unique indexes, 3 foreign keys, 1 primary key`,id:`constraints-1-check-1-unique-2-unique-indexes-3-foreign-keys-1-primary-key`,children:_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Kind`}),_jsx(_components.th,{children:`Name`}),_jsx(_components.th,{children:`Definition`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Check`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`maintenance_plan_xor_target`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`((((component_type_id IS NULL) AND (vehicle_type_id IS NOT NULL)) OR ((component_type_id IS NOT NULL) AND (vehicle_type_id IS NULL))))`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Foreign key`}),_jsx(_components.td,{}),_jsx(_components.td,{children:_jsx(_components.code,{children:`(component_type_id) REFERENCES assets_componenttype(id)`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Foreign key`}),_jsx(_components.td,{}),_jsx(_components.td,{children:_jsx(_components.code,{children:`(vehicle_type_id) REFERENCES assets_vehicletype(id)`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Foreign key`}),_jsx(_components.td,{}),_jsx(_components.td,{children:_jsx(_components.code,{children:`(project_id) REFERENCES project(id)`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Primary key`}),_jsx(_components.td,{}),_jsx(_components.td,{children:_jsx(_components.code,{children:`(id)`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Unique`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`unique_plan_external_id_per_project`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`(external_system_id, project_id)`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Unique index`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`one_plan_per_component_type_per_project`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`(component_type_id, project_id) WHERE (component_type_id IS NOT NULL)`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Unique index`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`one_plan_per_vehicle_type_per_project`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`(vehicle_type_id, project_id) WHERE (vehicle_type_id IS NOT NULL)`})})]})]})]})}),`\n`,_jsx(Heading,{level:`3`,id:`servicebook_maintenancetask`,children:_jsx(_components.code,{children:`servicebook_maintenancetask`})}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Column`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{style:{textAlign:`center`},children:`Null`}),_jsx(_components.th,{children:`Default`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`id`})}),_jsx(_components.td,{children:`uuid`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`created_at`})}),_jsx(_components.td,{children:`timestamptz`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`updated_at`})}),_jsx(_components.td,{children:`timestamptz`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`external_system_id`})}),_jsx(_components.td,{children:`varchar(100)`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Task identity from master maintenance system`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`name`})}),_jsx(_components.td,{children:`varchar(200)`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Task name (e.g. ‘Bogie Overhaul’)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`description`})}),_jsx(_components.td,{children:`text`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Task description`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`task_type`})}),_jsx(_components.td,{children:`varchar(10)`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{children:`RECURRING, ONE_TIME, or SEASONAL`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`group`})}),_jsx(_components.td,{children:`varchar(100)`}),_jsx(_components.td,{style:{textAlign:`center`},children:`✓`}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Grouping label (e.g. ‘A-service’, ‘C1-overhaul’)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`interval_type`})}),_jsx(_components.td,{children:`varchar(10)`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Primary interval measurement unit`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`interval_value`})}),_jsx(_components.td,{children:`int`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Primary interval value`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`tolerance_before`})}),_jsx(_components.td,{children:`int`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Can do this many units early`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`tolerance_after`})}),_jsx(_components.td,{children:`int`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Overdue after this many units late`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`secondary_interval_type`})}),_jsx(_components.td,{children:`varchar(10)`}),_jsx(_components.td,{style:{textAlign:`center`},children:`✓`}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Secondary interval measurement unit`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`secondary_interval_value`})}),_jsx(_components.td,{children:`int`}),_jsx(_components.td,{style:{textAlign:`center`},children:`✓`}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Secondary interval value`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`secondary_tolerance_before`})}),_jsx(_components.td,{children:`int`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Secondary: can do this many units early`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`secondary_tolerance_after`})}),_jsx(_components.td,{children:`int`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Secondary: overdue after this many units late`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`season_start_month`})}),_jsx(_components.td,{children:`int2`}),_jsx(_components.td,{style:{textAlign:`center`},children:`✓`}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Start month (1-12) for seasonal tasks`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`season_start_day`})}),_jsx(_components.td,{children:`int2`}),_jsx(_components.td,{style:{textAlign:`center`},children:`✓`}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Start day (1-31) for seasonal tasks`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`season_end_month`})}),_jsx(_components.td,{children:`int2`}),_jsx(_components.td,{style:{textAlign:`center`},children:`✓`}),_jsx(_components.td,{}),_jsx(_components.td,{children:`End month (1-12) for seasonal tasks`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`season_end_day`})}),_jsx(_components.td,{children:`int2`}),_jsx(_components.td,{style:{textAlign:`center`},children:`✓`}),_jsx(_components.td,{}),_jsx(_components.td,{children:`End day (1-31) for seasonal tasks`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`safety`})}),_jsx(_components.td,{children:`bool`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Whether this is a safety-critical task`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`location`})}),_jsx(_components.td,{children:`varchar(100)`}),_jsx(_components.td,{style:{textAlign:`center`},children:`✓`}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Location on vehicle/component`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`sort_order`})}),_jsx(_components.td,{children:`int`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Position within the plan`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`external_updated_at`})}),_jsx(_components.td,{children:`timestamptz`}),_jsx(_components.td,{style:{textAlign:`center`},children:`✓`}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Source system last-modified timestamp`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`maintenance_plan_id`})}),_jsx(_components.td,{children:`uuid`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Parent maintenance plan`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`project_id`})}),_jsx(_components.td,{children:`uuid`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Denormalized from plan for multi-tenancy filtering`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`estimated_cost`})}),_jsx(_components.td,{children:`numeric(12,2)`}),_jsx(_components.td,{style:{textAlign:`center`},children:`✓`}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Estimated total cost per execution, in project currency`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`estimated_manhours`})}),_jsx(_components.td,{children:`numeric(7,2)`}),_jsx(_components.td,{style:{textAlign:`center`},children:`✓`}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Estimated labour hours per execution (locally maintained)`})]})]})]}),`\n`,_jsx(Accordion,{title:`Constraints — 8 checks, 1 unique, 2 foreign keys, 1 primary key`,id:`constraints-8-checks-1-unique-2-foreign-keys-1-primary-key`,children:_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Kind`}),_jsx(_components.th,{children:`Name`}),_jsx(_components.th,{children:`Definition`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Check`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`maintenance_task_seasonal_fields_check`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`((((season_end_day IS NOT NULL) AND (season_end_month IS NOT NULL) AND (season_start_day IS NOT NULL) AND (season_start_month IS NOT NULL) AND ((task_type)::text = 'SEASONAL'::text)) OR ((NOT ((task_type)::text = 'SEASONAL'::text)) AND (season_end_day IS NULL) AND (season_end_month IS NULL) AND (season_start_day IS NULL) AND (season_start_month IS NULL))))`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Check`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`maintenance_task_secondary_interval_all_or_nothing`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`((((secondary_interval_type IS NULL) AND (secondary_interval_value IS NULL)) OR ((secondary_interval_type IS NOT NULL) AND (secondary_interval_value IS NOT NULL))))`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Check`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`servicebook_maintenancetask_interval_value_check`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`((interval_value >= 0))`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Check`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`servicebook_maintenancetask_secondary_interval_value_check`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`((secondary_interval_value >= 0))`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Check`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`servicebook_maintenancetask_secondary_tolerance_after_check`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`((secondary_tolerance_after >= 0))`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Check`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`servicebook_maintenancetask_secondary_tolerance_before_check`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`((secondary_tolerance_before >= 0))`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Check`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`servicebook_maintenancetask_tolerance_after_check`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`((tolerance_after >= 0))`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Check`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`servicebook_maintenancetask_tolerance_before_check`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`((tolerance_before >= 0))`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Foreign key`}),_jsx(_components.td,{}),_jsx(_components.td,{children:_jsx(_components.code,{children:`(maintenance_plan_id) REFERENCES servicebook_maintenanceplan(id)`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Foreign key`}),_jsx(_components.td,{}),_jsx(_components.td,{children:_jsx(_components.code,{children:`(project_id) REFERENCES project(id)`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Primary key`}),_jsx(_components.td,{}),_jsx(_components.td,{children:_jsx(_components.code,{children:`(id)`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Unique`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`unique_task_external_id_per_plan`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`(external_system_id, maintenance_plan_id)`})})]})]})]})}),`\n`,_jsx(Heading,{level:`3`,id:`servicebook_maintenancerecord`,children:_jsx(_components.code,{children:`servicebook_maintenancerecord`})}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Column`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{style:{textAlign:`center`},children:`Null`}),_jsx(_components.th,{children:`Default`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`id`})}),_jsx(_components.td,{children:`uuid`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`created_at`})}),_jsx(_components.td,{children:`timestamptz`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`updated_at`})}),_jsx(_components.td,{children:`timestamptz`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`completed_at`})}),_jsx(_components.td,{children:`timestamptz`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{children:`When the maintenance work was completed`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`depot`})}),_jsx(_components.td,{children:`varchar(100)`}),_jsx(_components.td,{style:{textAlign:`center`},children:`✓`}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Where the maintenance work was performed`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`performance_km`})}),_jsx(_components.td,{children:`int`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Vehicle performance reading (km) at time of work`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`operating_hours`})}),_jsx(_components.td,{children:`int`}),_jsx(_components.td,{style:{textAlign:`center`},children:`✓`}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Vehicle operating hours at time of work`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`deviation`})}),_jsx(_components.td,{children:`int`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Primary interval deviation (negative=early, positive=late)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`secondary_deviation`})}),_jsx(_components.td,{children:`int`}),_jsx(_components.td,{style:{textAlign:`center`},children:`✓`}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Secondary interval deviation`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`notes`})}),_jsx(_components.td,{children:`text`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Free-text remarks about the work performed`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`external_system_id`})}),_jsx(_components.td,{children:`varchar(100)`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Integration key from source maintenance system`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`external_updated_at`})}),_jsx(_components.td,{children:`timestamptz`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Source system last-modified timestamp`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`component_id`})}),_jsx(_components.td,{children:`uuid`}),_jsx(_components.td,{style:{textAlign:`center`},children:`✓`}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Component this work was performed on (at-least-one with vehicle)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`maintenance_task_id`})}),_jsx(_components.td,{children:`uuid`}),_jsx(_components.td,{style:{textAlign:`center`},children:`✓`}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Optional link to scheduled maintenance task`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`project_id`})}),_jsx(_components.td,{children:`uuid`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Parent project for multi-tenancy`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`vehicle_id`})}),_jsx(_components.td,{children:`uuid`}),_jsx(_components.td,{style:{textAlign:`center`},children:`✓`}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Vehicle this work was performed on (at-least-one with component)`})]})]})]}),`\n`,_jsx(Accordion,{title:`Constraints — 1 check, 1 unique, 4 foreign keys, 1 primary key`,id:`constraints-1-check-1-unique-4-foreign-keys-1-primary-key`,children:_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Kind`}),_jsx(_components.th,{children:`Name`}),_jsx(_components.th,{children:`Definition`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Check`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`record_must_have_vehicle_or_component`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`(((vehicle_id IS NOT NULL) OR (component_id IS NOT NULL)))`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Foreign key`}),_jsx(_components.td,{}),_jsx(_components.td,{children:_jsx(_components.code,{children:`(component_id) REFERENCES assets_component(id)`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Foreign key`}),_jsx(_components.td,{}),_jsx(_components.td,{children:_jsx(_components.code,{children:`(maintenance_task_id) REFERENCES servicebook_maintenancetask(id)`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Foreign key`}),_jsx(_components.td,{}),_jsx(_components.td,{children:_jsx(_components.code,{children:`(vehicle_id) REFERENCES assets_vehicle(id)`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Foreign key`}),_jsx(_components.td,{}),_jsx(_components.td,{children:_jsx(_components.code,{children:`(project_id) REFERENCES project(id)`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Primary key`}),_jsx(_components.td,{}),_jsx(_components.td,{children:_jsx(_components.code,{children:`(id)`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Unique`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`unique_record_external_id_per_project`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`(external_system_id, project_id)`})})]})]})]})}),`\n`,_jsx(Heading,{level:`3`,id:`servicebook_vehicleoutofservice`,children:_jsx(_components.code,{children:`servicebook_vehicleoutofservice`})}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Column`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{style:{textAlign:`center`},children:`Null`}),_jsx(_components.th,{children:`Default`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`id`})}),_jsx(_components.td,{children:`uuid`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`created_at`})}),_jsx(_components.td,{children:`timestamptz`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`updated_at`})}),_jsx(_components.td,{children:`timestamptz`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`external_system_id`})}),_jsx(_components.td,{children:`varchar(100)`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Integration key from source system`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`out_of_service_at`})}),_jsx(_components.td,{children:`timestamptz`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{children:`When the vehicle was taken out of service`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`in_service_at`})}),_jsx(_components.td,{children:`timestamptz`}),_jsx(_components.td,{style:{textAlign:`center`},children:`✓`}),_jsx(_components.td,{}),_jsx(_components.td,{children:`When the vehicle was returned to service (null = still out)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`reason`})}),_jsx(_components.td,{children:`varchar(20)`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Reason category for out-of-service event`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`notes`})}),_jsx(_components.td,{children:`text`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Free-text detail about the out-of-service event`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`depot`})}),_jsx(_components.td,{children:`varchar(100)`}),_jsx(_components.td,{style:{textAlign:`center`},children:`✓`}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Where the vehicle is held during out-of-service`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`external_updated_at`})}),_jsx(_components.td,{children:`timestamptz`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Source system last-modified timestamp`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`project_id`})}),_jsx(_components.td,{children:`uuid`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Parent project for multi-tenancy`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`vehicle_id`})}),_jsx(_components.td,{children:`uuid`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Vehicle taken out of service`})]})]})]}),`\n`,_jsx(Accordion,{title:`Constraints — 1 check, 1 unique, 2 foreign keys, 1 primary key`,id:`constraints-1-check-1-unique-2-foreign-keys-1-primary-key`,children:_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Kind`}),_jsx(_components.th,{children:`Name`}),_jsx(_components.th,{children:`Definition`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Check`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`oos_in_service_after_out_of_service`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`(((in_service_at IS NULL) OR (in_service_at > out_of_service_at)))`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Foreign key`}),_jsx(_components.td,{}),_jsx(_components.td,{children:_jsx(_components.code,{children:`(project_id) REFERENCES project(id)`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Foreign key`}),_jsx(_components.td,{}),_jsx(_components.td,{children:_jsx(_components.code,{children:`(vehicle_id) REFERENCES assets_vehicle(id)`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Primary key`}),_jsx(_components.td,{}),_jsx(_components.td,{children:_jsx(_components.code,{children:`(id)`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Unique`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`unique_oos_external_id_per_project`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`(external_system_id, project_id)`})})]})]})]})}),`\n`,_jsx(Heading,{level:`3`,id:`servicebook_cleaningrecord`,children:_jsx(_components.code,{children:`servicebook_cleaningrecord`})}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Column`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{style:{textAlign:`center`},children:`Null`}),_jsx(_components.th,{children:`Default`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`id`})}),_jsx(_components.td,{children:`uuid`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`created_at`})}),_jsx(_components.td,{children:`timestamptz`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`updated_at`})}),_jsx(_components.td,{children:`timestamptz`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`external_system_id`})}),_jsx(_components.td,{children:`varchar(100)`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Integration key from source system`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`cleaning_type`})}),_jsx(_components.td,{children:`varchar(20)`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Type of cleaning performed`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`status`})}),_jsx(_components.td,{children:`varchar(20)`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Whether the cleaning was completed or cancelled`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`completed_at`})}),_jsx(_components.td,{children:`timestamptz`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{children:`When the cleaning was completed or cancelled`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`depot`})}),_jsx(_components.td,{children:`varchar(100)`}),_jsx(_components.td,{style:{textAlign:`center`},children:`✓`}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Where the cleaning was performed`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`notes`})}),_jsx(_components.td,{children:`text`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Free-text remarks about the cleaning`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`external_updated_at`})}),_jsx(_components.td,{children:`timestamptz`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Source system last-modified timestamp`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`project_id`})}),_jsx(_components.td,{children:`uuid`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Parent project for multi-tenancy`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`vehicle_id`})}),_jsx(_components.td,{children:`uuid`}),_jsx(_components.td,{style:{textAlign:`center`}}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Vehicle that was cleaned`})]})]})]}),`\n`,_jsx(Accordion,{title:`Constraints — 1 unique, 2 foreign keys, 1 primary key`,id:`constraints-1-unique-2-foreign-keys-1-primary-key`,children:_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Kind`}),_jsx(_components.th,{children:`Name`}),_jsx(_components.th,{children:`Definition`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Foreign key`}),_jsx(_components.td,{}),_jsx(_components.td,{children:_jsx(_components.code,{children:`(vehicle_id) REFERENCES assets_vehicle(id)`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Foreign key`}),_jsx(_components.td,{}),_jsx(_components.td,{children:_jsx(_components.code,{children:`(project_id) REFERENCES project(id)`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Primary key`}),_jsx(_components.td,{}),_jsx(_components.td,{children:_jsx(_components.code,{children:`(id)`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Unique`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`unique_cleaning_external_id_per_project`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`(external_system_id, project_id)`})})]})]})]})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Service Book tables","description":"Mounting history, maintenance plans and tasks, performed work, out-of-service periods and cleaning.","href":"/data/tables/service-book"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"servicebook_vehicleconfiguration","slug":"servicebook_vehicleconfiguration","depth":3,"children":[]},{"title":"servicebook_maintenanceplan","slug":"servicebook_maintenanceplan","depth":3,"children":[]},{"title":"servicebook_maintenancetask","slug":"servicebook_maintenancetask","depth":3,"children":[]},{"title":"servicebook_maintenancerecord","slug":"servicebook_maintenancerecord","depth":3,"children":[]},{"title":"servicebook_vehicleoutofservice","slug":"servicebook_vehicleoutofservice","depth":3,"children":[]},{"title":"servicebook_cleaningrecord","slug":"servicebook_cleaningrecord","depth":3,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"a7tech","siteName":"A7 manager","title":"Service Book tables - A7 manager","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-08-09T07:52:44.894Z","originalFileLocation":"data/tables/service-book.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Mounting history, maintenance plans and tasks, performed work, out-of-service periods and cleaning.\">\u003cmeta data-mint-head name=\"application-name\" content=\"A7 manager\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/a7tech/KMXth563saw9sJGT/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/a7tech/KMXth563saw9sJGT/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/a7tech/KMXth563saw9sJGT/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/a7tech/KMXth563saw9sJGT/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/a7tech/KMXth563saw9sJGT/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/a7tech/KMXth563saw9sJGT/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/a7tech/KMXth563saw9sJGT/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/a7tech/KMXth563saw9sJGT/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/a7tech/KMXth563saw9sJGT/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Service Book tables - A7 manager\">\u003cmeta data-mint-head property=\"og:description\" content=\"Mounting history, maintenance plans and tasks, performed work, out-of-service periods and cleaning.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"A7 manager\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.a7manager.se/data/tables/service-book\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://a7tech.mintlify.app/_mintlify/api/og/v2?division=Tables\u0026amp;title=Service+Book+tables\u0026amp;description=Mounting+history%2C+maintenance+plans+and+tasks%2C+performed+work%2C+out-of-service+periods+and+cleaning.\u0026amp;theme=a9098c755b87d1ea4134c8a5\u0026amp;signature=e8787f1120722aaa46425cbb004d768f9979c13d0d158a0700426f0005b1dcb7\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Service Book tables - A7 manager\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Mounting history, maintenance plans and tasks, performed work, out-of-service periods and cleaning.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://a7tech.mintlify.app/_mintlify/api/og/v2?division=Tables\u0026amp;title=Service+Book+tables\u0026amp;description=Mounting+history%2C+maintenance+plans+and+tasks%2C+performed+work%2C+out-of-service+periods+and+cleaning.\u0026amp;theme=a9098c755b87d1ea4134c8a5\u0026amp;signature=e8787f1120722aaa46425cbb004d768f9979c13d0d158a0700426f0005b1dcb7\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/a7tech/KMXth563saw9sJGT/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"A7 manager\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#3d4700\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.a7manager.se/data/tables/service-book\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/data/tables/service-book.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.a7manager.se/#organization\",\"name\":\"A7 manager\",\"url\":\"https://docs.a7manager.se\"},{\"@type\":\"WebSite\",\"@id\":\"https://docs.a7manager.se#website\",\"name\":\"A7 manager\",\"url\":\"https://docs.a7manager.se\",\"publisher\":{\"@id\":\"https://docs.a7manager.se/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.a7manager.se/data/tables/service-book#webpage\",\"url\":\"https://docs.a7manager.se/data/tables/service-book\",\"name\":\"Service Book tables\",\"description\":\"Mounting history, maintenance plans and tasks, performed work, out-of-service periods and cleaning.\",\"dateModified\":\"2026-08-09T07:52:44.894Z\",\"isPartOf\":{\"@id\":\"https://docs.a7manager.se#website\"},\"breadcrumb\":{\"@id\":\"https://docs.a7manager.se/data/tables/service-book#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.a7manager.se/data/tables/service-book#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Tables\",\"item\":\"https://docs.a7manager.se/data/tables/projects-and-users\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Service Book tables\",\"item\":\"https://docs.a7manager.se/data/tables/service-book\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.a7manager.se/data/tables/service-book#article\",\"headline\":\"Service Book tables\",\"name\":\"Service Book tables\",\"description\":\"Mounting history, maintenance plans and tasks, performed work, out-of-service periods and cleaning.\",\"url\":\"https://docs.a7manager.se/data/tables/service-book\",\"mainEntityOfPage\":{\"@id\":\"https://docs.a7manager.se/data/tables/service-book#webpage\"},\"dateModified\":\"2026-08-09T07:52:44.894Z\",\"publisher\":{\"@id\":\"https://docs.a7manager.se/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.a7manager.se#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"A7 manager\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"A7 manager","nav":{"global":null,"tabs":[{"tab":"Platform","icon":"train","pages":[{"title":"Platform","href":""}]},{"tab":"Pages","icon":"desktop","pages":[{"title":"Pages","href":"/pages/ask-ai"}]},{"tab":"Data","icon":"database","groups":[{"group":"Overview","pages":[{"title":"Database structure","href":"/data/schema-overview"},{"title":"How ingestion works","href":"/data/ingestion"}]},{"group":"File formats","pages":[{"title":"vehicle_configurations","href":"/data/files/vehicle-configurations"},{"title":"defects","href":"/data/files/defects"},{"title":"vehicle_readings","href":"/data/files/vehicle-readings"},{"title":"maintenance_records","href":"/data/files/maintenance-records"},{"title":"measurements","href":"/data/files/measurements"},{"title":"vehicle_out_of_service","href":"/data/files/vehicle-out-of-service"},{"title":"cleaning_records","href":"/data/files/cleaning-records"},{"title":"maintenance_plans","href":"/data/files/maintenance-plans"}]},{"group":"Tables","pages":[{"title":"Projects and Users tables","href":"/data/tables/projects-and-users"},{"title":"Assets tables","description":"Vehicle types, product groups, component types, slots, vehicles, components and odometer readings.","href":"/data/tables/assets"},{"title":"Service Book tables","href":"/data/tables/service-book"},{"title":"Defects tables","description":"Faults recorded against a vehicle or component.","href":"/data/tables/defects"},{"title":"Warranty tables","href":"/data/tables/warranty"},{"title":"High-Value Components tables","href":"/data/tables/high-value-components"},{"title":"Inspections tables","href":"/data/tables/inspections"},{"title":"Reporting tables","href":"/data/tables/reporting"},{"title":"Measurements tables","href":"/data/tables/measurements"},{"title":"Planner tables","href":"/data/tables/planner"}]}]}]},"title":"Service Book tables - A7 manager","buildId":"dpl_849ArpqvBiCczQiT1Y1stNGpbqHT","deploymentId":"dpl_849ArpqvBiCczQiT1Y1stNGpbqHT","dynamics":[],"chunks":[]}