Entity Templates
In the Applipress ecosystem, entity templates play a crucial role in streamlining the development process by providing predefined structures for entities. These templates are designed to cater to a variety of common use cases, enabling developers to rapidly generate entities with a standard set of characteristics. Below, we detail the templates available within Applipress, elucidating their intended use cases and the fields they automatically generate.
Available Entity Templates
Lookup
-
Description: Designed for entities that serve as lookup tables or value lists, such as enumerations of product types or customer categories.
-
Fields Included:
code
,name
,description
,seq
,status
,validFrom
, andvalidTo
.-
code
: A unique identifier or code for each entry. -
name
: The display name of the entry. -
description
: A brief description of the entry. -
seq
: An integer used for custom sorting order. -
status
: Indicates if the entry is active or inactive. -
validFrom
andvalidTo
: Date range during which the entry is considered active.
-
Entity with Status
-
Description: Suitable for entities that require tracking of status over time.
-
Fields Included:
status
,validFrom
, andvalidTo
, enabling developers to easily implement entities with temporal validity and state management.
Hierarchy
-
Description: Creates entities capable of representing hierarchical relationships to themselves, such as organizational structures or product categories.
-
Fields Included: Inherits fields from the Lookup template and adds a
parent
field to establish parent-child relationships within the same entity.
Master-detail
-
Description: Defines a pair of interconnected entities representing a master-detail relationship, such as invoices and invoice items.
-
Fields Included: The master entity includes
status
,validFrom
, andvalidTo
. The detail entity (InvoiceItem
, for example) contains a reference back to the master entity (Invoice
), facilitating the representation of complex relational data.
Network Structure
-
Description: Generates a complex set of entities designed to model networked data structures with nodes, node types, and relationships.
-
Components:
-
Node
: Central entity representing individual data points within the network, including standard fields and relations toNodeType
and a parent node for hierarchical structures. -
NodeType
: Defines the type or category of nodes, utilizing standard fields. -
NodeRelType
: Specifies the type of relationship between nodes, incorporating standard fields and relations defining the relationship nature. -
NodeRel
: Represents the relationship between two nodes, containing status fields and references to the nodes and relationship type.
-
Empty Entity
-
Description: The most basic template, creating an entity without any predefined fields or relationships. Ideal for when a completely custom entity is required.
-
Use Case: When the developer needs maximum flexibility to define an entity from scratch.
Using Entity Templates
To utilize an entity template in Applipress, developers simply select the desired template when creating a new entity. This action pre-populates the entity with the fields and structures defined by the template, significantly accelerating the development of standard entity types and ensuring consistency across the application.
By leveraging these templates, developers can focus more on the unique aspects of their application's domain logic, rather than the repetitive task of defining common entity structures, thereby enhancing productivity and maintaining a high level of code quality and consistency.# Entity Templates in Applipress
Start typing here...