feat: Init backend

This commit is contained in:
2025-02-21 08:26:58 +01:00
parent 84e701131f
commit e7557ce2e2
29 changed files with 1802 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
create table application_form
(
created_at timestamp(6) not null,
modified_at timestamp(6) not null,
id uuid not null,
primary key (id)
);
create table form_element_options
(
employee_data_category tinyint not null check (employee_data_category between 0 and 3),
processing_purpose tinyint not null check (processing_purpose between 0 and 3),
form_element_id uuid not null,
label varchar(255) not null,
option_value varchar(255) not null
);
create table form_element
(
type tinyint not null check (type between 0 and 4),
application_form_id uuid not null,
id uuid not null,
primary key (id)
);
alter table if exists form_element_options
add constraint FKnq0lpby5nspv1xi27n9el6us6
foreign key (form_element_id)
references form_element;
alter table if exists form_element
add constraint FKdniyq3l10lncw48tft15js5gb
foreign key (application_form_id)
references application_form;