AbstractThe type representation of the model's data shape.
Implements the JSON.stringify() behavior.
It uses toStruct to get the plain object structure under the hood.
It is encouraged to use toStruct instead of this method because it provides better
clarity and expressiveness about the data structure being serialized. This method is provided
only to support the JSON.stringify() serialization.
A plain object structure containing the model's serializable properties.
AbstracttoConverts the model instance into a plain data structure (struct).
This method extracts the model's property data, removing functions, methods, or class-specific instance details, returning a clean structural representation.
A plain object structure containing the model's serializable properties.
Abstract base class representing a domain model in the application.
Models package data and behaviors, and provide a standard interface for serialization or conversion into a plain data structure through toStruct.
Example
Example demonstrating converting a model with nested sub-models to a plain struct