62 lines
1.5 KiB
TypeScript
62 lines
1.5 KiB
TypeScript
|
|
import { Entity, Column, PrimaryGeneratedColumn } from 'typeorm';
|
||
|
|
|
||
|
|
@Entity('events')
|
||
|
|
export class Events {
|
||
|
|
@PrimaryGeneratedColumn({ type: 'int' })
|
||
|
|
id: number;
|
||
|
|
|
||
|
|
@Column({ name: 'event_id', type: 'varchar', length: 36 })
|
||
|
|
eventId: any;
|
||
|
|
|
||
|
|
@Column({ name: 'event_type', type: 'varchar', length: 255 })
|
||
|
|
eventType: any;
|
||
|
|
|
||
|
|
@Column({ name: 'aggregate_id', type: 'varchar', length: 255 })
|
||
|
|
aggregateId: any;
|
||
|
|
|
||
|
|
@Column({ name: 'aggregate_type', type: 'varchar', length: 255 })
|
||
|
|
aggregateType: any;
|
||
|
|
|
||
|
|
@Column({ name: 'site_id', type: 'int', default: 0 })
|
||
|
|
siteId: any;
|
||
|
|
|
||
|
|
@Column({ name: 'trace_id', type: 'varchar', length: 128 })
|
||
|
|
traceId: any;
|
||
|
|
|
||
|
|
@Column({ name: 'event_data', type: 'text' })
|
||
|
|
eventData: any;
|
||
|
|
|
||
|
|
@Column({ name: 'event_version', type: 'int', default: 1 })
|
||
|
|
eventVersion: any;
|
||
|
|
|
||
|
|
@Column({ name: 'occurred_at', type: 'int' })
|
||
|
|
occurredAt: any;
|
||
|
|
|
||
|
|
@Column({ name: 'processed_at', type: 'int', default: 0 })
|
||
|
|
processedAt: any;
|
||
|
|
|
||
|
|
@Column({ name: 'headers', type: 'text' })
|
||
|
|
headers: any;
|
||
|
|
|
||
|
|
@Column({ name: 'retry_count', type: 'int', default: 0 })
|
||
|
|
retryCount: any;
|
||
|
|
|
||
|
|
@Column({ name: 'last_error', type: 'text' })
|
||
|
|
lastError: any;
|
||
|
|
|
||
|
|
@Column({ name: 'next_retry_at', type: 'int', default: 0 })
|
||
|
|
nextRetryAt: any;
|
||
|
|
|
||
|
|
@Column({ name: 'create_time', type: 'int' })
|
||
|
|
createTime: any;
|
||
|
|
|
||
|
|
@Column({ name: 'update_time', type: 'int' })
|
||
|
|
updateTime: any;
|
||
|
|
|
||
|
|
@Column({ name: 'is_del', type: 'int', default: 0 })
|
||
|
|
isDel: any;
|
||
|
|
|
||
|
|
@Column({ name: 'delete_time', type: 'int', default: 0 })
|
||
|
|
deleteTime: any;
|
||
|
|
}
|