survey222

Tables (7)

answer

  • id — int — Primary key — NOT NULL
  • userSurveyId — int — Foreign key → user_survey.surveyId — NOT NULL
  • questionId — int — Foreign key → question.id — NOT NULL
  • created_at — timestamp
  • updated_at — timestamp

answer-option

  • id — int — Primary key — NOT NULL
  • questionOptionId — int — Foreign key → question_option.id — NOT NULL
  • answerId — int — Foreign key → answer.id — NOT NULL
  • answerScore — int
  • created_at — timestamp
  • updated_at — timestamp

question

  • id — int — Primary key — NOT NULL
  • surveyId — int — Foreign key → survey.id — NOT NULL
  • questionNumber — int
  • questionContent — string
  • created_at — timestamp
  • updated_at — timestamp

question_option

  • id — int — Primary key — NOT NULL
  • questionId — int — Foreign key → question.id — NOT NULL
  • optionContent (option_content) — string
  • score — int
  • created_at — timestamp
  • updated_at — timestamp

survey

  • id — int — Primary key — NOT NULL
  • title — string
  • description — string
  • status — string
  • amountQuestion — int
  • created_at — timestamp
  • updated_at — timestamp

user

  • id — int — Primary key — NOT NULL
  • name — varchar(255)
  • gender — string
  • created_at — timestamp
  • updated_at — timestamp

user_survey

  • id — int — Primary key — NOT NULL
  • surveyId — int — Foreign key → survey.id — NOT NULL
  • userId — int — Foreign key → user.id — NOT NULL
  • status — string
  • total_score — int
  • created_at — timestamp
  • updated_at — timestamp