This commit is contained in:
tumillanino
2025-10-28 12:36:37 +11:00
parent 186d6768fb
commit dad3ec655f
31 changed files with 2256 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
-- name: ListGalleryPhotos :many
SELECT id, image_url, caption, created_at, show_on_home
FROM gallery_photos
ORDER BY created_at DESC;
-- name: ListHomeCarouselPhotos :many
SELECT id, image_url, caption, created_at, show_on_home
FROM gallery_photos
WHERE show_on_home = true
ORDER BY created_at DESC;
-- name: CreateGalleryPhoto :one
INSERT INTO gallery_photos (image_url, caption, created_at, show_on_home)
VALUES ($1, $2, $3, $4)
RETURNING id, image_url, caption, created_at, show_on_home;
-- name: DeleteGalleryPhoto :exec
DELETE FROM gallery_photos
WHERE id = $1;