This commit is contained in:
seb
2026-07-31 09:00:14 +02:00
parent 4f98082061
commit 99dd76075e
24 changed files with 1477 additions and 1175 deletions

View File

@@ -8,17 +8,19 @@ WHERE ga.email = @email
export const GET_COMPANY_ACCESS = `
SELECT
c.root_category_id AS rootCategoryId,
c.default_language_id AS languageId,
c.poscustomergroup_id AS posCustomerGroupId,
cu.id AS companyuserId
FROM company c
LEFT JOIN companyuser cu
ON cu.company_id = c.id AND cu.google_auth_id = @authId
ON cu.company_id = c.id AND cu.google_auth_id = @googleAuthId
WHERE c.id = @companyId
`;
export const ADD = `
INSERT INTO companyuser (google_auth_id, company_id)
OUTPUT INSERTED.id
VALUES (@authId, @companyId)
VALUES (@googleAuthId, @companyId)
`;
export const DELETE = `