Data models
You can create models using the Dominus CLI using the generate model
command. It will automatically use the namespace of the current Module and create an empty class.
Model attributes
Optional
Used to mark model properties as optional, when handling requests using data models.
The framework will try and find each property name in the Request object, and will throw an Exception if the property is not found and not marked as optional.
InitModel
Used to declare any method inside a model to be used for initialization.
This method will be called immediately after the Request object data has been mapped to the model properties.