feat: KnowledgeBase 支持封面图 coverKey 字段
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 40s

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
wangdl 2026-05-28 10:42:58 +08:00
parent c331d08644
commit 28caf1297f

View File

@ -5,12 +5,13 @@ import { PrismaService } from '../../infrastructure/database/prisma.service';
export class KnowledgeBaseRepository {
constructor(private readonly prisma: PrismaService) {}
async create(userId: string, dto: { title: string; description?: string }) {
async create(userId: string, dto: { title: string; description?: string; coverKey?: string }) {
return this.prisma.knowledgeBase.create({
data: {
userId,
title: dto.title,
description: dto.description ?? '',
coverKey: dto.coverKey ?? null,
status: 'active',
itemCount: 0,
},