quiz

Tables (3)

Questions

  • id — ObjectId — Primary key — NOT NULL
  • question — string
  • answer — JSON
  • createdAt — Datetime
  • updatedAt — Datetime
  • trueAnswer — string

Results

  • id — ObjectId — Primary key — NOT NULL
  • userId — ObjectId — Foreign key → Users.id — NOT NULL
  • result — number
  • createdAt — Datetime
  • updatedAt — Datetime

Users

  • id — ObjectId — Primary key — NOT NULL
  • role — tinyint
  • fullname — string
  • username — string
  • password — string
  • unit — enum
  • prefix — enum
  • position — string
  • createdAt — Datetime
  • updatedAt — Datetime