보안뉴스 사이트
테이블 (5)
게시글 (Board)
- id (식별번호) — PK, Not Null, Auto Increment — 기본 키 — NOT NULL
- id (회원 식별번호) — FK, Not Null — 외래 키 → 회원(일반 사용자).id — NOT NULL
- title (글 제목) — Not Null
- content (글 내용) — Not Null
- created_at (작성 일자) — current_timestamp
- updated_at (수정 일자) — current_timestamp
- deleted_at (삭제 일자) — current_timestamp
- declaration (신고 여부) — default : 0
댓글 (Comment)
- id (식별번호) — PK, Not Null, Auto Increment — 기본 키 — NOT NULL
- user_id (회원 식별번호) — FK, Not Null — 외래 키 → 회원(일반 사용자).id — NOT NULL
- board_id (게시글 식별번호) — FK, Not Null — 외래 키 → 게시글.id — NOT NULL
- content (댓글 내용) — Not Null
- created_at (작성 일자) — current_timestamp
- updated_at (수정 일자) — current_timestamp
- deleted_at (삭제 일자) — current_timestamp
- declaration (신고 여부) — default : 0
좋아요 (Like)
- id (식별번호) — PK, Not Null, Auto Increment — 기본 키 — NOT NULL
- user_id (회원 식별번호) — FK, Not Null — 외래 키 → 회원(일반 사용자).id — NOT NULL
- board_id (게시글 식별번호) — FK, Not Null — 외래 키 → 게시글.id — NOT NULL
파일 (File)
- id (식별번호) — PK, Not Null, Auto Increment — 기본 키 — NOT NULL
- board_id (게시글 식별번호) — FK, Not Null — 외래 키 → 게시글.id — NOT NULL
- name (파일 이름) — Unique, Not Null
- created_at (등록일자) — current_timestamp
- deleted_at (삭제일자) — current_timestamp
회원(일반 사용자) (User)
- id (식별번호) — PK, Not Null, Auto Increment — 기본 키 — NOT NULL
- user_id (아이디) — Unique, Not Null
- user_name (닉네임) — Unique, Not Null
- password (비밀번호) — Not Null
- email (이메일) — Unique, Not Null
- phone_number (핸드폰번호(01012345678)) — Unique, Not Null
- birth (생년월일(YYYYMMDD)) — Not Null
- age (연령대) — Unique, Not Null
- declaration (경고) — default : 0
- image (프로필 사진) — ....
- created_at (가입일자) — current_timestamp
- role (권한) — default : user
- keyword (키워드) — .....