Spaces:
Sleeping
Sleeping
Download src/modules/message/entities/message.entity.ts from jinksQspider/openWa: direct link, hf CLI and curl.
- Browser
- Download file 1.24 kB
-
https://huggingface.co/spaces/jinksQspider/openWa/resolve/main/src/modules/message/entities/message.entity.ts
- Command line
-
hf download hf://spaces/jinksQspider/openWa/src/modules/message/entities/message.entity.ts
-
curl -L -o message.entity.ts https://huggingface.co/spaces/jinksQspider/openWa/resolve/main/src/modules/message/entities/message.entity.ts
1.24 kB
| import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, Index } from 'typeorm'; | |
| import { jsonColumnType } from '../../../common/utils/column-types'; | |
| export enum MessageDirection { | |
| INCOMING = 'incoming', | |
| OUTGOING = 'outgoing', | |
| } | |
| export enum MessageStatus { | |
| PENDING = 'pending', | |
| SENT = 'sent', | |
| DELIVERED = 'delivered', | |
| READ = 'read', | |
| FAILED = 'failed', | |
| } | |
| ('messages') | |
| (['sessionId', 'createdAt']) | |
| (['chatId']) | |
| export class Message { | |
| ('uuid') | |
| id: string; | |
| () | |
| () | |
| sessionId: string; | |
| ({ nullable: true }) | |
| waMessageId: string; | |
| () | |
| chatId: string; | |
| () | |
| from: string; | |
| () | |
| to: string; | |
| ({ type: 'text', nullable: true }) | |
| body: string; | |
| ({ default: 'text' }) | |
| type: string; | |
| ({ | |
| type: 'varchar', | |
| default: MessageDirection.OUTGOING, | |
| }) | |
| direction: MessageDirection; | |
| ({ type: 'bigint', nullable: true }) | |
| timestamp: number; | |
| ({ type: jsonColumnType(), nullable: true }) | |
| metadata: Record<string, unknown>; | |
| ({ | |
| type: 'varchar', | |
| default: MessageStatus.SENT, | |
| }) | |
| () | |
| status: MessageStatus; | |
| () | |
| createdAt: Date; | |
| } | |