Simple Lookup Entity - State Reference Data
Description
This example demonstrates a basic lookup entity used for reference data. The State entity represents a simple master data table with just two fields - name and code. This is a common pattern for entities that serve as dropdown options in other forms, such as states, countries, categories, or status types. The entity has minimal configuration, no workflow, and is primarily used to maintain standardized reference values across the system.
Use Case
Used in the lottery/donation system to maintain a list of Australian states and territories that can be referenced by customer addresses, subscriptions, and other entities. This ensures consistent state codes and names throughout the application.
Key Features
- Minimal field configuration with just name and code
- No workflow definition (simple CRUD operations)
- Organized in the "adm" (administration) folder
- Comments enabled for documentation
- Tasks disabled as lookup data doesn't require task management
JSON Definition
{
"head": {
"name": "State",
"key": "state",
"pluralisedName": "States",
"allowComments": true,
"allowTasks": false,
"isActive": true
},
"fields": [
{
"label": "Name",
"key": "name",
"validateRules": {
"required": true
},
"behaviourOptions": {},
"type": "TextField"
},
{
"label": "Code",
"key": "code",
"validateRules": {
"required": true
},
"behaviourOptions": {},
"type": "TextField"
}
],
"hooks": [],
"folderKey": "adm"
}
Notes
- The
folderKeyproperty organizes this entity in the administration folder for better organization - Both fields are required to ensure data integrity
- This pattern is reusable for any simple lookup/reference data needs
- No complex validation rules or behaviors are needed for basic reference data