2022-10-12 10:22:22 -04:00
|
|
|
"""Loads and sets up all database models for SQLAlchemy.
|
|
|
|
|
|
|
|
autoflake8 will remove these lines without the noqa comment
|
|
|
|
|
|
|
|
NOTE: make sure this file is ignored by reorder-python-imports since
|
|
|
|
some models need to be loaded before others for relationships and to
|
|
|
|
avoid circular imports
|
|
|
|
"""
|
|
|
|
|
2023-05-26 13:07:18 -04:00
|
|
|
# unused imports are needed for SQLAlchemy to load the models
|
|
|
|
# ruff: noqa: F401
|
2022-10-12 10:22:22 -04:00
|
|
|
|
2023-05-26 20:01:08 -04:00
|
|
|
# we do not want to sort imports in this file, since the order matters
|
|
|
|
# ruff: noqa: I001
|
|
|
|
|
2023-01-17 12:56:06 -05:00
|
|
|
from spiffworkflow_backend.models.db import add_listeners
|
2022-10-12 10:22:22 -04:00
|
|
|
|
2022-10-21 16:28:09 -04:00
|
|
|
# must load these before UserModel and GroupModel for relationships
|
2022-10-12 10:22:22 -04:00
|
|
|
from spiffworkflow_backend.models.user_group_assignment import (
|
|
|
|
UserGroupAssignmentModel,
|
|
|
|
) # noqa: F401
|
2022-10-21 16:28:09 -04:00
|
|
|
from spiffworkflow_backend.models.principal import PrincipalModel # noqa: F401
|
2022-10-12 10:22:22 -04:00
|
|
|
|
|
|
|
|
2022-12-19 16:23:02 -05:00
|
|
|
from spiffworkflow_backend.models.human_task import HumanTaskModel # noqa: F401
|
2022-11-14 15:23:37 -05:00
|
|
|
from spiffworkflow_backend.models.spec_reference import (
|
|
|
|
SpecReferenceCache,
|
2022-10-12 10:22:22 -04:00
|
|
|
) # noqa: F401
|
2023-04-19 18:07:15 -04:00
|
|
|
from spiffworkflow_backend.models.process_caller import (
|
|
|
|
ProcessCallerCacheModel,
|
|
|
|
) # noqa: F401
|
2022-10-12 10:22:22 -04:00
|
|
|
from spiffworkflow_backend.models.message_instance import (
|
|
|
|
MessageInstanceModel,
|
|
|
|
) # noqa: F401
|
|
|
|
from spiffworkflow_backend.models.message_triggerable_process_model import (
|
|
|
|
MessageTriggerableProcessModel,
|
|
|
|
) # noqa: F401
|
|
|
|
from spiffworkflow_backend.models.permission_assignment import (
|
|
|
|
PermissionAssignmentModel,
|
|
|
|
) # noqa: F401
|
|
|
|
from spiffworkflow_backend.models.permission_target import (
|
|
|
|
PermissionTargetModel,
|
|
|
|
) # noqa: F401
|
|
|
|
from spiffworkflow_backend.models.process_instance import (
|
|
|
|
ProcessInstanceModel,
|
|
|
|
) # noqa: F401
|
|
|
|
from spiffworkflow_backend.models.process_instance_report import (
|
|
|
|
ProcessInstanceReportModel,
|
|
|
|
) # noqa: F401
|
2022-10-20 16:00:12 -04:00
|
|
|
from spiffworkflow_backend.models.refresh_token import RefreshTokenModel # noqa: F401
|
2022-10-12 10:22:22 -04:00
|
|
|
from spiffworkflow_backend.models.secret_model import SecretModel # noqa: F401
|
|
|
|
from spiffworkflow_backend.models.user import UserModel # noqa: F401
|
|
|
|
from spiffworkflow_backend.models.group import GroupModel # noqa: F401
|
2022-11-28 15:26:50 -05:00
|
|
|
from spiffworkflow_backend.models.process_instance_metadata import (
|
|
|
|
ProcessInstanceMetadataModel,
|
|
|
|
) # noqa: F401
|
2023-03-03 12:24:18 -05:00
|
|
|
from spiffworkflow_backend.models.process_instance_file_data import (
|
|
|
|
ProcessInstanceFileDataModel,
|
|
|
|
) # noqa: F401
|
2023-02-28 16:30:52 -05:00
|
|
|
|
2023-03-02 17:28:31 -05:00
|
|
|
from spiffworkflow_backend.models.bpmn_process import BpmnProcessModel # noqa: F401
|
2023-03-03 10:20:26 -05:00
|
|
|
from spiffworkflow_backend.models.bpmn_process_definition import (
|
|
|
|
BpmnProcessDefinitionModel,
|
|
|
|
) # noqa: F401
|
2023-03-02 17:28:31 -05:00
|
|
|
from spiffworkflow_backend.models.task import TaskModel # noqa: F401
|
2023-03-03 10:20:26 -05:00
|
|
|
from spiffworkflow_backend.models.task_definition import (
|
|
|
|
TaskDefinitionModel,
|
|
|
|
) # noqa: F401
|
2023-03-02 17:28:31 -05:00
|
|
|
from spiffworkflow_backend.models.json_data import JsonDataModel # noqa: F401
|
2023-03-03 10:20:26 -05:00
|
|
|
from spiffworkflow_backend.models.bpmn_process_definition_relationship import (
|
|
|
|
BpmnProcessDefinitionRelationshipModel,
|
|
|
|
) # noqa: F401
|
2023-03-14 13:12:01 -04:00
|
|
|
from spiffworkflow_backend.models.process_instance_queue import (
|
|
|
|
ProcessInstanceQueueModel,
|
|
|
|
) # noqa: F401
|
2023-05-03 17:36:43 -04:00
|
|
|
from spiffworkflow_backend.models.active_user import (
|
|
|
|
ActiveUserModel,
|
|
|
|
) # noqa: F401
|
2023-05-30 13:51:37 -04:00
|
|
|
from spiffworkflow_backend.models.process_model_cycle import (
|
|
|
|
ProcessModelCycleModel,
|
|
|
|
) # noqa: F401
|
2022-10-12 10:22:22 -04:00
|
|
|
|
|
|
|
add_listeners()
|