
Metamorphose
Macros collection for converting Structure to Model, for a Green Barrel project.

Macros
Model
Macro for converting Structure to green-barrel Model.
The model can access the database.
The model can create, update, and delete documents in collections.
Requirements
Usage
Follow the Green Barrel link.
Model parameters
( all parameters are optional )
| Parameter: | Default: | Description: |
| :------------------ | :----------- | :--------------------------------------------------------------------------------------------------- |
| dbquerydocslimit | 1000 | limiting query results. |
| isadddoc | true | Create documents in the database. false - Alternatively, use it to validate data from web forms. |
| isupdoc | true | Update documents in the database. |
| isdeldoc | true | Delete documents from the database. |
| ignorefields | empty string | Fields that are not included in the database (separated by commas). |
| isuseaddition | false | Allows methods for additional actions and additional validation. |
| isusehooks | false | Allows hooks methods - impl Hooks for ModelName. |
Changelog
- v1.1.0 Removed 12 types of fields, the remaining fields have been renamed. See the documentation - https://docs.rs/green-barrel/latest/greenbarrel/fields/index.html_
- v1.3.2-beta Fixed basic example and updated readme file.
- v1.3.0-beta Transition to asynchronous code.
- v1.2.0-beta Updated dependency mongodb to version 2.
- v1.1.9-beta Updated README.md file.
- v1.1.0-beta Added support for Fixtures - To populate the database with pre-created data.
- v1.0.0-beta Not compatible with green-barrel v0.x.x and metamorphose v0.x.x
- v0.7.12 Fixed README.md.
- v0.7.8 Fixed validation for multi-select fields.
- v0.7.0 Added trait Administrator for easier registration of Models in the administration panel.
- v0.6.10 Added the ability to customize html code for web forms. See documentation: mangoorm > widgets > generatehtmlcode > GenerateHtmlCode > generatehtml().
- v0.6.9 Rename trait ToModel to Main.
- v0.6.0 The createdat and updatedat fields are automatically added to the Model. The widget type is inputDateTime and disabled = true, ishide = true. Updated README.md. Updated documentation._
- v0.5.4 Fixed ModelName::key() method. See documentation: mangoorm > models > ToModel._
- v0.5.2 Import optimized.
- v0.5.0 Added model attribute isusehooks. See documentation: mangoorm > models > hooks > Hooks._
- v0.4.8 Fixed error message text.
- v0.4.6 Updating by version of dependencies.
- v0.4.4 Optimization of the validation mechanism.
- v0.4.3 Improved validation for Slug fields.
- v0.4.2 Removed hiddenSlug field.
- v0.4.1 Added ishide parameter for Widgets._
- v0.4 Added inputSlug and hiddenSlug fields.
- v0.3 Removed the Form macro.
License