update get type(s) for pagination and filter

- update TypesEndpoint for all new endpoints
- update application to use properties for sql script
- update types controller
  - update types.http for all types of types calls
  - update test mocking for service
  - update getTypes to use filter, page, and show in TypesController
  - add validation dependency
- update unit test for uuid assertion from test library in
  - remove UUIDAssert.kt
  - update IdentityControllerTest
  - update MappingKtTest
  - update NodeControllerTest
  - update TypeControllerTest
  - update TypesControllerTest
  - add test library dependency
- update getTypes to handle filter limit and offset in TypeService
- update TypeRepository
  - add findAllContaining with filter, limit and offset
  - add findAll with limit and offset
- update type database with specific name key
- split Type and Types
This commit is contained in:
2025-03-05 22:17:07 +01:00
parent 10b95057e5
commit 53db4408e2
21 changed files with 407 additions and 97 deletions

6
sql/002-types.sql Normal file
View File

@@ -0,0 +1,6 @@
-- make name index unique order by name
DROP INDEX IF EXISTS types_name_key;
CREATE UNIQUE INDEX IF NOT EXISTS types_name_key
ON types (name ASC);

View File

@@ -3,15 +3,20 @@
CREATE TABLE IF NOT EXISTS public.types
(
id UUID DEFAULT gen_uuid_v7(),
id UUID DEFAULT gen_uuid_v7(),
timestamp timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP,
name VARCHAR(50) UNIQUE NOT NULL,
name VARCHAR(50) NOT NULL,
CONSTRAINT pk_contact_types PRIMARY KEY (id)
);
ALTER TABLE IF EXISTS public.types
OWNER to role_administrator;
-- Index: types_name_key
-- DROP INDEX IF EXISTS types_name_key;
CREATE UNIQUE INDEX IF NOT EXISTS types_name_key
ON types (name ASC);
-- Revoke all permissions from existing roles
REVOKE ALL ON TABLE public.types FROM role_administrator, role_maintainer, role_support, role_service;