fix(conversation): add missing token columns to MessageEntity

Add input_tokens and output_tokens columns that evolution-service
defines to prevent synchronize:true from trying to drop them.

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

View File

@ -54,6 +54,14 @@ export class MessageEntity {
@Column({ type: 'jsonb', nullable: true })
metadata: Record<string, unknown>;
// ========== Token统计字段与evolution-service保持一致==========
@Column({ name: 'input_tokens', default: 0 })
inputTokens: number;
@Column({ name: 'output_tokens', default: 0 })
outputTokens: number;
@CreateDateColumn({ name: 'created_at' })
createdAt: Date;