SAFE_HOUSE_2
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)
- user_seq — BIGINT — NOT NULL
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
- building_seq — BIGINT — NOT NULL
- defect_seq — BIGINT — 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
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_seq — BIGINT — NOT NULL
- building_seq — 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_seq — 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
- resident_seq — BIGINT — NOT NULL
- building_seq — BIGINT — NOT NULL
- defect_seq — BIGINT — 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
- user_seq — BIGINT — 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