Reference Module
Overview
The Reference module manages tenant-scoped reference data that is foundational
for sales, promotions, pricing, and inventory modules.
It handles:
- Countries
- Currencies
- Entity Statuses
- Activity log
- Order Statuses
- Promotions
- System Options
- Tax Codes
- Units of Measure
All operations are tenant-aware.
Services
The Reference module consists of the following services:
- Country - country data
- Currency - currency definitions
- Entity Status - entity status definitions
- Activity - immutable activity/audit log
- Order Status - order status definitions
- Promotions - promotions and discounts
- System Options - system-wide options
- Tax Codes - tax classifications
- Unit of Measure - measurement units
Models
This module exposes and consumes the following models:
- Country Model
- Currency Model
- Entity Status Model
- Activity Model
- Order Status Model
- Promotions Model
- System Options Model
- Tax Code Model
- Unit of Measure Model
Currency Model
Represents a currency available in the system.
Fields:
Id (type: int)- internal identifierCurrencyCode (type: string?)- ISO currency code (e.g.GBP,USD)CurrencySymbol (type: string?)- display symbol (e.g.£,$)CurrencyLabel (type: string?)- full display name (e.g.British Pound)CreatedAt (type: DateTime)- creation timestamp
Validation:
IsReadyToAdd()— requiresCurrencyCode,CurrencySymbol,CurrencyLabelIsReadyToUpdate()— requiresId > 0
Entity Status Model
Represents a status that can be assigned to a customer or supplier entity.
Fields:
Id (type: int)- internal identifierTitle (type: string?)- status display labelWeighting (type: int)- ordering weightCreatedAt (type: DateTime)- creation timestamp
Seeded defaults: Prospect (weighting 0), Active (weighting 1), Inactive (weighting 2)
Validation:
IsReadyToAdd()— requiresTitleIsReadyToUpdate()— requiresId > 0
Activity Model
Represents an immutable activity/audit record.
Fields:
Id (type: long)- internal identifierCreatedAt (type: DateTime)- timestamp the record was createdActivityCode (type: int)- numeric activity type codeUserId (type: long?)- user who performed the actionComment (type: string?)- description of the activityEntityId (type: long?)- related entity identifierScreen (type: string?)- originating screen or featureIPAddress (type: string?)- IP address
Notes:
- Activity records are append-only — no update or delete is permitted
Country Model
Represents a country.
Fields:
CountryCode (type: string)- unique country codeCountryName (type: string)- country display name
Validation:
IsReadyToAdd()- requires
CountryCodeandCountryName
- requires
IsReadyToUpdate()- not explicitly defined
Order Status Model
Represents an order status.
Fields:
Id (type: int?)- internal identifierName (type: string?)- status nameWeighting (type: int?)- optional sorting weight
Validation:
- No explicit validation method
Promotions Model
Represents a promotion or discount.
Fields:
Id (type: int)- internal identifierCreatedAt (type: DateTime)- creation timestampStartDate (type: DateTime?)- promotion start dateEndDate (type: DateTime?)- promotion end dateIsOneUse (type: bool?)- one-time use flagMoneyOff (type: decimal?)- flat discount amountPercentageDiscount (type: decimal?)- percentage discountIsActive (type: bool?)- active flagPromoCode (type: string?)- unique promo codeMinOrderLevel (type: decimal?)- minimum order value for applicability
Validation:
IsReadyToAdd()- requires
StartDate,EndDate - requires
MoneyOff > 0orPercentageDiscount > 0 - requires
PromoCode - requires
MinOrderLevel > 0
- requires
IsReadyToUpdate()- requires
Id > 0
- requires
System Options Model
Represents a system-wide option.
Fields:
Id (type: int)- internal identifierCreatedAt (type: DateTime?)- creation timestampSystemOptionTypeId (type: int)- option typeIsActive (type: bool?)- active flagValue (type: string?)- option value
Validation:
IsReadyToAdd()- requires
SystemOptionTypeId > 0andValuenot empty
- requires
IsReadyToUpdate()- requires
Id > 0,SystemOptionTypeId > 0, andValuenot empty
- requires
Tax Code Model
Represents a tax classification.
Fields:
Id (type: long)- internal identifierCode (type: string)- unique tax codeDescription (type: string?)- descriptionRatePercent (type: decimal?)- tax rateIsActive (type: bool?)- active flag
Validation:
IsReadyToAdd()- requires
Code,Description,RatePercent
- requires
IsReadyToUpdate()- requires
Id > 0,Code,Description,RatePercent
- requires
Unit of Measure Model
Represents a unit of measure.
Fields:
Id (type: long)- internal identifierCode (type: string)- unique unit codeName (type: string)- display name
Validation:
IsReadyToAdd()- requires
CodeandName
- requires
IsReadyToUpdate()- requires
Id > 0,Code,Name
- requires