feat: user CRUD

This commit is contained in:
2025-11-09 21:20:36 -07:00
parent afa91548e1
commit 5862378dc1
15 changed files with 399 additions and 5 deletions

View File

@@ -0,0 +1,21 @@
package queries
const USER_CREATE_QUERY string = `
INSERT INTO ordr_user(sub_id, user_name) VALUES ($1, $2);
`
const USER_UPDATE_QUERY string = `
UPDATE ordr_user SET user_name = $1 WHERE sub_id = $2;
`
const USER_SET_IS_ADMIN_QUERY string = `
UPDATE ordr_user SET is_admin = TRUE WHERE id = $1;
`
const USER_REVOKE_ADMIN_QUERY string = `
UPDATE ordr_user SET is_admin = FALSE WHERE id = $1;
`
const USER_SET_INACTIVE_QUERY string = `
UPDATE ordr_user SET active = FALSE WHERE id = $1;
`