Skip to content

Domain Layer

Project: KeDevO.YardPro.Domain Type: .NET 10.0 Class Library

The Domain project contains the core business model — 23 entities, 10 interchange-related entities, 20+ enums, and 5 value objects.

Architecture Role

Domain → Infrastructure → Application

Pure domain model — no dependencies on external frameworks.

Core Entities

Entity Type Description
Vehicle Root Full vehicle record with VIN-decoded specs
Part Root Inventory part with condition, pricing, status lifecycle
Invoice Root Financial document with InvoiceLine and Payment collections. Create(), AddLine(), AddPayment(), Cancel(), Finalize()
Customer Typed classification (Retail, Wholesale, Transporter). Factory constructor with validation. Owns ContactInfo value object
Company Root Multi-tenant company. Address, branding, workers, yard locations
Worker User with RBAC. HashSet<WorkerRole> for multi-role. AddRole(), RemoveRole(), HasRole(), SetPassword(), VerifyPassword()
MediaAsset Polymorphic media (image/video) for vehicles and parts
StorageLocation Self-referencing hierarchical storage bins
LabelTemplate Part label layout configuration
LogEntry Structured audit log

eBay Entities (5)

EbayAccount, EbayListing, EbayListingTemplate, EbayOrder, PartCategoryEbayMapping

Facebook Entities (3)

FacebookAccount, FacebookDestination, FacebookPostLog

Value Objects

  • ContactInfo — Phone, email, notes
  • Address — Street, city, county, postcode, country
  • ExceptionInfo — Serializable exception data
  • EntityReference — Log entity references
  • LogAttachment — Log attachment metadata

Business Rules

  • MediaRules — Upload size limits, allowed extensions