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

Models #98

Open
Idered opened this issue Nov 1, 2017 · 0 comments
Open

Models #98

Idered opened this issue Nov 1, 2017 · 0 comments

Comments

@Idered
Copy link
Member

Idered commented Nov 1, 2017

models:
  post:
    hidden: updated_at, id, $syncano
    computed:
      full_name: `${first_name} ${last_name}`
    scope:
      published:
        - column: published
          value: true
      unpublished:
        - column: published
          value: false
      fromLastWeek:
        - column: published
          value: true
        - column: created_at
          is: gte
          value: new Date(new Date().getTime() - 7 * 24 * 60 * 60 * 1000)

models.post.hidden
Define columns hidden in results. $syncano means "hide all syncano columns"

models.post.scope
Define named queries

data.post.published().list()
@Idered Idered changed the title Scopes Models Nov 1, 2017
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