fix(orm): add explicit column types for conversation and order entities
Fixed remaining TypeORM DataTypeNotSupportedError for "Object" type. ## conversation-service/ConversationORM - title: varchar(255) - endedAt: timestamptz ## payment-service/OrderORM - serviceCategory: varchar(100) - currency: varchar(10) - paymentMethod: varchar(50) - paidAt: timestamptz - completedAt: timestamptz Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
eb1cb9c496
commit
7c22c173a5
|
|
@ -28,7 +28,7 @@ export class ConversationORM {
|
|||
@Column({ length: 20, default: 'ACTIVE' })
|
||||
status: ConversationStatusType;
|
||||
|
||||
@Column({ nullable: true })
|
||||
@Column({ type: 'varchar', length: 255, nullable: true })
|
||||
title: string | null;
|
||||
|
||||
@Column({ type: 'text', nullable: true })
|
||||
|
|
@ -111,7 +111,7 @@ export class ConversationORM {
|
|||
@UpdateDateColumn({ name: 'updated_at' })
|
||||
updatedAt: Date;
|
||||
|
||||
@Column({ name: 'ended_at', nullable: true })
|
||||
@Column({ name: 'ended_at', type: 'timestamptz', nullable: true })
|
||||
endedAt: Date | null;
|
||||
|
||||
@OneToMany(() => MessageORM, (message) => message.conversation)
|
||||
|
|
|
|||
|
|
@ -20,28 +20,28 @@ export class OrderORM {
|
|||
@Column({ name: 'service_type', type: 'varchar', length: 50 })
|
||||
serviceType: string;
|
||||
|
||||
@Column({ name: 'service_category', nullable: true })
|
||||
@Column({ name: 'service_category', type: 'varchar', length: 100, nullable: true })
|
||||
serviceCategory: string | null;
|
||||
|
||||
@Column({ type: 'decimal', precision: 10, scale: 2 })
|
||||
amount: number;
|
||||
|
||||
@Column({ default: 'CNY' })
|
||||
@Column({ type: 'varchar', length: 10, default: 'CNY' })
|
||||
currency: string;
|
||||
|
||||
@Column({ type: 'varchar', length: 50, default: 'CREATED' })
|
||||
status: string;
|
||||
|
||||
@Column({ name: 'payment_method', nullable: true })
|
||||
@Column({ name: 'payment_method', type: 'varchar', length: 50, nullable: true })
|
||||
paymentMethod: string | null;
|
||||
|
||||
@Column({ name: 'payment_id', type: 'uuid', nullable: true })
|
||||
paymentId: string | null;
|
||||
|
||||
@Column({ name: 'paid_at', nullable: true })
|
||||
@Column({ name: 'paid_at', type: 'timestamptz', nullable: true })
|
||||
paidAt: Date | null;
|
||||
|
||||
@Column({ name: 'completed_at', nullable: true })
|
||||
@Column({ name: 'completed_at', type: 'timestamptz', nullable: true })
|
||||
completedAt: Date | null;
|
||||
|
||||
@Column({ type: 'jsonb', nullable: true })
|
||||
|
|
|
|||
Loading…
Reference in New Issue