openjaf/cenit — pull request #60 by sanchojaf (2014-10-12 03:29:37+00:00)
Title: Improve setup models

- Renamed store field in connection by key, all the endpoint not necessary are store.
- Removed 'model_schema' from flow, is redundant, webhook have an object and event too.
- Removed webhook relation from connection, is redundant a Flow have a connecction and webhook.
- Added 'active' field to Flow. This permit enable or disable a Flow.
- Added 'active' field to Model Schema. This permit have a lots of models load like a library of Models and only active some of that, the variable Module allow group package of model. In the future will be possible have for example a module for store, for ERP, for CRM, etc.
- Renamed model_shema field in event and webhook by model.
- Removed 'propose' variable from webhook, is redundant because webhook have a propose variable too.
- Unscoped for find the connection with credential, because the endpoint don't have access to current account, it's enough with the endpoint use key and token for authorization.
- Removed 'self' variable used unnecessary in some models in Setup module.
- Rename method 'model' in ModelSchema by 'instantiate' for avoid collition with new field name in other classes.
- Create in sample data the default events “created” and ‘updated’ related with each model schema.
- Add Flow to sample data.
- Tiny improve in Readme, general features