Contracts Layer¶
Project:
KeDevO.YardPro.ContractsType: .NET 10.0 Class Library
Defines the Data Transfer Objects (DTOs) — the communication contract between API, Web, and external consumers.
DTO Catalog¶
Authentication — Auth/¶
AuthDto — Login request/response
Vehicles — Vehicles/¶
VehicleDto, VehicleCreateDto, VehicleUpdateDto
Parts — Parts/¶
PartDto, PartCreateDto, PartUpdateDto
Invoices — Invoices/¶
InvoiceDto — Invoice + lines + payments
Customers — Customers/¶
CustomerDto, CustomerCreateDto, CustomerUpdateDto
Workers — Workers/¶
WorkerDto, WorkerCreateDto, WorkerUpdateDto
Interchange — Interchange/¶
InterchangeGroupDto, InterchangeRequests, OEMPartNumberDto, VehicleSearchDto
Other DTOs¶
CarApiVehicleDto, CompanyDto, PartLabelDto, VehicleMakeDto, FacebookAccountDto, LogEntryDto, RoleLicenseDto, StorageLocationDto, YardLocationDto, MediaAssetDto
Naming Conventions¶
{Entity}Dto— Read model{Entity}CreateDto— Create command{Entity}UpdateDto— Update command
Design Principles¶
- One DTO per concern
- Keep DTOs serializable
- Match API contracts — changing a DTO is a breaking change
- Nullable types for optional fields