47
Tables (10)
code_programming
- id — bigint — Primary key — NOT NULL
- subject_id — int — Foreign key → subject.id
- question — varchar(1000) — NOT NULL
- subjective_answer — varchar(2000) — NOT NULL
- created_at — timestamp
- updated_at — timestamp
money_user_have
- id — bigint — Primary key — NOT NULL
- user_id — bigint — Foreign key → users.id — NOT NULL
- money — bigint
- created_at — timestamp — NOT NULL
- updated_at — timestamp — NOT NULL
problem
- id — bigint — Primary key — NOT NULL
- subject_id — int — Foreign key → subject.id — NOT NULL
- question — varchar(2000) — NOT NULL
- subjective_answer — varchar(2000) — NOT NULL
- option1 — varchar(2000)
- option2 — varchar(2000)
- option3 — varchar(2000)
- option4 — varchar(2000)
- option5 — varchar(2000)
- created_at — timestamp — NOT NULL
- updated_at — timestamp — NOT NULL
study_session
- id — bigint — Primary key — NOT NULL
- user_id — bigint — Foreign key → users.id — NOT NULL
- subject_id — int — Foreign key → subject.id — NOT NULL
- created_at — timestamp — NOT NULL
- updated_at — timestamp — NOT NULL
subject
- id — int — Primary key — NOT NULL
- subject_id — varchar(255) — NOT NULL
- name — varchar(255) — NOT NULL
- description — varchar(1000)
- created_at — timestamp — NOT NULL
- updated_at — timestamp — NOT NULL
subscribe
- id — bigint — Primary key — NOT NULL
- user_id — bigint — Foreign key → users.id — NOT NULL
- trial_started_at — timestamp
- trial_expires_at — timestamp
- subscription_started_at — timestamp
- subscription_expires_at — timestamp
- created_at — timestamp — NOT NULL
- updated_at — timestamp — NOT NULL
user_answer
- id — bigint — Primary key — NOT NULL
- user_id — bigint — NOT NULL
- session_id — bigint — Foreign key → study_session.id — NOT NULL
- item_type — varchar(32) — NOT NULL
- submitted_answer — varchar(4000) — NOT NULL
- is_wrong_answer — bool — NOT NULL
- submitted_at — timestamp — NOT NULL
- created_at — timestamp
- updated_at — timestamp
user_statistics
- id — bigint — Primary key — NOT NULL
- id (id2) — bigint — Foreign key → study_session.id — NOT NULL
- user_id — bigint — NOT NULL
- subject_id — bigint — NOT NULL
- total_attempted — int — NOT NULL
- wrong_count — int — NOT NULL
- correct_count — int — NOT NULL
- created_at — timestamp — NOT NULL
- updated_at — timestamp — NOT NULL
users
- id — bigint — Primary key — NOT NULL
- google_id — varchar(255)
- email — varchar(255) — NOT NULL
- username — varchar(255) — NOT NULL
- nickname — varchar(255)
- role — varchar(32) — NOT NULL
- created_at — timestamp — NOT NULL
- updated_at — timestamp — NOT NULL
wrong_answer_bookmark
- id — bigint — Primary key — NOT NULL
- user_id — bigint — NOT NULL
- item_type — varchar(32) — NOT NULL
- reference_id — bigint — NOT NULL
- bookmarked_at — timestamp — NOT NULL
- review_count — int — NOT NULL
- created_at — timestamp
- updated_at — timestamp
- id (id2) — bigint — Foreign key → study_session.id — NOT NULL