fix(conversation): add missing columns to match evolution-service schema

Add columns that evolution-service defines to prevent synchronize:true
from trying to drop them:
- userMessageCount, assistantMessageCount
- totalInputTokens, totalOutputTokens
- rating, feedback, hasConverted

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
hailin 2026-01-24 19:01:16 -08:00
parent ea013b79be
commit a84030be84
1 changed files with 23 additions and 0 deletions

View File

@ -83,6 +83,29 @@ export class ConversationEntity {
@Column({ name: 'message_count', default: 0 })
messageCount: number;
// ========== 统计字段与evolution-service保持一致==========
@Column({ name: 'user_message_count', default: 0 })
userMessageCount: number;
@Column({ name: 'assistant_message_count', default: 0 })
assistantMessageCount: number;
@Column({ name: 'total_input_tokens', default: 0 })
totalInputTokens: number;
@Column({ name: 'total_output_tokens', default: 0 })
totalOutputTokens: number;
@Column({ type: 'smallint', nullable: true })
rating: number;
@Column({ type: 'text', nullable: true })
feedback: string;
@Column({ name: 'has_converted', default: false })
hasConverted: boolean;
// ========== V2新增咨询流程字段 ==========
/**