sfs_prod_erd
Tables (47)
action_attachment
- action_attachment_id — bigint
- created_at — timestamp — NOT NULL
- updated_at — timestamp — NOT NULL
- deleted_at — timestamp
- file_id — bigint
- evaluation_report_item_id — bigint
- created_by — bigint
- updated_by — bigint
- deleted_by — bigint
action_remark_photo
- action_remark_photo_id — bigint
- created_at — timestamp — NOT NULL
- updated_at — timestamp — NOT NULL
- deleted_at — timestamp
- file_id — bigint
- evaluation_report_item_id — bigint
- created_by — bigint
- updated_by — bigint
- deleted_by — bigint
checklist
- checklist_id — bigint
- created_at — timestamp — NOT NULL
- updated_at — timestamp — NOT NULL
- deleted_at — timestamp
- revision_number — bigint
- checklist_metadata_id — bigint
- created_by — bigint
- updated_by — bigint
- deleted_by — bigint
- is_submitted — boolean
- submitted_at — timestamp
- submitted_by — bigint
checklist_category
- checklist_category_id — bigint
- created_at — timestamp — NOT NULL
- updated_at — timestamp — NOT NULL
- deleted_at — timestamp
- type — varchar(255) — NOT NULL
- name — varchar(255) — NOT NULL
- order_number — bigint — NOT NULL
- checklist_id — bigint
- checklist_major_category_id — bigint
- created_by — bigint
- updated_by — bigint
- deleted_by — bigint
- check_list_manual_id_list — jsonb
- checklist_category_manual_list — jsonb
checklist_item
- checklist_item_id — bigint
- created_at — timestamp — NOT NULL
- updated_at — timestamp — NOT NULL
- deleted_at — timestamp
- order_number — bigint — NOT NULL
- question — varchar(255) — NOT NULL
- related_standard — varchar(255)
- checklist_category_id — bigint — NOT NULL
- answer — varchar(255)
- answer_remark — varchar(255)
- created_by — bigint
- updated_by — bigint
- deleted_by — bigint
- checklist_manual_list — jsonb
checklist_manual
- checklist_manual_id — bigint
- created_at — timestamp — NOT NULL
- updated_at — timestamp — NOT NULL
- deleted_at — timestamp
- file_id — bigint
- created_by — bigint
- updated_by — bigint
- deleted_by — bigint
checklist_metadata
- checklist_metadata_id — bigint
- created_at — timestamp — NOT NULL
- updated_at — timestamp — NOT NULL
- deleted_at — timestamp
- title — varchar(255)
- type — varchar(255)
- current_revision_number — bigint
- status — varchar(255)
- created_by — bigint
- updated_by — bigint
- deleted_by — bigint
- na_count — bigint — NOT NULL
- no_count — bigint — NOT NULL
- yes_count — bigint — NOT NULL
checklist_support_file
- checklist_support_file_id — bigint
- created_at — timestamp — NOT NULL
- updated_at — timestamp — NOT NULL
- deleted_at — timestamp
- file_id — bigint
- checklist_item_id — bigint
- created_by — bigint
- updated_by — bigint
- deleted_by — bigint
checklist_template
- checklist_template_id — bigint
- created_at — timestamp — NOT NULL
- updated_at — timestamp — NOT NULL
- deleted_at — timestamp
- title — varchar(255) — NOT NULL
- type — varchar(255) — NOT NULL
- created_by — bigint
- updated_by — bigint
- deleted_by — bigint
checklist_template_access_control
- checklist_template_access_control_id — bigint
- checklist_template_id — bigint — NOT NULL
- user_id — bigint — NOT NULL
- created_at — timestamp — NOT NULL
- created_by — bigint
- updated_at — timestamp — NOT NULL
- updated_by — bigint
- deleted_at — timestamp
- deleted_by — bigint
checklist_template_category
- checklist_template_category_id — bigint
- created_at — timestamp — NOT NULL
- updated_at — timestamp — NOT NULL
- deleted_at — timestamp
- type — varchar(255) — NOT NULL
- name — varchar(255) — NOT NULL
- order_number — bigint — NOT NULL
- checklist_template_id — bigint
- checklist_template_major_category_id — bigint
- created_by — bigint
- updated_by — bigint
- deleted_by — bigint
- checklist_category_manual_list — jsonb
checklist_template_item
- checklist_template_item_id — bigint
- created_at — timestamp — NOT NULL
- updated_at — timestamp — NOT NULL
- deleted_at — timestamp
- order_number — bigint — NOT NULL
- question — varchar(255) — NOT NULL
- related_standard — varchar(255)
- checklist_template_category_id — bigint — NOT NULL
- created_by — bigint
- updated_by — bigint
- deleted_by — bigint
- checklist_manual_list — jsonb
company
- company_id — bigint
- created_at — timestamp — NOT NULL
- updated_at — timestamp — NOT NULL
- deleted_at — timestamp
- company_name — varchar(255)
- company_code — varchar(255)
- created_by — bigint
- updated_by — bigint
- deleted_by — bigint
document_access_control
- document_access_control_id — bigint
- created_at — timestamp — NOT NULL
- created_by — bigint
- updated_at — timestamp — NOT NULL
- updated_by — bigint
- deleted_at — timestamp
- deleted_by — bigint
- document_id — bigint — NOT NULL
- document_type — varchar(255) — NOT NULL
- user_id — bigint — NOT NULL
- permission_level — varchar(255) — NOT NULL
email_verification
- email_verifier_id — bigint
- created_at — timestamp — NOT NULL
- updated_at — timestamp — NOT NULL
- deleted_at — timestamp
- email — varchar(255) — NOT NULL
- code — varchar(255)
- token — varchar(255) — NOT NULL
- purpose — varchar(255)
- created_by — bigint
- updated_by — bigint
- deleted_by — bigint
equipment
- equipment_id — bigint
- created_at — timestamp — NOT NULL
- updated_at — timestamp — NOT NULL
- deleted_at — timestamp
- name — varchar(255)
- manufacturer — varchar(255)
- model_number — varchar(255)
- location — varchar(255)
- description — text
- mechanical_components — text
- electrical_components — text
- pneumatic_hyudraulic_components — text
- other_components — text
- memo — text
- risk_assessment_report_id — bigint — NOT NULL
- created_by — bigint
- updated_by — bigint
- deleted_by — bigint
equipment_layout
- equipment_layout_id — bigint
- created_at — timestamp — NOT NULL
- updated_at — timestamp — NOT NULL
- deleted_at — timestamp
- section_description — text
- equipment_id — bigint — NOT NULL
- created_by — bigint
- updated_by — bigint
- deleted_by — bigint
equipment_layout_photo
- equipment_layout_photo_id — bigint
- created_at — timestamp — NOT NULL
- updated_at — timestamp — NOT NULL
- deleted_at — timestamp
- file_id — bigint
- equipment_layout_id — bigint — NOT NULL
- created_by — bigint
- updated_by — bigint
- deleted_by — bigint
evaluation_report
- evaluation_report_id — bigint
- created_at — timestamp — NOT NULL
- updated_at — timestamp — NOT NULL
- deleted_at — timestamp
- revision_number — bigint
- evaluation_report_metadata_id — bigint
- created_by — bigint
- updated_by — bigint
- deleted_by — bigint
- is_submitted — boolean
- submitted_at — timestamp
- submitted_by — bigint
evaluation_report_item
- evaluation_report_item_id — bigint
- created_at — timestamp — NOT NULL
- updated_at — timestamp — NOT NULL
- deleted_at — timestamp
- order_number — bigint
- finding_location — varchar(255)
- finding_major_category — varchar(255)
- finding_medium_category — varchar(255)
- relation_standard — varchar(255)
- finding_description — varchar(255)
- finding_photo_id — bigint
- action_description — varchar(255)
- action_photo_id — bigint
- action_date — timestamp
- evaluation_report_id — bigint — NOT NULL
- action_status — varchar(255)
- created_by — bigint
- deleted_by — bigint
- updated_by — bigint
evaluation_report_metadata
- evaluation_report_metadata_id — bigint
- created_at — timestamp — NOT NULL
- updated_at — timestamp — NOT NULL
- deleted_at — timestamp
- title — varchar(255)
- current_revision_number — bigint
- status — varchar(255)
- created_by — bigint
- updated_by — bigint
- deleted_by — bigint
- answered_item_count — bigint — NOT NULL
- item_count — bigint — NOT NULL
- need_supplementation_count — bigint — NOT NULL
file
- file_id — bigint
- created_at — timestamp — NOT NULL
- updated_at — timestamp — NOT NULL
- deleted_at — timestamp
- original_file_name — varchar(500) — NOT NULL
- saved_file_name — varchar(500) — NOT NULL
- file_size — bigint — NOT NULL
- content_type — varchar(100) — NOT NULL
- file_url — varchar(1000) — NOT NULL
- user_id — bigint — NOT NULL
- field_choice — varchar(50) — NOT NULL
- created_by — bigint
- updated_by — bigint
- deleted_by — bigint
finding_attachment
- finding_attachment_id — bigint
- created_at — timestamp — NOT NULL
- updated_at — timestamp — NOT NULL
- deleted_at — timestamp
- file_id — bigint
- evaluation_report_item_id — bigint
- created_by — bigint
- updated_by — bigint
- deleted_by — bigint
finding_location
- finding_location_id — bigint
- created_at — timestamp — NOT NULL
- created_by — bigint
- updated_at — timestamp — NOT NULL
- updated_by — bigint
- deleted_at — timestamp
- deleted_by — bigint
- name — varchar(255)
finding_major_category
- finding_major_category_id — bigint
- created_at — timestamp — NOT NULL
- created_by — bigint
- updated_at — timestamp — NOT NULL
- updated_by — bigint
- deleted_at — timestamp
- deleted_by — bigint
- name — varchar(255)
finding_medium_category
- finding_medium_category_id — bigint
- created_at — timestamp — NOT NULL
- created_by — bigint
- updated_at — timestamp — NOT NULL
- updated_by — bigint
- deleted_at — timestamp
- deleted_by — bigint
- name — varchar(255)
- finding_major_category_id — bigint
finding_remark_photo
- finding_remark_photo_id — bigint
- created_at — timestamp — NOT NULL
- updated_at — timestamp — NOT NULL
- deleted_at — timestamp
- file_id — bigint
- evaluation_report_item_id — bigint
- created_by — bigint
- updated_by — bigint
- deleted_by — bigint
flyway_schema_history
- installed_rank — integer — NOT NULL
- version — varchar(50)
- description — varchar(200) — NOT NULL
- type — varchar(20) — NOT NULL
- script — varchar(1000) — NOT NULL
- checksum — integer
- installed_by — varchar(100) — NOT NULL
- installed_on — timestamp — NOT NULL
- execution_time — integer — NOT NULL
- success — boolean — NOT NULL
mitigation_photo
- mitigation_photo_id — bigint
- created_at — timestamp — NOT NULL
- updated_at — timestamp — NOT NULL
- deleted_at — timestamp
- file_id — bigint
- risk_evaluation_id — bigint — NOT NULL
- created_by — bigint
- updated_by — bigint
- deleted_by — bigint
mitigation_type
- mitigation_type_id — bigint
- created_at — timestamp — NOT NULL
- updated_at — timestamp — NOT NULL
- deleted_at — timestamp
- mitigation_type — varchar(255) — NOT NULL
- risk_evaluation_id — bigint — NOT NULL
- created_by — bigint
- updated_by — bigint
- deleted_by — bigint
notification
- notification_id — bigint
- created_at — timestamp — NOT NULL
- created_by — bigint
- updated_at — timestamp — NOT NULL
- updated_by — bigint
- deleted_at — timestamp
- deleted_by — bigint
- notification_type — smallint
- document_type — varchar(255)
- to_user_id — bigint
- content — varchar(255)
- is_read — boolean
- email_variables — json
- metadata_id — bigint
- revision_number — bigint
project
- project_id — bigint
- created_at — timestamp — NOT NULL
- updated_at — timestamp — NOT NULL
- deleted_at — timestamp
- project_name — varchar(255)
- project_number — varchar(255)
- serial_number — varchar(255)
- company_name — varchar(255)
- company_logo_file_id — bigint
- risk_assessment_report_id — bigint — NOT NULL
- created_by — bigint
- updated_by — bigint
- deleted_by — bigint
- memo — varchar(255)
- reviewed_at — timestamp
- reviewed_by — varchar(255)
- written_at — timestamp
- written_by — varchar(255)
register_request
- register_reqeust_id — bigint
- created_at — timestamp — NOT NULL
- updated_at — timestamp — NOT NULL
- deleted_at — timestamp
- email — varchar(255) — NOT NULL
- password — varchar(255) — NOT NULL
- name — varchar(255) — NOT NULL
- phone — varchar(255) — NOT NULL
- company_code — varchar(255) — NOT NULL
- department — varchar(255) — NOT NULL
- position_title — varchar(255) — NOT NULL
- status — varchar(255) — NOT NULL
- company_id — bigint
- created_by — bigint
- updated_by — bigint
- deleted_by — bigint
relation_standard
- relation_standard_id — bigint
- created_at — timestamp — NOT NULL
- created_by — bigint
- updated_at — timestamp — NOT NULL
- updated_by — bigint
- deleted_at — timestamp
- deleted_by — bigint
- name — varchar(255)
- finding_medium_category_id — bigint
report_version
- report_version_id — bigint
- created_at — timestamp — NOT NULL
- updated_at — timestamp — NOT NULL
- deleted_at — timestamp
- version_number — varchar(255) — NOT NULL
- version_description — text
- editor — varchar(255)
- version_date — timestamp
- project_id — bigint — NOT NULL
- created_by — bigint
- updated_by — bigint
- deleted_by — bigint
residual_risk
- residual_risk_id — bigint
- created_at — timestamp — NOT NULL
- updated_at — timestamp — NOT NULL
- deleted_at — timestamp
- inherent_residual_risk — text
- residual_risk — text
- risk_assessment_report_id — bigint — NOT NULL
- created_by — bigint
- updated_by — bigint
- deleted_by — bigint
risk_assessment_report
- risk_assessment_report_id — bigint
- created_at — timestamp — NOT NULL
- updated_at — timestamp — NOT NULL
- deleted_at — timestamp
- revision_number — bigint
- memo — text
- risk_assessment_report_metadata_id — bigint — NOT NULL
- created_by — bigint
- updated_by — bigint
- deleted_by — bigint
- is_submitted — boolean
- submitted_at — timestamp
- submitted_by — bigint
risk_assessment_report_metadata
- risk_assessment_report_metadata_id — bigint
- created_at — timestamp — NOT NULL
- updated_at — timestamp — NOT NULL
- deleted_at — timestamp
- title — varchar(255) — NOT NULL
- type — varchar(255) — NOT NULL
- status — varchar(255) — NOT NULL
- current_revision_number — bigint — NOT NULL
- created_by — bigint
- updated_by — bigint
- deleted_by — bigint
risk_consequence
- risk_consequence_id — bigint
- created_at — timestamp — NOT NULL
- updated_at — timestamp — NOT NULL
- deleted_at — timestamp
- name — varchar(255) — NOT NULL
- risk_source_id — bigint — NOT NULL
- created_by — bigint
- updated_by — bigint
- deleted_by — bigint
risk_evaluation
- risk_evaluation_id — bigint
- created_at — timestamp — NOT NULL
- updated_at — timestamp — NOT NULL
- deleted_at — timestamp
- risk_description — text
- risk_type — varchar(255)
- risk_source — varchar(255)
- risk_consequence — varchar(255)
- mitigation_plan — text — NOT NULL
- mitigation_date — timestamp — NOT NULL
- memo — varchar(255)
- risk_assessment_report_id — bigint — NOT NULL
- created_by — bigint
- updated_by — bigint
- deleted_by — bigint
risk_evaluation_hrn
- risk_evaluation_hrn_id — bigint
- created_at — timestamp — NOT NULL
- updated_at — timestamp — NOT NULL
- deleted_at — timestamp
- init_severity — varchar(255) — NOT NULL
- init_personnel — varchar(255) — NOT NULL
- init_frequency — varchar(255) — NOT NULL
- init_probability — varchar(255) — NOT NULL
- final_severity — varchar(255) — NOT NULL
- final_personnel — varchar(255) — NOT NULL
- final_frequency — varchar(255) — NOT NULL
- final_probability — varchar(255) — NOT NULL
- risk_evaluation_id — bigint — NOT NULL
- created_by — bigint
- updated_by — bigint
- deleted_by — bigint
risk_evaluation_rating_index
- risk_evaluation_rating_index_id — bigint
- created_at — timestamp — NOT NULL
- updated_at — timestamp — NOT NULL
- deleted_at — timestamp
- rating_init_severity — varchar(255)
- rating_init_frequency — varchar(255)
- rating_init_probability — varchar(255)
- rating_init_avoidability — varchar(255)
- rating_final_severity — varchar(255)
- rating_final_frequency — varchar(255)
- rating_final_probability — varchar(255)
- rating_final_avoidability — varchar(255)
- risk_evaluation_id — bigint — NOT NULL
- created_by — bigint
- updated_by — bigint
- deleted_by — bigint
risk_occurrence_timing
- risk_occurrence_timing_id — bigint
- created_at — timestamp — NOT NULL
- updated_at — timestamp — NOT NULL
- deleted_at — timestamp
- risk_occurrence_type — varchar(255)
- risk_evaluation_id — bigint — NOT NULL
- created_by — bigint
- updated_by — bigint
- deleted_by — bigint
risk_source
- risk_source_id — bigint
- created_at — timestamp — NOT NULL
- updated_at — timestamp — NOT NULL
- deleted_at — timestamp
- name — varchar(255) — NOT NULL
- risk_type_id — bigint — NOT NULL
- created_by — bigint
- updated_by — bigint
- deleted_by — bigint
risk_type
- risk_type_id — bigint
- created_at — timestamp — NOT NULL
- updated_at — timestamp — NOT NULL
- deleted_at — timestamp
- name — varchar(255) — NOT NULL
- created_by — bigint
- updated_by — bigint
- deleted_by — bigint
share
- share_id — bigserial
- public_id — uuid — NOT NULL
- content — text — NOT NULL
- document_type — varchar(50) — NOT NULL
- created_at — timestamp — NOT NULL
- created_by — bigint
- updated_at — timestamp — NOT NULL
- updated_by — bigint
- deleted_at — timestamp
- deleted_by — bigint
user
- user_id — bigint
- created_at — timestamp — NOT NULL
- updated_at — timestamp — NOT NULL
- deleted_at — timestamp
- email — varchar(255) — NOT NULL
- password — varchar(255) — NOT NULL
- name — varchar(255) — NOT NULL
- phone — varchar(255) — NOT NULL
- company_code — varchar(255) — NOT NULL
- department — varchar(255) — NOT NULL
- position_title — varchar(255) — NOT NULL
- user_role — varchar(255) — NOT NULL
- public_id — uuid — NOT NULL
- date_joined — timestamp — NOT NULL
- company_id — bigint
- created_by — bigint
- updated_by — bigint
- deleted_by — bigint
- checklist_access_able — boolean — NOT NULL
- evaluation_report_access_able — boolean — NOT NULL
- risk_assessment_report_access_able — boolean — NOT NULL
- email_agreement — boolean