feat(fullstack): Add application form status, add submissions of forms, update DB schema
This commit is contained in:
@@ -10,18 +10,20 @@ create table application_form
|
||||
last_modified_by_name varchar(255) not null,
|
||||
name varchar(255) not null,
|
||||
organization_id varchar(255),
|
||||
status enum ('APPROVED','DRAFT','REJECTED','SIGNED','SUBMITTED') not null,
|
||||
primary key (id)
|
||||
);
|
||||
|
||||
create table comment
|
||||
(
|
||||
created_at timestamp(6) not null,
|
||||
modified_at timestamp(6) not null,
|
||||
form_element_id uuid not null,
|
||||
id uuid not null,
|
||||
created_by_id varchar(255) not null,
|
||||
created_by_name varchar(255) not null,
|
||||
message varchar(255) not null,
|
||||
created_at timestamp(6) not null,
|
||||
modified_at timestamp(6) not null,
|
||||
application_form_id uuid not null,
|
||||
form_element_id uuid not null,
|
||||
id uuid not null,
|
||||
created_by_id varchar(255) not null,
|
||||
created_by_name varchar(255) not null,
|
||||
message varchar(255) not null,
|
||||
primary key (id)
|
||||
);
|
||||
|
||||
@@ -36,12 +38,29 @@ create table form_element_options
|
||||
|
||||
create table form_element
|
||||
(
|
||||
type tinyint not null check (type between 0 and 4),
|
||||
application_form_id uuid not null,
|
||||
id uuid not null,
|
||||
type tinyint not null check (type between 0 and 4),
|
||||
form_element_section_id uuid not null,
|
||||
id uuid not null,
|
||||
description varchar(255),
|
||||
title varchar(255),
|
||||
primary key (id)
|
||||
);
|
||||
|
||||
create table form_element_section
|
||||
(
|
||||
application_form_id uuid not null,
|
||||
id uuid not null,
|
||||
description varchar(255),
|
||||
short_title varchar(255),
|
||||
title varchar(255) not null,
|
||||
primary key (id)
|
||||
);
|
||||
|
||||
alter table if exists comment
|
||||
add constraint FKlavy9axrt26sepreg5lqtuoap
|
||||
foreign key (application_form_id)
|
||||
references application_form;
|
||||
|
||||
alter table if exists comment
|
||||
add constraint FKfg84w0i76tw9os13950272c6f
|
||||
foreign key (form_element_id)
|
||||
@@ -53,6 +72,11 @@ alter table if exists form_element_options
|
||||
references form_element;
|
||||
|
||||
alter table if exists form_element
|
||||
add constraint FKdniyq3l10lncw48tft15js5gb
|
||||
add constraint FKdpr6k93m4hqllqjsvoa4or6mp
|
||||
foreign key (form_element_section_id)
|
||||
references form_element_section;
|
||||
|
||||
alter table if exists form_element_section
|
||||
add constraint FKtn0lreovauwf2v29doo70o3qs
|
||||
foreign key (application_form_id)
|
||||
references application_form;
|
||||
|
||||
Reference in New Issue
Block a user