sangcom
Tables (11)
board
- id — Primary key — NOT NULL — 게시판 ID
- count — NOT NULL — 각 게시판 게시물 수 게시물의 id + 1
comment
- id — Primary key — NOT NULL — 댓글 ID
- c_user_id — Foreign key → user_role.user_id — NOT NULL — 댓글 작성자 id
- c_role_id — Foreign key → user_role.role_id — NOT NULL — role id (권한 부여) 댓글 작성자 권한
- p_idx — Foreign key → post.idx — NOT NULL — 게시글 순번 (=id)
- id (id2) — Foreign key → post.board_id — NOT NULL — 게시판 ID
- content — NOT NULL
- time — NOT NULL
like
- l_user_id — Foreign key → user_role.user_id — NOT NULL
- l_role_id — Foreign key → user_role.role_id — NOT NULL — role id (권한 부여)
- p_idx — Foreign key → post.idx — NOT NULL — 게시글 순번 (=id)
- id (id2) — Foreign key → post.board_id — NOT NULL — 게시판 ID
- count — NOT NULL
message
- user_id — Foreign key → user_role.user_id — NOT NULL
- role_id — Foreign key → user_role.role_id — NOT NULL — role id (권한 부여)
- receive_id — NOT NULL
- time — NOT NULL
post
- idx — Primary key — NOT NULL — 게시글 순번 (=id)
- user_id — Foreign key → user_role.user_id — NOT NULL
- role_id — Foreign key → user_role.role_id — NOT NULL — role id (권한 부여)
- board_id — Foreign key → board.id — NOT NULL — 게시판 ID
- title — NOT NULL
- content — NOT NULL
- time — NOT NULL
- hide — NOT NULL — 글을 숨길지말지
report
- r_user_id — Foreign key → user_role.user_id — NOT NULL — 신고한 유저 id
- r_role_id — Foreign key → user_role.role_id — NOT NULL — role id (권한 부여) 신고한 유저 권한
- p_idx — Foreign key → post.idx — NOT NULL — 게시글 순번 (=id)
- p_user_id — Foreign key → post.user_id — NOT NULL
- p_role_id — Foreign key → post.role_id — NOT NULL — role id (권한 부여)
- id (id2) — Foreign key → post.board_id — NOT NULL — 게시판 ID
- count — NOT NULL
role
- id — Primary key — NOT NULL — role id (권한 부여)
- name — role name
scrap
- s_user_id — Foreign key → user_role.user_id — NOT NULL
- s_role_id — Foreign key → user_role.role_id — NOT NULL — role id (권한 부여)
- p_idx — Foreign key → post.idx — NOT NULL — 게시글 순번 (=id)
- id (id2) — Foreign key → post.board_id — NOT NULL — 게시판 ID
- count — NOT NULL
todo
- idx — Primary key — NOT NULL — 날짜 별 todo List 순서 (id)
- date — Primary key — NOT NULL
- user_id — Foreign key → user_role.user_id — NOT NULL
user
- id — Primary key — NOT NULL
- pw — NOT NULL
- name — NOT NULL
- age — NOT NULL
- tel
- code — NOT NULL
- birth — NOT NULL
- gender
user_role
- user_id — Foreign key → user.id — NOT NULL
- role_id — Foreign key → role.id — NOT NULL — role id (권한 부여)