Merge branch 'main' into stats
This commit is contained in:
commit
528a948f20
|
|
@ -91,9 +91,7 @@ VALUES (
|
||||||
TRUE,
|
TRUE,
|
||||||
CURRENT_TIMESTAMP,
|
CURRENT_TIMESTAMP,
|
||||||
CURRENT_TIMESTAMP
|
CURRENT_TIMESTAMP
|
||||||
) ON CONFLICT (user_id, type) DO
|
)
|
||||||
UPDATE
|
|
||||||
SET updated_at = EXCLUDED.updated_at
|
|
||||||
RETURNING id INTO STRICT _company_wallet_id;
|
RETURNING id INTO STRICT _company_wallet_id;
|
||||||
INSERT INTO companies (
|
INSERT INTO companies (
|
||||||
name,
|
name,
|
||||||
|
|
@ -144,9 +142,7 @@ VALUES (
|
||||||
TRUE,
|
TRUE,
|
||||||
CURRENT_TIMESTAMP,
|
CURRENT_TIMESTAMP,
|
||||||
CURRENT_TIMESTAMP
|
CURRENT_TIMESTAMP
|
||||||
) ON CONFLICT (user_id, type) DO
|
)
|
||||||
UPDATE
|
|
||||||
SET updated_at = EXCLUDED.updated_at
|
|
||||||
RETURNING id INTO STRICT _branch_wallet_id;
|
RETURNING id INTO STRICT _branch_wallet_id;
|
||||||
INSERT INTO branches (
|
INSERT INTO branches (
|
||||||
name,
|
name,
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,6 @@ CREATE TABLE IF NOT EXISTS wallets (
|
||||||
is_active BOOLEAN NOT NULL DEFAULT true,
|
is_active BOOLEAN NOT NULL DEFAULT true,
|
||||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||||
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||||
UNIQUE(user_id, type),
|
|
||||||
CONSTRAINT balance_positve CHECK (balance >= 0)
|
CONSTRAINT balance_positve CHECK (balance >= 0)
|
||||||
);
|
);
|
||||||
CREATE TABLE refresh_tokens (
|
CREATE TABLE refresh_tokens (
|
||||||
|
|
|
||||||
|
|
@ -319,7 +319,7 @@ func (a *App) initAppRoutes() {
|
||||||
groupV1.Get("/branchCashier", a.authMiddleware, a.CompanyOnly, h.GetBranchForCashier)
|
groupV1.Get("/branchCashier", a.authMiddleware, a.CompanyOnly, h.GetBranchForCashier)
|
||||||
|
|
||||||
// Branch Operation
|
// Branch Operation
|
||||||
groupV1.Get("/supportedOperation", a.authMiddleware, a.SuperAdminOnly, h.GetAllSupportedOperations)
|
groupV1.Get("/supportedOperation", a.authMiddleware, h.GetAllSupportedOperations)
|
||||||
groupV1.Post("/supportedOperation", a.authMiddleware, a.SuperAdminOnly, h.CreateSupportedOperation)
|
groupV1.Post("/supportedOperation", a.authMiddleware, a.SuperAdminOnly, h.CreateSupportedOperation)
|
||||||
groupV1.Post("/operation", a.authMiddleware, a.CompanyOnly, h.CreateBranchOperation)
|
groupV1.Post("/operation", a.authMiddleware, a.CompanyOnly, h.CreateBranchOperation)
|
||||||
groupV1.Get("/branch/:id/operation", a.authMiddleware, a.CompanyOnly, h.GetBranchOperations)
|
groupV1.Get("/branch/:id/operation", a.authMiddleware, a.CompanyOnly, h.GetBranchOperations)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user