58 lines
944 B
SQL
58 lines
944 B
SQL
-- name: CreateEnetpulseSport :one
|
|
INSERT INTO enetpulse_sports (
|
|
sport_id,
|
|
name,
|
|
updates_count,
|
|
last_updated_at,
|
|
status,
|
|
updated_at
|
|
) VALUES (
|
|
$1, $2, $3, $4, $5, NOW()
|
|
)
|
|
RETURNING *;
|
|
|
|
-- name: GetAllEnetpulseSports :many
|
|
SELECT
|
|
id,
|
|
sport_id,
|
|
name,
|
|
updates_count,
|
|
last_updated_at,
|
|
status,
|
|
created_at,
|
|
updated_at
|
|
FROM enetpulse_sports
|
|
ORDER BY name;
|
|
|
|
-- name: CreateEnetpulseTournamentTemplate :one
|
|
INSERT INTO enetpulse_tournament_templates (
|
|
template_id,
|
|
name,
|
|
sport_fk,
|
|
gender,
|
|
updates_count,
|
|
last_updated_at,
|
|
status,
|
|
updated_at
|
|
) VALUES (
|
|
$1, $2, $3, $4, $5, $6, $7, NOW()
|
|
)
|
|
RETURNING *;
|
|
|
|
|
|
-- name: GetAllEnetpulseTournamentTemplates :many
|
|
SELECT
|
|
id,
|
|
template_id,
|
|
name,
|
|
sport_fk,
|
|
gender,
|
|
updates_count,
|
|
last_updated_at,
|
|
status,
|
|
created_at,
|
|
updated_at
|
|
FROM enetpulse_tournament_templates
|
|
ORDER BY name;
|
|
|