LUCY M DB Modeling

Tables (19)

Activities (activities)

  • User ID (userId) — text — Primary key — NOT NULL
  • Active Minutes (activeMinutes) — int
  • Calories (calories) — int
  • Distance (distance) — float
  • Steps (steps) — int
  • Last Sync Time (lastSyncAt) — datetime

Consulting Notes (consulting notes)

  • Consulting ID (consultingId) — int — Primary key — NOT NULL
  • Data Review Note (dataReviewNote) — text
  • Consulting Note (consultingNote) — text
  • Created (createdAt) — datetime
  • Updated (updatedAt) — datetime

Consulting Stages (consulting stages)

  • Stage ID (id) — enum — Primary key — NOT NULL

Consulting Status (consulting status)

  • Consulting ID (consultingId) — int — Primary key — NOT NULL
  • User ID (userId) — text
  • Consulting Type (consultingType) — enum
  • Current Stage (currentStage) — enum
  • Consulting Date (consultingDate) — datetime
  • Navigator ID (navigatorId) — int

Consulting Types (consulting types)

  • Type ID (id) — enum — Primary key — NOT NULL

Devices (devices)

  • Device ID (deviceId) — text — Primary key — NOT NULL
  • User ID (userId) — text
  • Return Status (returnStatus) — bool
  • Register Date (registeredAt) — datetime
  • Activation Status (activationStatus) — datetime
  • Device Model (deviceModel) — text
  • Last Sync Time (lastSyncAt) — datetime
  • Update Date (updatedAt) — datetime
  • Access Token (accessToken) — text
  • Refresh Token (refreshToken) — text
  • Serial Number (serialNumber) — text

NavigatorRequests (navigator_requests)

  • ID (id) — text — Primary key — NOT NULL
  • Navigator ID (navigatorId) — int
  • Created (createdAt) — datetime
  • Updated (updatedAt) — text
  • Request Status (requestStatus) — text

Navigators (navigators)

  • Navigator ID (navigatorId) — int — Primary key — NOT NULL
  • Organization Name (organizationName) — text
  • Created (createdAt) — datetime
  • Updated (updatedAt) — datetime
  • Activation Status (activationStatus) — bool
  • Name (name) — text
  • Gender (gender) — text
  • Email (email) — text
  • Mobile (mobile) — int

Notifications (notifications)

    Organizations (organizations)

    • Organization ID (id) — int — Primary key — NOT NULL
    • Name (name) — text
    • Created (createdAt) — datetime
    • Updated (updatedAt) — datetime
    • Activation Status (activationStatus) — bool
    • Mobile (mobile) — int
    • Website (website) — text
    • Description (description) — text

    Questionnaire Contents (questionnaire_contents)

    • ID (id) — int — Primary key — NOT NULL
    • Type ID (typeId) — int
    • Question (question) — text
    • Answers (answers) — Arr[int]
    • Multiple Answer (isMultipleAnswers) — bool
    • Description (description) — text
    • View Type (viewType) — text

    Questionnaire Types (questionnaire_types)

    • ID (id) — int — Primary key — NOT NULL
    • Name (name) — text
    • Created Date (createdAt) — datetime
    • Updated Date (updatedAt) — datetime
    • Activation Status (activation_status) — bool

    Questionnaires (questionnaires)

    • ID (id) — int — Primary key — NOT NULL
    • Name (name) — text
    • Type (type) — int
    • Contents ID (contentsId) — int
    • Description (description) — text
    • Modifier (adminId) — int
    • Created Date (createdAt) — datetime
    • Updated Date (updatedAt) — datetime

    Questionnaires Responses (questionnaire_responses)

    • ID (id) — int — Primary key — NOT NULL
    • User ID (userId) — text
    • Questionnaire ID (questionnaireId) — int
    • Responses (responses) — Arr[int]
    • Created Date (createdAt) — datetime
    • Updated Date (updatedAt) — datetime

    Sleeps (sleeps)

    • User ID (userId) — text — Primary key — NOT NULL
    • Last Sync Time (lastSyncAt) — datetime
    • Minutes Asleep (minsAsleep) — int
    • Minutes Awake (minsAwake) — int
    • Minutes REM (minsRem) — int
    • Minutes Deep (minsDeep) — int
    • Time Bed (timeBed) — datetime
    • Time Wakeup (timeWakeup) — datetime
    • SpO2 (spo2) — float
    • Breathing Rate (breathingRate) — float

    Stresses (stresses)

    • User ID (userId) — text — Primary key — NOT NULL
    • HRV (hrv) — float
    • RHR (rhr) — int
    • LF (lf) — float
    • HF (hf) — float
    • Last Sync Time (lastSyncAt) — datetime

    User Configurations (user_configurations)

    • ID (id) — text — Primary key — NOT NULL
    • User ID (userId) — text
    • Notification Enabled (isNotificationEnabled) — bool
    • Created (createdAt) — datetime
    • Updated (updatedAt) — datetime
    • Push Token (pushToken) — text

    User Types (user_types)

    • User Type (userType) — enum — Primary key — NOT NULL

    Users (users)

    • User ID (id) — int — Primary key — NOT NULL
    • User Type (userType) — enum
    • Activation Status (activation) — bool
    • providerId — text
    • Created (createdAt) — datetime
    • Updated (updatedAt) — datetime
    • Mobile (mobile) — int
    • Gender (gender) — text
    • Organization Name (organizationName) — text
    • Name (name) — text
    • Email (email) — text
    • Birthday (birthDay) — date
    • AssignedNavigator (navigatorId) — int