22 lines
475 B
TypeScript
22 lines
475 B
TypeScript
import { Column, Entity, Index, PrimaryGeneratedColumn } from 'typeorm';
|
|
import { Timestamp } from './timestamp';
|
|
|
|
@Entity('notifications')
|
|
@Index(['message', 'raw_data'])
|
|
export class Notification extends Timestamp {
|
|
@PrimaryGeneratedColumn('increment')
|
|
id: number;
|
|
|
|
@Column()
|
|
message: string;
|
|
|
|
@Column({ type: 'varchar' })
|
|
raw_data: string;
|
|
|
|
@Column({ default: null, nullable: true })
|
|
read_at: Date | null;
|
|
|
|
@Column({ type: 'text' })
|
|
send_to: string;
|
|
}
|