Constructor
# new BaseModel(arg)
An abstract base class that extends the Model class from decorator-validation and adds timestamp functionality. All domain models in the application should extend this class to inherit common properties and behaviors.
Base model class for all domain models
Parameters:
Name | Type | Description |
---|---|---|
arg |
ModelArg.<BaseModel>
|
Optional initialization data for the model |
Example
```typescript
class User extends BaseModel {
Members
# createdOn
Automatically set to the current date and time when the model is created
Creation timestamp for the model
Date
# createdOn
Automatically set to the current date and time when the model is created
Creation timestamp for the model
# updatedOn
Automatically updated to the current date and time whenever the model is modified
Last update timestamp for the model
Date
# updatedOn
Automatically updated to the current date and time whenever the model is modified
Last update timestamp for the model