syncano-node icon indicating copy to clipboard operation
syncano-node copied to clipboard

Models

Open Idered opened this issue 8 years ago • 0 comments

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 avatar Nov 09 '17 11:11 Idered