학생 민원/고충 관리 시스템

테이블 (6)

comments

  • id (id2) — BIGINT — 외래 키 → complaints.id
  • author_username (username2) — VARCHAR(50) — 외래 키 → complaints.author_username — NOT NULL
  • email — VARCHAR(100) — 외래 키 → complaints.email
  • id — BIGINT
  • complaint_id — BIGINT — NOT NULL
  • content — TEXT — NOT NULL
  • author_username — VARCHAR(50) — NOT NULL
  • author_name — VARCHAR(100) — NOT NULL
  • parent_id — BIGINT
  • created_at — DATETIME — NOT NULL

complaints

  • id — BIGINT — 기본 키
  • author_username (username2) — VARCHAR(50) — 외래 키 → users.username — NOT NULL
  • email — VARCHAR(100) — 외래 키 → users.email
  • title — VARCHAR(200) — NOT NULL
  • content — TEXT — NOT NULL
  • category — VARCHAR(20) — NOT NULL
  • status — VARCHAR(20) — NOT NULL
  • is_anonymous — TINYINT(1) — NOT NULL
  • image_url — VARCHAR(255)
  • author_username — VARCHAR(50) — NOT NULL
  • created_at — DATETIME — NOT NULL

notifications

  • username (username2) — VARCHAR(50) — 외래 키 → users.username — NOT NULL
  • email — VARCHAR(100) — 외래 키 → users.email
  • id — BIGINT
  • username — VARCHAR(50) — NOT NULL
  • message — VARCHAR(255) — NOT NULL
  • link — VARCHAR(255)
  • is_read — TINYINT(1) — NOT NULL
  • created_at — DATETIME — NOT NULL

otp_codes

  • username — VARCHAR(50) — 외래 키 → users.username — NOT NULL
  • email (email2) — VARCHAR(100) — 외래 키 → users.email
  • id — BIGINT
  • email — VARCHAR(100) — NOT NULL
  • code — VARCHAR(10) — NOT NULL
  • expires_at — DATETIME — NOT NULL
  • used — TINYINT(1) — NOT NULL

users

  • username — VARCHAR(50) — 기본 키 — NOT NULL
  • email — VARCHAR(100) — 기본 키
  • id — BIGINT
  • password — VARCHAR(255) — NOT NULL
  • name — VARCHAR(100) — NOT NULL
  • student_no — VARCHAR(20) — NOT NULL
  • role — VARCHAR(20) — NOT NULL

votes

  • id (id2) — BIGINT — 외래 키 → complaints.id
  • email — VARCHAR(100) — 외래 키 → complaints.email
  • id — BIGINT
  • complaint_id — BIGINT — NOT NULL
  • dev_user — VARCHAR(50) — NOT NULL
  • score — INT — NOT NULL