feat(domain,presentation,tests): implement Relay entity, DTOs, and API errors

- Add Relay entity with constructors and business logic methods
- Add RelayDto for API responses with From<Relay> conversion
- Add ApiError with ResponseError trait for unified error handling
- Add dependency injection tests for mock infrastructure in test mode
This commit is contained in:
2026-01-23 20:46:48 +01:00
parent aae25ea7e1
commit 0b7636c80c
9 changed files with 1011 additions and 4 deletions

View File

@@ -94,3 +94,12 @@
//! - Architecture: `specs/constitution.md` - API-First Design principle
//! - API design: `specs/001-modbus-relay-control/plan.md` - Presentation layer tasks
//! - Domain types: [`crate::domain`] - Types to be wrapped in DTOs
/// Data Transfer Objects (DTOs) for API responses.
///
/// This module contains DTO structures that are used to serialize domain
/// objects for API responses, providing a clean separation between internal
/// domain models and external API contracts.
pub mod dto;
pub mod error;