Files
AIclinicalresearch/backend/create_mock_user_platform.sql
HaHafeng 4088275290 fix(pkb): fix create KB and upload issues - remove simulated upload, fix department mapping, add upload modal
Fixed issues:
- Remove simulateUpload function from DashboardPage Step 3
- Map department to description field when creating KB
- Add upload modal in WorkspacePage knowledge assets tab
- Fix DocumentUpload import path (../../stores to ../stores)

Known issue: Dify API validation error during document upload (file uploaded but DB record failed, needs investigation)

Testing: KB creation works, upload dialog opens correctly
2026-01-13 13:17:20 +08:00

55 lines
825 B
SQL

-- 在 platform_schema.users 中创建 mock 用户
-- 用于 PKB 等模块的测试
-- 首先需要一个默认租户
INSERT INTO platform_schema.tenants (id, code, name, type, status, created_at, updated_at)
VALUES (
'tenant-mock-001',
'mock-tenant',
'测试租户',
'INTERNAL',
'ACTIVE',
NOW(),
NOW()
)
ON CONFLICT (id) DO NOTHING;
-- 创建 mock 用户
INSERT INTO platform_schema.users (
id,
phone,
email,
password,
is_default_password,
name,
role,
status,
tenant_id,
kb_quota,
kb_used,
is_trial,
created_at,
updated_at
)
VALUES (
'user-mock-001',
'13800000000',
'mock@test.com',
'$2b$10$mockhashedpassword123456789',
true,
'测试用户',
'USER',
'active',
'tenant-mock-001',
3,
0,
false,
NOW(),
NOW()
)
ON CONFLICT (id) DO NOTHING;