feat(rvw): deliver tenant portal v4 flow and config foundation

Implement RVW V4.0 tenant-aware backend/frontend flow with tenant routing, config APIs, and full portal UX updates. Sync system/RVW/deployment docs to capture verified upload-review-report workflow and next-step admin configuration work.

Made-with: Cursor
This commit is contained in:
2026-03-14 22:29:40 +08:00
parent ba464082cb
commit 16179e16ca
45 changed files with 4753 additions and 93 deletions

View File

@@ -325,10 +325,14 @@ model ReviewTask {
// 注意userId 暂不添加外键约束,因为用户来自不同 schema (platform_schema.users)
// 跨 schema 外键在 PostgreSQL 中需要特殊处理
/// RVW V4.0 多租户:期刊租户 IDnullable历史数据通过迁移补填
tenantId String? @map("tenant_id")
@@index([userId])
@@index([status])
@@index([createdAt])
@@index([isArchived])
@@index([tenantId], map: "idx_review_tasks_tenant_id")
@@map("review_tasks")
@@schema("rvw_schema")
}
@@ -1929,6 +1933,7 @@ model tenants {
users User[]
user_modules user_modules[]
iitProjects IitProject[]
tenantRvwConfig TenantRvwConfig?
@@index([code], map: "idx_tenants_code")
@@index([status], map: "idx_tenants_status")
@@ -1951,6 +1956,39 @@ model verification_codes {
@@schema("platform_schema")
}
/// RVW V4.0 智能审稿 SaaS — 租户级审稿配置
/// 每个期刊租户独立一份控制4个审查维度的评估标准与展示模板
/// 关联 platform_schema.tenants
model TenantRvwConfig {
id String @id @default(uuid())
tenantId String @unique @map("tenant_id")
tenant tenants @relation(fields: [tenantId], references: [id], onDelete: Cascade)
/// 稿约规范评估:规则数组,每条规则含 code/description/fatal
editorialRules Json? @map("editorial_rules")
/// 方法学评估专家业务评判标准纯文本可自由编辑不需懂JSON
methodologyExpertPrompt String? @map("methodology_expert_prompt") @db.Text
/// 方法学评估Handlebars 报告展示模板(可覆盖系统默认模板)
methodologyHandlebarsTemplate String? @map("methodology_handlebars_template") @db.Text
/// 数据验证:验证深度 L1/L2/L3
dataForensicsLevel String @default("L2") @map("data_forensics_level")
/// 临床评估FINER 五维权重 {feasibility, innovation, ethics, relevance, novelty}
finerWeights Json? @map("finer_weights")
/// 临床评估:专科特色补充要求(纯文本)
clinicalExpertPrompt String? @map("clinical_expert_prompt") @db.Text
createdAt DateTime @default(now()) @map("created_at")
updatedAt DateTime @updatedAt @map("updated_at")
@@map("tenant_rvw_configs")
@@schema("platform_schema")
}
enum job_state {
created
retry