연습

테이블 (42)

ai_analysis_log

  • ai_analysis_log_id — BIGINT
  • target_type — VARCHAR(50) — NOT NULL
  • target_id — BIGINT — NOT NULL
  • analysis_type — VARCHAR(50) — NOT NULL
  • analysis_result — JSONB
  • analyzed_at — TIMESTAMP

board_master

  • board_id — BIGINT
  • name — VARCHAR(100) — NOT NULL
  • description — TEXT

building

  • building_id — BIGINT
  • name — VARCHAR(255) — NOT NULL
  • address — TEXT — NOT NULL
  • manager_member_id — BIGINT

chatbot_attachment

  • chatbot_attachment_id — BIGINT
  • chatbot_message_id — BIGINT — NOT NULL
  • file_id — BIGINT — NOT NULL

chatbot_faq

  • faq_id — BIGINT
  • question — TEXT — NOT NULL
  • answer — TEXT — NOT NULL
  • category — VARCHAR(100)

chatbot_feedback

  • feedback_id — BIGINT
  • chatbot_session_id — BIGINT — NOT NULL
  • member_id — BIGINT
  • rating — INT
  • comment — TEXT — EX
  • submitted_at — TIMESTAMP

chatbot_message

  • chatbot_message_id — BIGINT
  • chatbot_session_id — BIGINT — NOT NULL
  • sender_type — VARCHAR(50) — NOT NULL
  • content — TEXT — NOT NULL
  • sent_at — TIMESTAMP

chatbot_session

  • chatbot_session_id — BIGINT
  • member_id — BIGINT
  • started_at — TIMESTAMP

code_master

  • code_id — BIGINT
  • code_group — VARCHAR(50) — NOT NULL
  • code_value — VARCHAR(100) — NOT NULL
  • description — TEXT
  • is_active — BOOLEAN

equipment

  • equipment_id — BIGINT
  • building_id — BIGINT — NOT NULL
  • floor_id — BIGINT — NOT NULL
  • room_area_id — BIGINT
  • equipment_type_id — BIGINT — NOT NULL
  • equipment_model_id — BIGINT — NOT NULL
  • status_code — VARCHAR(50) — NOT NULL
  • serial_number — VARCHAR(100)
  • installation_date — DATE
  • latest_inspection_date — DATE

equipment_location_history

  • location_history_id — BIGINT
  • equipment_id — BIGINT — NOT NULL
  • old_location_info — TEXT
  • new_location_info — TEXT — NOT NULL
  • moved_at — TIMESTAMP

equipment_model

  • equipment_model_id — BIGINT
  • manufacturer — VARCHAR(100)
  • model_name — VARCHAR(100) — NOT NULL
  • specification — TEXT

equipment_qrcode

  • equipment_qrcode_id — BIGINT
  • equipment_id — BIGINT — NOT NULL
  • qrcode_value — VARCHAR(255) — NOT NULL
  • is_active — BOOLEAN
  • issued_at — TIMESTAMP

equipment_status_code

  • equipment_status_code — VARCHAR(50)
  • description — VARCHAR(100) — NOT NULL

equipment_type

  • equipment_type_id — BIGINT
  • name — VARCHAR(100) — NOT NULL

file_storage

  • file_id — BIGINT
  • path — TEXT — NOT NULL
  • original_name — VARCHAR(255) — NOT NULL
  • size — BIGINT
  • mime_type — VARCHAR(50)
  • created_at — TIMESTAMP

floor

  • floor_id — BIGINT
  • building_id — BIGINT — NOT NULL
  • floor_number — VARCHAR(50) — NOT NULL

inspection

  • inspection_id — BIGINT
  • inspection_schedule_id — BIGINT — NOT NULL
  • equipment_id — BIGINT — NOT NULL
  • inspector_member_id — BIGINT — NOT NULL
  • inspection_start_time — TIMESTAMP — NOT NULL
  • inspection_end_time — TIMESTAMP
  • overall_result — VARCHAR(50) — NOT NULL

inspection_photo

  • inspection_photo_id — BIGINT
  • inspection_id — BIGINT — NOT NULL
  • inspection_result_id — BIGINT
  • file_id — BIGINT — NOT NULL
  • caption — TEXT

inspection_result

  • inspection_result_id — BIGINT
  • inspection_id — BIGINT — NOT NULL
  • inspection_rule_item_id — BIGINT — NOT NULL
  • result_value — TEXT
  • is_compliant — BOOLEAN — NOT NULL
  • notes — TEXT

inspection_rule_item

  • inspection_rule_item_id — BIGINT
  • inspection_rule_set_id — BIGINT — NOT NULL
  • risk_factor_code — VARCHAR(50)
  • regulation_item_id — BIGINT
  • item_content — TEXT — NOT NULL
  • check_type — VARCHAR(50) — NOT NULL

inspection_rule_set

  • inspection_rule_set_id — BIGINT
  • equipment_type_id — BIGINT
  • name — VARCHAR(255) — NOT NULL
  • description — TEXT
  • inspection_cycle — VARCHAR(50)

inspection_schedule

  • inspection_schedule_id — BIGINT
  • equipment_id — BIGINT — NOT NULL
  • inspection_rule_set_id — BIGINT — NOT NULL
  • next_inspection_date — DATE — NOT NULL
  • schedule_status — VARCHAR(50)

issue_photo

  • issue_photo_id — BIGINT
  • issue_report_id — BIGINT — NOT NULL
  • file_id — BIGINT — NOT NULL

issue_report

  • issue_report_id — BIGINT
  • building_id — BIGINT
  • floor_id — BIGINT
  • room_area_id — BIGINT
  • equipment_id — BIGINT
  • reporter_member_id — BIGINT
  • status_code — VARCHAR(50) — NOT NULL
  • handler_member_id — BIGINT
  • title — VARCHAR(255) — NOT NULL
  • content — TEXT — NOT NULL
  • reported_at — TIMESTAMP
  • resolved_at — TIMESTAMP

issue_status_code

  • issue_status_code — VARCHAR(50)
  • description — VARCHAR(100) — NOT NULL

map_file

  • map_file_id — BIGINT
  • floor_id — BIGINT — NOT NULL
  • file_id — BIGINT
  • map_type — VARCHAR(50) — NOT NULL
  • uploaded_at — TIMESTAMP

member

  • member_id — BIGINT
  • role_id — BIGINT — NOT NULL
  • name — VARCHAR(100) — NOT NULL
  • address — TEXT
  • email — VARCHAR(255)
  • phone_number — VARCHAR(20)
  • is_active — BOOLEAN
  • joined_at — TIMESTAMP

member_action_log

  • action_log_id — BIGINT
  • member_id — BIGINT
  • action_type — VARCHAR(50) — NOT NULL
  • detail — TEXT
  • logged_at — TIMESTAMP

member_token

  • member_token_id — BIGINT
  • member_id — BIGINT — NOT NULL
  • token — TEXT — NOT NULL
  • token_type — VARCHAR(50) — NOT NULL
  • expires_at — TIMESTAMP

notification_log

  • notification_log_id — BIGINT
  • member_id — BIGINT — NOT NULL
  • notification_template_id — BIGINT
  • content — TEXT — NOT NULL
  • is_read — BOOLEAN
  • sent_at — TIMESTAMP

notification_template

  • notification_template_id — BIGINT
  • template_name — VARCHAR(100) — NOT NULL
  • subject_format — TEXT
  • content_format — TEXT

post

  • post_id — BIGINT
  • board_id — BIGINT — NOT NULL
  • author_member_id — BIGINT — NOT NULL
  • title — VARCHAR(255) — NOT NULL
  • content — TEXT — NOT NULL
  • created_at — TIMESTAMP
  • updated_at — TIMESTAMP

post_attachment

  • post_attachment_id — BIGINT
  • post_id — BIGINT — NOT NULL
  • file_id — BIGINT — NOT NULL

post_comment

  • comment_id — BIGINT
  • post_id — BIGINT — NOT NULL
  • author_member_id — BIGINT — NOT NULL
  • content — TEXT — NOT NULL
  • created_at — TIMESTAMP

post_like

  • post_like_id — BIGINT
  • post_id — BIGINT — NOT NULL
  • member_id — BIGINT — NOT NULL
  • created_at — TIMESTAMP

regulation_item

  • regulation_item_id — BIGINT
  • regulation_law_id — BIGINT — NOT NULL
  • item_number — VARCHAR(50)
  • content — TEXT — NOT NULL

regulation_law

  • regulation_law_id — BIGINT
  • law_name — VARCHAR(255) — NOT NULL

risk_factor_code

  • risk_factor_code — VARCHAR(50)
  • description — VARCHAR(100) — NOT NULL

risk_score

  • risk_score_id — BIGINT
  • target_type — VARCHAR(50) — NOT NULL
  • target_id — BIGINT — NOT NULL
  • score — DECIMAL(5, 2) — NOT NULL
  • calculated_at — TIMESTAMP
  • is_current — BOOLEAN

role

  • role_id — BIGINT
  • name — VARCHAR(50) — NOT NULL

room_area

  • room_area_id — BIGINT
  • building_id — BIGINT — NOT NULL
  • floor_id — BIGINT — NOT NULL
  • name — VARCHAR(255) — NOT NULL