p-project

Tables (24)

AiInferenceLog

  • id (aiInferenceLog) — Long — Primary key — NOT NULL
  • id (userId) — Long — Foreign key → User.id — NOT NULL
  • 모델 키 (modelKey) — String
  • 모델 버전 (modelVer) — String
  • 입력요약 (inputSnapshot) — String
  • 출력요약 (outputSnapshot) — String
  • 지연시간 (latencyMs) — Int
  • 생성시간 (createdAt) — LocalDateTime
  • 수정시간 (updatedAt) — LocalDateTime
  • 참조의학지식ID (knowledgeReferences) — INT

AuditLog

  • id (auditLogId) — Long — Primary key — NOT NULL
  • id (userId) — Long — Foreign key → User.id — NOT NULL
  • 액션 타입 (action) — String
  • 대상 엔티티 (entity) — String
  • 상세 정보 (details) — String
  • 생성 시간 (createdAt) — LocalDateTime
  • 수정 시간 (updatedAt) — LocalDateTime

DailySummary

  • id (summaryId) — Long — Primary key — NOT NULL
  • id (userId) — Long — Foreign key → User.id — NOT NULL
  • 요약 날짜 (date) — LocalDateTime
  • 운동 완료 유무 (allExerciseCompleted) — Boolean
  • 운동 완료율 (exerciseCompletionRate) — INT
  • 복약 완료 여부 (allMedicationsTaken) — Boolean
  • 복약 완료율 (medicationCompletionRate) — INT
  • 하루 평균 통증 점수 (avgPainScore) — INT
  • 총 운동 시간 (totalDurationSec) — INT
  • 기타 집계 데이터 (dailyMetrics) — String(JSON)
  • 생성 시간 (createdAt) — LocalDateTime
  • 수정시간 (updatedAt) — LocalDateTime

Diet

  • id (dietId) — Long — Primary key — NOT NULL
  • 제목 (title) — String
  • 설명 (description) — String
  • 카테고리 (category) — Enum
  • 영양정보 (nutritionInfo) — String(json)
  • 영양성분 (ingredient) — String(json)
  • instructions — String
  • contradictions — String
  • 근거 레벨 (evidenceLevel) — Enum
  • 생성 시간 (createdAt) — LocalDateTime
  • 수정 시간 (updatedAt) — LocalDateTime

DietImage

  • id (dietImageId) — Long — Primary key — NOT NULL
  • 사진제목 (title) — String
  • 사진링크 (imageUrl) — String
  • 생성 시간 (createdAt) — LocalDateTime
  • 수정 시간 (updatedAt) — LocalDateTime

DietLog

  • id (dietLogId) — Long — Primary key — NOT NULL
  • 로그 시간 (loggedAt) — LocalDateTime
  • 완료 여부 (completed) — Boolean
  • 섭취한 양 (portionConsumed) — INT
  • 메모 (notes) — String
  • 생성 시간 (createdAt) — LocalDateTime
  • 수정 시간 (updatedAt) — LocalDateTime

DietPlanItem

  • id (dietPlanItemId) — Long — Primary key — NOT NULL
  • 식사시간 (mealTime) — Enum
  • portion — String
  • 상태 (status) — Enum
  • orderIndex — INT
  • 추천 이유 (recommendationReason) — String
  • 생성 시간 (createdAt) — LocalDateTime
  • 수정 시간 (updatedAt) — LocalDateTime

Exercise

  • id (exerciseId) — Long — Primary key — NOT NULL
  • 운동이름 (title) — String
  • 운동설명 (description) — String
  • 운동부위 (bodyPart) — String
  • 난이도 (difficulty) — Enum
  • 금기사항 (contraindications) — String
  • 난이도 조정 규칙 (progressionRules) — String
  • 근거 수준 (evidenceLevel) — Enum
  • 생성시간 (createdAt) — LocalDateTime
  • 수정시간 (updatedAt) — LocalDateTime

ExerciseEvidence

  • id (evidenceId) — Long — Primary key — NOT NULL
  • id (exerciseId) — Long — Foreign key → Exercise.id — NOT NULL
  • id (knowledgeId) — Long — Foreign key → MedicalKnowledge.id — NOT NULL
  • 추천 근거 요약 (recommendatinonBasis) — String
  • 임상 가이드라인 참조 상세 (clinicalGuidelines) — String
  • 생성 시간 (createdAt) — LocalDateTime
  • 수정 시간 (updatedAt) — LocalDateTime

ExerciseImage

  • id (exerciseImageId) — Long — Primary key — NOT NULL
  • id (exerciseId) — Long — Foreign key → Exercise.id — NOT NULL
  • 사진제목 (title) — String
  • 사진링크 (imageUrl) — List<String>
  • 생성시간 (createdAt) — LocalDateTime
  • 수정시간 (updatedAt) — LocalDateTime

ExerciseLog

  • id (ExerciseLogId) — Long — Primary key — NOT NULL
  • id (userId) — Long — Foreign key → User.id — NOT NULL
  • id (planItemId) — Long — Foreign key → PlanItem.id — NOT NULL
  • 로그 기록 시간 (loggedAt) — LocalDateTime
  • 운동 전 통증 척도 (painBefore) — INT
  • 운동 후 통증 척도 (painAfter) — INT
  • 사용자 기준 운동 강도 (rpe) — INT
  • 운동 완료율 (completedRate) — INT
  • 운동 소요 시간 (durationSec) — INT
  • 추가 노트 (notes) — String
  • 생성 시간 (createdAt) — LocalDateTime
  • 수정 시간 (updatedAt) — LocalDateTime

ExerciseMidea

  • id (exerciseMediaId) — Long — Primary key — NOT NULL
  • id (exerciseId) — Long — Foreign key → Exercise.id — NOT NULL
  • 링크 (url) — String

MediSchedule

  • id (mediScheduleId) — Long — Primary key — NOT NULL
  • id (medicationId) — Long — Foreign key → Medication.id — NOT NULL
  • 복용시간대 (timeOfDay) — Enum
  • 알림 (notify) — Enum
  • 주기 규칙 (rrule) — String
  • 생성시간 (createdAt) — LocalDateTime
  • 수정시간 (updatedAt) — LocalDateTime

MedicalKnowledge

  • id (knowledgeId) — Long — Primary key — NOT NULL
  • 지식 항목 제목 (title) — String
  • 상세 내용 (content) — String
  • 분류 (category) — Enum
  • 출처 (source) — String(
  • 근거 수준 (evidenceLevel) — Enum
  • 추가 메타데이터 (metadata) — Stinrg(JSON)
  • 생성 시간 (createdAt) — LocalDateTime
  • 수정 시간 (updatedAt) — LocalDateTime

Medication

  • id (medicationId) — Long — Primary key — NOT NULL
  • id (userId) — Long — Foreign key → User.id — NOT NULL
  • 약명 (name) — String
  • 복용용량 (does) — String
  • 투여경로 (route) — String
  • 복용지시 (instructions) — String
  • 추가설명 (description) — String
  • 생성시간 (createdAt) — LocalDateTime
  • 수정시간 (updatedAt) — LocalDateTime

MedicationLog

  • id (medicationLogId) — Long — Primary key — NOT NULL
  • id (userId) — Long — Foreign key → User.id — NOT NULL
  • id (medicationId) — Long — Foreign key → Medication.id — NOT NULL
  • 실제 복용 시간 (takenAt) — LocalDateTime
  • 처방 시간대 (timeOfDay) — Enum
  • 복용 여부 (taken) — Boolean
  • 사용자 메모 (notes) — String
  • 생성 시간 (createdAt) — LocalDateTime
  • 수정 시간 (updatedAt) — LocalDateTime

PlanItem

  • id (planItemId) — Long — Primary key — NOT NULL
  • id (rehabPlanId) — Long — Foreign key → RehabPlan.id — NOT NULL
  • id (exerciseId) — Long — Foreign key → Exercise.id — NOT NULL
  • 재활 단계 (phase) — Enum
  • 운동 용량 (dose) — String(JSON)
  • 상태 (status) — Enum
  • 운동 순서 (orderIndex) — INT
  • 추천이유 (recommendationReason) — String(JSON)
  • 수정시간 (updatedAt) — LocalDateTime
  • 생성시간 (createdAt) — LocalDateTime

RecoveryScore

  • id (recoveryScoreId) — Long — Primary key — NOT NULL
  • id (userId) — Long — Foreign key → User.id — NOT NULL
  • 점수 계산 날짜 (date) — LocalDateTime
  • 해당 날짜의 회복 점수 (dailyScore) — Demical(5,2)
  • 최근 7일 점수 추이 (scoreTrend7d) — String(JSON)
  • 최근 14일 점수 추이 (scoreTrend14d) — String(JSON)
  • 점수 영향 요인 (scoreFactors) — String(JSON)
  • 생성 시간 (createdAt) — LocalDateTime
  • 수정 시간 (updatedAt) — LocalDateTime

RehabPlan

  • id (rehabPlanId) — Long — Primary key — NOT NULL
  • id (userId) — Long — Foreign key → User.id — NOT NULL
  • 제목 (title) — String
  • 시작 기간 (start_date) — datetime
  • 종료 기간 (end_date) — datetime
  • 상태 (status) — enum
  • 생성 주체 (generated_by) — varchar
  • 메타정보 (meta) — String(json)
  • 생성시간 (createdAt) — LocalDateTime
  • 수정시간 (updatedAt) — LocalDateTime

Reminder

  • id (reminderId) — Long — Primary key — NOT NULL
  • id (userId) — Long — Foreign key → User.id — NOT NULL
  • 알림도메인구분 (type) — Enum
  • 전송채널 (channel) — Enum
  • 알람규칙 (rrule) — String(JSON)
  • 알람허용 (enable) — Enum
  • 다음리마인더시간 (nextFIreAt) — LocalDateTime
  • 생성시간 (createdAt) — LocalDateTime
  • 수정시간 (updatedAt) — LocalDateTime

ReportSnapshot

  • id (reportSnapshotId) — Long — Primary key — NOT NULL
  • id (userId) — Long — Foreign key → User.id — NOT NULL
  • 스냅샷 주기 (period) — Enum
  • 스냅샷 커버기간 (coveredRange) — daterange
  • 계산된 지표 묶음 (metrics) — String
  • 스냅샷 생성 시각 (generatedAt) — LocalDateTime
  • 주간 하이라이트 (weeklyHighlight) — String
  • 회복 예측 점수 (recoveryPrediction) — DEMICAL(5,2)
  • 생성시간 (createdAt) — LocalDateTime
  • 수정시간 (updatedAt) — LocalDateTime

SymptomIntake

  • id (intakeId) — Long — Primary key — NOT NULL
  • id (userId) — Long — Foreign key → User.id — NOT NULL
  • 통증 부위 (painArea) — String
  • 통증 수준 (painLevel) — INT
  • 목표 (goal) — String
  • 생성 시간 (createdAt) — LocalDateTime
  • 수정 시간 (updatedAt) — LocalDateTime

User

  • id (userId) — Long — Primary key — NOT NULL
  • id (steakId) — Long — Foreign key → UserStreak.id — NOT NULL
  • 이름 (username) — String
  • 이메일 (email) — String
  • 비밀번호 (password) — String
  • 성별 (gender) — Enum
  • 키 (height) — Float
  • 몸무게 (weight) — Float
  • 나이 (age) — INT
  • fcm 토큰 (fmcToken) — String
  • 프로바이더 (provider) — String
  • 프로바이더ID (providerId) — String
  • 생성시간 (createdAt) — LocalDateTime
  • 수정시간 (updatedAt) — LocalDateTime

UserStreak

  • id (steakId) — Long — Primary key — NOT NULL
  • 현재 연속 달성 일수 (currentStreak) — INT
  • 최고 연속 달성 일수 (maxStreak) — INT
  • 마지막 활성 일자 (lastActiveDate) — LocalDateTime
  • 생성 시간 (createdAt) — LocalDateTime
  • 수정 시간 (updatedAt) — LocalDateTime