feature: add ability to assign tasks
This commit is contained in:
2
api/query/label_color.sql
Normal file
2
api/query/label_color.sql
Normal file
@ -0,0 +1,2 @@
|
||||
-- name: GetLabelColorByID :one
|
||||
SELECT * FROM label_color WHERE label_color_id = $1;
|
@ -8,4 +8,4 @@ SELECT * FROM project WHERE team_id = $1;
|
||||
SELECT * FROM project WHERE project_id = $1;
|
||||
|
||||
-- name: CreateProject :one
|
||||
INSERT INTO project(team_id, created_at, name) VALUES ($1, $2, $3) RETURNING *;
|
||||
INSERT INTO project(owner, team_id, created_at, name) VALUES ($1, $2, $3, $4) RETURNING *;
|
||||
|
@ -2,6 +2,12 @@
|
||||
INSERT INTO task (task_group_id, created_at, name, position)
|
||||
VALUES($1, $2, $3, $4) RETURNING *;
|
||||
|
||||
-- name: UpdateTaskDescription :one
|
||||
UPDATE task SET description = $2 WHERE task_id = $1 RETURNING *;
|
||||
|
||||
-- name: GetTaskByID :one
|
||||
SELECT * FROM task WHERE task_id = $1;
|
||||
|
||||
-- name: GetTasksForTaskGroupID :many
|
||||
SELECT * FROM task WHERE task_group_id = $1;
|
||||
|
||||
|
6
api/query/task_assigned.sql
Normal file
6
api/query/task_assigned.sql
Normal file
@ -0,0 +1,6 @@
|
||||
-- name: CreateTaskAssigned :one
|
||||
INSERT INTO task_assigned (task_id, user_id, assigned_date)
|
||||
VALUES($1, $2, $3) RETURNING *;
|
||||
|
||||
-- name: GetAssignedMembersForTask :many
|
||||
SELECT * FROM task_assigned WHERE task_id = $1;
|
6
api/query/task_label.sql
Normal file
6
api/query/task_label.sql
Normal file
@ -0,0 +1,6 @@
|
||||
-- name: CreateTaskLabelForTask :one
|
||||
INSERT INTO task_label (task_id, label_color_id, assigned_date)
|
||||
VALUES ($1, $2, $3) RETURNING *;
|
||||
|
||||
-- name: GetTaskLabelsForTaskID :many
|
||||
SELECT * FROM task_label WHERE task_id = $1;
|
@ -8,6 +8,6 @@ SELECT * FROM user_account;
|
||||
SELECT * FROM user_account WHERE username = $1;
|
||||
|
||||
-- name: CreateUserAccount :one
|
||||
INSERT INTO user_account(display_name, email, username, created_at, password_hash)
|
||||
VALUES ($1, $2, $3, $4, $5)
|
||||
INSERT INTO user_account(first_name, last_name, email, username, created_at, password_hash)
|
||||
VALUES ($1, $2, $3, $4, $5, $6)
|
||||
RETURNING *;
|
||||
|
Reference in New Issue
Block a user