u
This commit is contained in:
@@ -10,7 +10,7 @@ WITH tree AS (
|
||||
FROM category c
|
||||
INNER JOIN tree t ON c.parent_id = t.id
|
||||
)
|
||||
SELECT id, parent_id, sort
|
||||
SELECT id, parent_id AS parentId, sort
|
||||
FROM tree
|
||||
ORDER BY sort, id
|
||||
`;
|
||||
|
||||
@@ -43,11 +43,11 @@ WHERE id = @id
|
||||
export const LIST = `
|
||||
SELECT
|
||||
id,
|
||||
root_category_id,
|
||||
default_language_id AS language_id,
|
||||
taxrate AS taxrate_id,
|
||||
reducedtaxrate AS reducedtaxrate_id,
|
||||
taxfreerate AS taxfreerate_id
|
||||
root_category_id AS rootCategoryId,
|
||||
default_language_id AS languageId,
|
||||
taxrate AS taxrateId,
|
||||
reducedtaxrate AS reducedtaxrateId,
|
||||
taxfreerate AS taxfreerateId
|
||||
FROM company
|
||||
`;
|
||||
|
||||
|
||||
@@ -4,27 +4,21 @@ OUTPUT INSERTED.id
|
||||
VALUES (@email)
|
||||
`;
|
||||
|
||||
export const GET_BY_ID = `
|
||||
SELECT id, email, created_at, selected_company
|
||||
FROM google_auth
|
||||
WHERE id = @id
|
||||
`;
|
||||
|
||||
export const GET_BY_EMAIL = `
|
||||
SELECT id, email, created_at, selected_company
|
||||
SELECT id, email, created_at AS createdAt, selected_company AS selectedCompanyId
|
||||
FROM google_auth
|
||||
WHERE email = @email
|
||||
`;
|
||||
|
||||
export const LIST = `
|
||||
SELECT id, email, created_at, selected_company
|
||||
export const LIST_ALLOWED_EMAILS = `
|
||||
SELECT id, email, created_at AS createdAt, selected_company AS selectedCompanyId
|
||||
FROM google_auth
|
||||
ORDER BY id
|
||||
ORDER BY email
|
||||
`;
|
||||
|
||||
export const DEL = `
|
||||
export const REMOVE_ALLOWED_EMAIL = `
|
||||
DELETE FROM google_auth
|
||||
WHERE id = @id
|
||||
WHERE email = @email
|
||||
`;
|
||||
|
||||
export const SET_SELECTED_COMPANY = `
|
||||
|
||||
Reference in New Issue
Block a user