SAFE_HOUSE

Tables (10)

Admins

  • admin_seq — BIGINT — Primary key — NOT NULL
  • user_seq — BIGINT — NOT NULL
  • rating — DECIMAL(2,1)
  • department — VARCHAR(50) — NOT NULL
  • certification_info — VARCHAR(200)

BuildingDefects

  • building_defect_seq — BIGINT — Primary key — NOT NULL
  • building_seq — BIGINT — Foreign key → Buildings.building_seq — NOT NULL
  • defect_seq — BIGINT — Foreign key → Defects.defect_seq — NOT NULL
  • detected_date — DATETIME — NOT NULL
  • status — VARCHAR(20) — NOT NULL

Buildings

  • building_seq — BIGINT — Primary key — NOT NULL
  • address — VARCHAR(200) — NOT NULL
  • construction_year — INT — NOT NULL
  • building_type — VARCHAR(50) — NOT NULL
  • status — VARCHAR(20) — NOT NULL
  • defect_type — VARCHAR(50)

Communities

  • post_seq — BIGINT — Primary key — NOT NULL
  • user_seq — BIGINT — NOT NULL
  • title — VARCHAR(200) — NOT NULL
  • content — TEXT — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME
  • user_seq2 — BIGINT — NOT NULL

Defects

  • defect_seq — BIGINT — Primary key — NOT NULL
  • defect_type — VARCHAR(50) — NOT NULL
  • description — TEXT

Inspections

  • inspection_seq — BIGINT — Primary key — NOT NULL
  • admin_seq — BIGINT — NOT NULL
  • building_seq — BIGINT — NOT NULL
  • inspection_date — DATETIME — NOT NULL
  • status — VARCHAR(20) — NOT NULL
  • checklist_result — TEXT
  • voice_record_url — VARCHAR(255)
  • next_inspection_date — DATETIME
  • admin_seq2 — BIGINT — NOT NULL
  • building_seq2 — BIGINT — NOT NULL

Notices

  • notice_seq — BIGINT — Primary key — NOT NULL
  • admin_seq — BIGINT — NOT NULL
  • title — VARCHAR(200) — NOT NULL
  • content — TEXT — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME
  • admin_seq2 — BIGINT — NOT NULL

Reports

  • report_seq — BIGINT — Primary key — NOT NULL
  • resident_seq — BIGINT — Foreign key → Residents.resident_seq — NOT NULL
  • building_seq — BIGINT — Foreign key → Buildings.building_seq — NOT NULL
  • defect_seq — BIGINT — Foreign key → Defects.defect_seq — NOT NULL
  • report_date — DATETIME — NOT NULL
  • status — VARCHAR(20) — NOT NULL
  • description — TEXT
  • image_url — VARCHAR(255)

Residents

  • resident_seq — BIGINT — Primary key — NOT NULL
  • user_seq — BIGINT — NOT NULL
  • building_seq — BIGINT — NOT NULL
  • phone — VARCHAR(20) — NOT NULL
  • address — VARCHAR(200) — NOT NULL

Users

  • user_seq — BIGINT — Primary key — NOT NULL
  • user_id — VARCHAR(100) — NOT NULL
  • password — VARCHAR(200) — NOT NULL
  • role — VARCHAR(20) — NOT NULL
  • created_at — DATETIME