Get Account

- add AccountController
- add AccountEntity toAccountResponse in Mapping.kt
- add AccountService
- add AccountRepository
- add AccountEntity
This commit is contained in:
2024-12-29 07:07:44 +01:00
parent 573b4bd6fe
commit 6aee16c4a2
12 changed files with 330 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
-- FUNCTION: public.accounts_audit()
-- DROP FUNCTION IF EXISTS public.accounts_audit();
CREATE OR REPLACE FUNCTION public.accounts_audit()
RETURNS trigger
LANGUAGE 'plpgsql'
COST 100
VOLATILE NOT LEAKPROOF
AS
$BODY$
BEGIN
INSERT INTO accounts_audit (id, timestamp, enabled, username, password, roles)
VALUES (NEW.id, NEW.updated_at, NEW.enabled, NEW.username, NEW.password, NEW.roles);
RETURN NULL; -- result is ignored since this is an AFTER trigger
END;
$BODY$;
ALTER FUNCTION public.accounts_audit()
OWNER TO role_administrator;
-- Trigger: accounts_audit_trigger
-- DROP TRIGGER IF EXISTS accounts_audit_trigger ON public.accounts;
CREATE OR REPLACE TRIGGER accounts_audit_trigger
AFTER INSERT OR UPDATE
ON public.accounts
FOR EACH ROW
EXECUTE FUNCTION public.accounts_audit();