Building Blocks > Domain-Specific Building Blocks > Reason Code Building Block > Database Schema (Reason Code Building Block)
Database Schema (Reason Code Building Block)
The reason code building block leverages the PTC.DBConnection building block to implement the database. All database configurations and rules can be found by examining the GetDBInfo service on the PTC.ReasonCode.Manager Thing.
The following diagram shows the schema for the reason code database objects:
Database schema diagram for the reason code building block.
The following Data Shapes in the PTC.ReasonCode project define the objects in the database schema:
PTC.ReasonCode.ReasonTree—Defines the reason codes hierarchy.
PTC.ReasonCode.ReasonCategory—Defines the reason category that is used to group reason codes.
PTC.ReasonCode.ReasonType—Defines a list of types that apply to reason codes. Used to group reason categories.
PTC.ReasonCode.ModelReasonTreeLink—Defines the link between a model and a reason tree.
PTC.ReasonCode.MaterialMasterReasonTreeLink—Defines the link between a material master and a reason tree.
PTC.ReasonCode.Reason—Defines the reason for the error code.
PTC.ReasonCode.MachineCode—Contains the machine errors.
PTC.ReasonCode.ReasonTreeNode—Defines the reason tree hierarchy. All reason tree nodes are grouped under a single reason tree. Each reason tree node is associated with a reason.
All of these Data Shapes have a related _AP Data Shape for the purpose of adding custom properties. For example, the PTC.ReasonCode.Reason Data Shape has an associated PTC.ReasonCode.Reason_AP Data Shape. For information on using these _AP Data Shapes, see Adding Custom Properties to Data Model Entities.
Was this helpful?