workflow_fields.py 631 B

12345678910111213141516
  1. from flask_restful import fields
  2. from fields.member_fields import simple_account_fields
  3. from libs.helper import TimestampField
  4. workflow_fields = {
  5. 'id': fields.String,
  6. 'graph': fields.Raw(attribute='graph_dict'),
  7. 'features': fields.Raw(attribute='features_dict'),
  8. 'hash': fields.String(attribute='unique_hash'),
  9. 'created_by': fields.Nested(simple_account_fields, attribute='created_by_account'),
  10. 'created_at': TimestampField,
  11. 'updated_by': fields.Nested(simple_account_fields, attribute='updated_by_account', allow_null=True),
  12. 'updated_at': TimestampField,
  13. 'tool_published': fields.Boolean,
  14. }