V21 · Collection schema

Collection không chỉ lưu dữ liệu; collection cũng thể hiện ranh giới quyền.

V21 thêm `firestore_schema/` gồm collections, indexes, security rules và seed demo để đội phát triển nối Firestore đúng hướng.

collection

participants/{participantId}

Hồ sơ tối thiểu của người tham gia.

collection

participants/{participantId}/consentRecords/{consentVersion}

Bản ghi đồng thuận theo version, có thể rút.

collection

participants/{participantId}/r4Submissions/{submissionId}

Bài nộp R4 theo phase/version, có trạng thái locked/withdrawn.

collection

participants/{participantId}/reports/{reportId}

Báo cáo riêng tư hoặc bản review có visibility rõ.

collection

auditEvents/{auditId}

Audit append-only cho các hành động dữ liệu quan trọng.

collection

cohorts/{cohortId}/aggregateSnapshots/{snapshotId}

Snapshot tổng hợp đã qua consent gate.