From d2494dda2eb3b82b1c28190a9afb4f3309370a95 Mon Sep 17 00:00:00 2001 From: openclaw Date: Mon, 23 Mar 2026 15:50:50 +0000 Subject: [PATCH] =?UTF-8?q?feat(design):=20add=20value=20objects=20?= =?UTF-8?q?=E2=80=94=20FileStatus,=20ArchitectureLayer,=20ModuleLayer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 --- .../modules/design/domain/value_objects.py | 23 ++++++++++++++++ backend/tests/test_design_entities.py | 27 +++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 backend/tests/test_design_entities.py diff --git a/backend/app/modules/design/domain/value_objects.py b/backend/app/modules/design/domain/value_objects.py index e69de29..fa826e5 100644 --- a/backend/app/modules/design/domain/value_objects.py +++ b/backend/app/modules/design/domain/value_objects.py @@ -0,0 +1,23 @@ +from enum import Enum + + +class FileStatus(str, Enum): + OK = "ok" + SPARSE = "sparse" + MISSING = "missing" + TEMPLATE_RESIDUE = "template-residue" + PLACEHOLDER_HEAVY = "placeholder-heavy" + + +class ArchitectureLayer(str, Enum): + BUSINESS = "business" + APPLICATION = "application" + DATA = "data" + TECHNOLOGY = "technology" + + +class ModuleLayer(str, Enum): + DOMAIN = "domain" + APPLICATION = "application" + INFRASTRUCTURE = "infrastructure" + INTERFACES = "interfaces" diff --git a/backend/tests/test_design_entities.py b/backend/tests/test_design_entities.py new file mode 100644 index 0000000..139c405 --- /dev/null +++ b/backend/tests/test_design_entities.py @@ -0,0 +1,27 @@ +from app.modules.design.domain.value_objects import ( + ArchitectureLayer, + FileStatus, + ModuleLayer, +) + + +def test_file_status_values(): + assert FileStatus.OK == "ok" + assert FileStatus.SPARSE == "sparse" + assert FileStatus.MISSING == "missing" + assert FileStatus.TEMPLATE_RESIDUE == "template-residue" + assert FileStatus.PLACEHOLDER_HEAVY == "placeholder-heavy" + + +def test_architecture_layer_values(): + assert ArchitectureLayer.BUSINESS == "business" + assert ArchitectureLayer.APPLICATION == "application" + assert ArchitectureLayer.DATA == "data" + assert ArchitectureLayer.TECHNOLOGY == "technology" + + +def test_module_layer_values(): + assert ModuleLayer.DOMAIN == "domain" + assert ModuleLayer.APPLICATION == "application" + assert ModuleLayer.INFRASTRUCTURE == "infrastructure" + assert ModuleLayer.INTERFACES == "interfaces"