음성 재생과 운영 배포 정리

This commit is contained in:
Yun Chan 2026-06-28 12:18:20 +09:00
parent 8ed185ce6c
commit ac7db95542
1020 changed files with 46863 additions and 2175 deletions

View file

@ -31,10 +31,31 @@ CREATE TABLE IF NOT EXISTS app.app_user (
CHECK (role IN ('learner','instructor','admin')),
cohort TEXT, -- 교수자 담당 코호트 매칭
is_active BOOLEAN NOT NULL DEFAULT TRUE,
account_status TEXT NOT NULL DEFAULT 'approved'
CHECK (account_status IN ('pending','approved','suspended')),
admin_access BOOLEAN NOT NULL DEFAULT FALSE,
affiliation TEXT NOT NULL DEFAULT '',
legal_name TEXT NOT NULL DEFAULT '',
department TEXT NOT NULL DEFAULT '',
grade_level TEXT NOT NULL DEFAULT '',
phone TEXT NOT NULL DEFAULT '',
contact_address TEXT NOT NULL DEFAULT '',
nickname TEXT NOT NULL DEFAULT '',
self_introduction TEXT NOT NULL DEFAULT '',
avatar_url TEXT NOT NULL DEFAULT '',
consent_at TIMESTAMPTZ, -- 사전동의 하드게이트(IRB)
profile_completed_at TIMESTAMPTZ,
terms_agreed_at TIMESTAMPTZ,
privacy_agreed_at TIMESTAMPTZ,
terms_version TEXT NOT NULL DEFAULT '',
privacy_version TEXT NOT NULL DEFAULT '',
last_seen_at TIMESTAMPTZ NOT NULL DEFAULT now(),
updated_at TIMESTAMPTZ NOT NULL DEFAULT now(),
created_at TIMESTAMPTZ NOT NULL DEFAULT now()
);
CREATE INDEX IF NOT EXISTS idx_app_user_cohort ON app.app_user(cohort);
CREATE INDEX IF NOT EXISTS idx_app_user_account_status
ON app.app_user(account_status, last_seen_at DESC);
-- =============================================================================
@ -59,6 +80,7 @@ CREATE TABLE IF NOT EXISTS app.persona_card (
affect_baseline JSONB NOT NULL, -- {...,suicide_ideation_stage} hard상한=3
ccd JSONB NOT NULL, -- Patient-Ψ 8요소 (★직접발화 금지 R4)
dsm5_dimensional JSONB NOT NULL, -- criteria_behavior_matrix (진단명 비노출)
triggers JSONB NOT NULL DEFAULT '{}'::jsonb, -- 역린·상담자 금기·강한 반응 양상
source_provenance TEXT NOT NULL, -- '0615 합성변형'
is_synthetic BOOLEAN NOT NULL DEFAULT TRUE,
created_by UUID REFERENCES app.app_user(user_id),
@ -160,6 +182,19 @@ CREATE TABLE IF NOT EXISTS app.sessions (
CREATE INDEX IF NOT EXISTS idx_sessions_case ON app.sessions(case_id, session_no);
CREATE INDEX IF NOT EXISTS idx_sessions_learner ON app.sessions(learner_id);
-- 교수자 회기 검토 상태. 임상 루브릭/채점과 분리된 회기 단위 작업 상태다.
CREATE TABLE IF NOT EXISTS app.session_review_status (
session_id UUID PRIMARY KEY REFERENCES app.sessions(id) ON DELETE CASCADE,
reviewer_id UUID REFERENCES app.app_user(user_id),
status TEXT NOT NULL DEFAULT 'pending'
CHECK (status IN ('pending','viewed','closed')),
note TEXT NOT NULL DEFAULT '',
reviewed_at TIMESTAMPTZ,
updated_at TIMESTAMPTZ NOT NULL DEFAULT now()
);
CREATE INDEX IF NOT EXISTS idx_session_review_status_status
ON app.session_review_status(status, updated_at DESC);
-- =============================================================================
-- 4. 발화 (MASTERPLAN §3.2 + 설계서 §3.3 연속성 컬럼) — ② EPISODIC 원자단위