nextime

Tables (7)

missions

  • id — CHAR(36) — Primary key — NOT NULL
  • name — VARCHAR(150) — NOT NULL
  • description — TEXT — NOT NULL
  • estimated_seconds — INT
  • completion_criteria — TEXT
  • is_active — BOOLEAN — NOT NULL

next_time_records

  • id — CHAR(36) — Primary key — NOT NULL
  • user_id — CHAR(36) — Foreign key → users.id — NOT NULL
  • context_id — CHAR(36) — Foreign key → smoking_contexts.id — NOT NULL
  • mission_id — CHAR(36) — Foreign key → missions.id — NOT NULL
  • started_at — DATETIME — NOT NULL
  • craving_before — SMALLINT — NOT NULL
  • craving_after — SMALLINT
  • result — VARCHAR(20)
  • delayed_seconds — INT
  • completed_at — DATETIME
  • created_at — DATETIME — NOT NULL

smoking_contexts

  • id — CHAR(36) — Primary key — NOT NULL
  • name — VARCHAR(100) — NOT NULL
  • description — TEXT
  • is_active — BOOLEAN — NOT NULL

user_mission_preferences

  • user_id — CHAR(36) — Foreign key → users.id — NOT NULL
  • mission_id — CHAR(36) — Foreign key → missions.id — NOT NULL
  • preference_type — VARCHAR(20) — NOT NULL

user_profiles

  • user_id — CHAR(36) — Foreign key → users.id — NOT NULL
  • average_cigarettes_per_day — SMALLINT — NOT NULL
  • quit_reason — TEXT — NOT NULL
  • future_self — TEXT — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL

user_smoking_contexts

  • user_id — CHAR(36) — Foreign key → users.id — NOT NULL
  • context_id — CHAR(36) — Foreign key → smoking_contexts.id — NOT NULL

users

  • id — CHAR(36) — Primary key — NOT NULL
  • cognito_sub — VARCHAR(255) — NOT NULL
  • email — VARCHAR(320) — NOT NULL
  • onboarding_completed — BOOLEAN — NOT NULL
  • created_at — DATETIME — NOT NULL