blockchain

Tables (6)

Category (투표분류)

  • id (int) — 투표분류id — Primary key — NOT NULL
  • name (string) — 이름

Comment (댓글)

  • id (int) — 댓글id — Primary key — NOT NULL
  • content (textfield) — 내용
  • like (int1) — 좋아요
  • dislike (int2) — 싫어요
  • createdAt (date) — 생성날짜
  • id (int3) — 학생id — Foreign key → Student.id — NOT NULL
  • department (int(1)) — 단과대id — Foreign key → Student.department — NOT NULL

Department (단과대)

  • id (int) — 단과대id — Primary key — NOT NULL
  • name (string(20)) — 이름

Poll (투표안건)

  • id (int) — 투표안건Id — Primary key — NOT NULL
  • name (string) — 이름
  • content (textfield) — 내용
  • createdAt (date) — 생성날짜
  • validUntil (Field) — 유효날짜
  • pros (Field2) — 찬성수
  • cons (Field3) — 반대수
  • candidate (list) — 투표자

Student (학생)

  • id (int) — 학생id — Primary key — NOT NULL
  • department (int(1)) — 단과대id — Foreign key → Department.id — NOT NULL
  • name (string(20)) — 이름
  • password (hash) — 비밀번호
  • gender (string(6)) — 성별
  • email (string(50)) — 이메일
  • phone (string(11)) — 핸드폰

Vote (투표)

  • id (int) — 투표id — Primary key — NOT NULL
  • pollId (int2) — 투표안건id — Foreign key → Poll.id — NOT NULL
  • createdAt (date) — 생성날짜
  • id (int3) — 학생id — Foreign key → Student.id — NOT NULL
  • department (int(1)) — 단과대id — Foreign key → Student.department — NOT NULL
  • id (int4) — 투표분류id — Foreign key → Category.id — NOT NULL