-- NOTE: This file is auto generated by ./sql-generator

-- NotificationRepository.search
select
  "id",
  "createdAt",
  "level",
  "type",
  "title",
  "description",
  "data",
  "readAt"
from
  "notification"
where
  "userId" = $1
  and "deletedAt" is null
order by
  "createdAt" desc

-- NotificationRepository.search (unread)
select
  "id",
  "createdAt",
  "level",
  "type",
  "title",
  "description",
  "data",
  "readAt"
from
  "notification"
where
  (
    "userId" = $1
    and "readAt" is null
  )
  and "deletedAt" is null
order by
  "createdAt" desc
