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:
@@ -616,14 +616,16 @@ CLOSED: [2026-01-23 ven. 20:42]
|
||||
- *File*: =src/application/use_cases/get_all_relays.rs=
|
||||
- *Complexity*: Low | *Uncertainty*: Low
|
||||
|
||||
*** STARTED Presentation Layer (Backend API) [0/2]
|
||||
*** DONE Presentation Layer (Backend API) [2/2]
|
||||
CLOSED: [2026-03-01 dim. 11:07]
|
||||
- State "DONE" from "STARTED" [2026-03-01 dim. 11:07]
|
||||
- State "STARTED" from "TODO" [2026-01-23 ven. 20:42]
|
||||
- [ ] *T045* [US1] [TDD] Define =RelayDto= in presentation layer
|
||||
- [X] *T045* [US1] [TDD] Define =RelayDto= in presentation layer
|
||||
- Fields: =id= (=u8=), =state= ("on"/"off"), =label= (=Option=)
|
||||
- Implement =From= for =RelayDto=
|
||||
- *File*: =src/presentation/dto/relay_dto.rs=
|
||||
- *Complexity*: Low | *Uncertainty*: Low
|
||||
- [ ] *T046* [US1] [TDD] Define API error responses
|
||||
- [X] *T046* [US1] [TDD] Define API error responses
|
||||
- =ApiError= enum with status codes and messages
|
||||
- Implement =poem::error::ResponseError=
|
||||
- *File*: =src/presentation/error.rs=
|
||||
|
||||
Reference in New Issue
Block a user