feat(web): manual face tagging and deletion (#16062)

This commit is contained in:
Alex 2025-02-21 09:58:25 -06:00 committed by GitHub
parent 94c0e8253a
commit 007eaaceb9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
35 changed files with 2054 additions and 106 deletions

View file

@ -96,6 +96,7 @@ select
left join "person" on "person"."id" = "asset_faces"."personId"
where
"asset_faces"."assetId" = "assets"."id"
and "asset_faces"."deletedAt" is null
) as "faces",
(
select

View file

@ -42,6 +42,8 @@ select
from
"person"
left join "asset_faces" on "asset_faces"."personId" = "person"."id"
where
"asset_faces"."deletedAt" is null
group by
"person"."id"
having
@ -67,6 +69,7 @@ from
"asset_faces"
where
"asset_faces"."assetId" = $1
and "asset_faces"."deletedAt" is null
order by
"asset_faces"."boundingBoxX1" asc
@ -90,6 +93,7 @@ from
"asset_faces"
where
"asset_faces"."id" = $1
and "asset_faces"."deletedAt" is null
-- PersonRepository.getFaceByIdWithAssets
select
@ -124,6 +128,7 @@ from
"asset_faces"
where
"asset_faces"."id" = $1
and "asset_faces"."deletedAt" is null
-- PersonRepository.reassignFace
update "asset_faces"
@ -169,6 +174,8 @@ from
and "asset_faces"."personId" = $1
and "assets"."isArchived" = $2
and "assets"."deletedAt" is null
where
"asset_faces"."deletedAt" is null
-- PersonRepository.getNumberOfPeople
select
@ -185,6 +192,7 @@ from
and "assets"."isArchived" = $2
where
"person"."ownerId" = $3
and "asset_faces"."deletedAt" is null
-- PersonRepository.refreshFaces
with
@ -235,6 +243,7 @@ from
where
"asset_faces"."assetId" in ($1)
and "asset_faces"."personId" in ($2)
and "asset_faces"."deletedAt" is null
-- PersonRepository.getRandomFace
select
@ -243,9 +252,22 @@ from
"asset_faces"
where
"asset_faces"."personId" = $1
and "asset_faces"."deletedAt" is null
-- PersonRepository.getLatestFaceDate
select
max("asset_job_status"."facesRecognizedAt")::text as "latestDate"
from
"asset_job_status"
-- PersonRepository.deleteAssetFace
delete from "asset_faces"
where
"asset_faces"."id" = $1
-- PersonRepository.softDeleteAssetFaces
update "asset_faces"
set
"deletedAt" = $1
where
"asset_faces"."id" = $2