Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to Toggle using the pow schema extensions to all models #35

Open
pythononwheels opened this issue Sep 26, 2019 · 1 comment

Comments

@pythononwheels
Copy link
Owner

currently available for SQL Models to use SQL refelction:
see here

Toggle using the pow schema extensions (id, created_at, last_updated)

_use_pow_schema_attrs = False

@pythononwheels
Copy link
Owner Author

Something like:

            if getattr(self.__class__,'_use_pow_schema_attrs', False):
                self.basic_schema = {
                    "_uuid" :  { "type" : "string", "default" : str(uuid.uuid4()) },
                    #"eid"   :   { "type" : "string" },
                    "created_at"    : { "type" : "datetime" },
                    "last_updated"    : { "type" : "datetime" },
                }
            else:
                self.basic_schema = {}

## And then merge the two dicts schema & basic_schema.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant