ex
Tables (11)
complaint_images
- image_id — INT — Primary key — NOT NULL
- complaint_id — INT — Foreign key → complaints.complaint_id — NOT NULL
- user_id — INT — Foreign key → complaints.user_id — NOT NULL
- file_url — VARCHAR(500) — NOT NULL
- original_name — VARCHAR(255)
- image_type — VARCHAR(100) — NOT NULL
- size_bytes — BIGINT
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
complaint_responses
- response_id — INT — Primary key — NOT NULL
- user_id — INT — Foreign key → users.user_id — NOT NULL
- complaint_id — INT — Foreign key → complaints.complaint_id — NOT NULL
- admin_id — INT — NOT NULL
- response_content — TEXT — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
complaints
- complaint_id — INT — Primary key — NOT NULL
- user_id — INT — Foreign key → users.user_id — NOT NULL
- title — VARCHAR(200) — NOT NULL
- content — TEXT — NOT NULL
- status — ENUM('PENDING','IN_PROGRESS','COMPLETED') — NOT NULL
- assigned_admin_id — INT — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
notices
- notice_id — INT — Primary key — NOT NULL
- user_id — INT — Foreign key → users.user_id
- admin_id — INT — NOT NULL
- title — VARCHAR(200) — NOT NULL
- content — TEXT — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
popup_management
- popup_id — INT — Primary key — NOT NULL
- user_id — INT — Foreign key → users.user_id — NOT NULL
- title — VARCHAR(200) — NOT NULL
- content — TEXT
- is_active — BOOLEAN — NOT NULL
- start_datetime — DATETIME — NOT NULL
- end_datetime — DATETIME — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
satisfaction_surveys
- survey_id — INT — Primary key — NOT NULL
- user_id — INT — Foreign key → users.user_id — NOT NULL
- title — VARCHAR(200) — NOT NULL
- description — TEXT
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
stats_events
- event_id — BIGINT — Primary key — NOT NULL
- user_id — INT — Foreign key → users.user_id — NOT NULL
- event_name — VARCHAR(100) — NOT NULL
- value_num — DOUBLE — NOT NULL
- value_text — VARCHAR(255)
- ref_table — VARCHAR(100) — NOT NULL
- ref_pk_text — VARCHAR(255) — NOT NULL
- occurred_at — DATETIME — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
survey_complaints
- complaint_id — VARCHAR(20) — Primary key — NOT NULL
- survey_id — INT — Foreign key → satisfaction_surveys.survey_id — NOT NULL
- user_id — INT — Foreign key → satisfaction_surveys.user_id — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
- additional_request — VARCHAR(100)
- dissatisfaction_item — VARCHAR(100) — NOT NULL
- image_id — INT — NOT NULL
- file_url — VARCHAR(500) — NOT NULL
- original_name — VARCHAR(255)
- image_type — VARCHAR(100) — NOT NULL
- size_bytes — BIGINT
survey_responses
- response_id — INT — Primary key — NOT NULL
- user_id — INT — Foreign key → users.user_id — NOT NULL
- survey_id — INT — Foreign key → satisfaction_surveys.survey_id — NOT NULL
- rating — INT — NOT NULL
- comment — TEXT
- submitted_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
user_activity_logs
- log_id — BIGINT — Primary key — NOT NULL
- user_id — INT — Foreign key → users.user_id — NOT NULL
- reason — VARCHAR(255)
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
- action — VARCHAR(100) — NOT NULL
users
- user_id — INT — Primary key — NOT NULL
- username — VARCHAR(50) — NOT NULL
- email — VARCHAR(100) — NOT NULL
- password_hash — VARCHAR(255) — NOT NULL
- name — VARCHAR(100) — NOT NULL
- user_type — ENUM('USER','ADMIN') — NOT NULL
- is_active — BOOLEAN — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
- address — VARCHAR(100) — NOT NULL
- lock_time — INT — NOT NULL