# Requêtes CRUD projects

list:
  query: >
    SELECT id, parent_id, name, description, position, created_at, updated_at
    FROM projects
  filters:
    default: "user_id = :user_id"
    admin: ""
  order: "position ASC"

show:
  query: >
    SELECT id, parent_id, name, description, position, created_at, updated_at
    FROM projects WHERE id = :id
  filters:
    default: "user_id = :user_id"
    admin: ""

create:
  table: projects
  fields:
    - user_id
    - parent_id
    - name
    - description
    - position

update:
  table: projects
  fields:
    - parent_id
    - name
    - description
    - position
  filters:
    default: "user_id = :user_id"
    admin: ""

delete:
  table: projects
  filters:
    default: "user_id = :user_id"
    admin: ""
