# Conventions ## Naming - **fb prefix** on database tables: `fbPallet`, `fbShipping`, `fbShippingItem`, etc. - **Dto suffix** for DTOs wrapping nopCommerce entities: `OrderDto`, `OrderItemDto`, `ProductDto`. - **XxxItemPallet** for measurement records: `ShippingItemPallet`, `OrderItemPallet`, `StockTakingItemPallet`. - **Grid prefix** for Blazor grid components: `GridPartnerBase`, `GridShippingBase`, etc. - **SignalRTags** constants use numeric ranges by domain (see `FruitBank.Common/SignalRs/`). ## Patterns - **MeasuringItemPalletBase** as abstract base for all three measurement hierarchies. - **GenericAttributes** for extending nopCommerce entities with custom data (IsMeasurable, Tare, AverageWeight). - **Composition interfaces** for measurement traits: IMeasuringValues = IMeasuringWeights + IMeasuringQuantity. - **DevExpress DxGrid** with `AcSignalRDataSource` for real-time grid data. - **MgGridBase** for grid layout persistence via localStorage. - **FruitBankSignalRClient** as single hub client for all server communication. - **DatabaseClient** for client-side caching with ConcurrentDictionary tables. ## Critical Rules - **MeasuringStatus.Finnished** — intentional legacy typo. Do NOT fix. - **Shipping = INBOUND, Order = OUTBOUND** — never confuse directions. - **Pallet = measurement record** — always created, even for non-measurable products. - **NetWeight is calculated, never stored** — GrossWeight − PalletWeight − (TrayQuantity × TareWeight). - **DLL references** to AyCode projects are intentional — do not convert to ProjectReference. - Do not suggest removal/rollback as a solution — find a fix. ## UI (Hungarian Locale) - Status labels and UI text are in Hungarian. - MeasuringStatus display: "Nincs elkezdve", "Elkezdve", "Kész", "Auditált". - Date format follows Hungarian conventions. --- > **LLM Maintenance:** If you establish new conventions, document them here.