chore: restructure project into backend and frontend folders
- Move all frontend code to frontend/ directory - Add backend/ with Go project structure (cmd, internal, pkg) - Add docker-compose.yml for orchestration
This commit is contained in:
16
backend/internal/db/queries/query.sql
Normal file
16
backend/internal/db/queries/query.sql
Normal file
@@ -0,0 +1,16 @@
|
||||
-- name: GetDeliveriesByDate :many
|
||||
SELECT * FROM deliveries WHERE date = $1;
|
||||
|
||||
-- name: CreateDelivery :one
|
||||
INSERT INTO deliveries (date, pickup_location, product_name, address, phone, additional_phone, has_elevator, comment)
|
||||
VALUES ($1, $2, $3, $4, $5, $6, $7, $8)
|
||||
RETURNING *;
|
||||
|
||||
-- name: GetDeliveryByID :one
|
||||
SELECT * FROM deliveries WHERE id = $1;
|
||||
|
||||
-- name: DeleteDelivery :exec
|
||||
DELETE FROM deliveries WHERE id = $1;
|
||||
|
||||
-- name: UpdateDelivery :exec
|
||||
UPDATE deliveries SET date = $1, pickup_location = $2, product_name = $3, address = $4, phone = $5, additional_phone = $6, has_elevator = $7, comment = $8, updated_at = NOW() WHERE id = $9;
|
||||
Reference in New Issue
Block a user