mirror of
https://github.com/immich-app/immich.git
synced 2025-12-21 17:25:35 +03:00
41 lines
566 B
MySQL
41 lines
566 B
MySQL
|
|
-- NOTE: This file is auto generated by ./sql-generator
|
||
|
|
|
||
|
|
-- NotificationRepository.search
|
||
|
|
select
|
||
|
|
"id",
|
||
|
|
"createdAt",
|
||
|
|
"level",
|
||
|
|
"type",
|
||
|
|
"title",
|
||
|
|
"description",
|
||
|
|
"data",
|
||
|
|
"readAt"
|
||
|
|
from
|
||
|
|
"notifications"
|
||
|
|
where
|
||
|
|
"userId" = $1
|
||
|
|
and "deletedAt" is null
|
||
|
|
order by
|
||
|
|
"createdAt" desc
|
||
|
|
|
||
|
|
-- NotificationRepository.search (unread)
|
||
|
|
select
|
||
|
|
"id",
|
||
|
|
"createdAt",
|
||
|
|
"level",
|
||
|
|
"type",
|
||
|
|
"title",
|
||
|
|
"description",
|
||
|
|
"data",
|
||
|
|
"readAt"
|
||
|
|
from
|
||
|
|
"notifications"
|
||
|
|
where
|
||
|
|
(
|
||
|
|
"userId" = $1
|
||
|
|
and "readAt" is null
|
||
|
|
)
|
||
|
|
and "deletedAt" is null
|
||
|
|
order by
|
||
|
|
"createdAt" desc
|