1
0
Fork 0
mirror of https://github.com/muerwre/vk-tg-bot.git synced 2025-04-25 15:06:41 +07:00

#4 added typeorm entities for likes and events

This commit is contained in:
Fedor Katurov 2021-05-04 11:45:20 +07:00
parent c0588acd26
commit c5c3c013ba
5 changed files with 69 additions and 9 deletions

View file

@ -0,0 +1,27 @@
import {
Column,
CreateDateColumn,
Entity,
PrimaryGeneratedColumn,
UpdateDateColumn,
} from "typeorm";
import { StoredEvent } from "../../types";
import { VkEvent } from "../../../vk/types";
@Entity()
export class Event implements StoredEvent {
@PrimaryGeneratedColumn()
id: number;
@Column()
type: VkEvent;
@Column()
groupId: number;
@Column()
channel: string;
@Column()
tgMessageId: number;
@CreateDateColumn()
createdAt: Date;
@UpdateDateColumn()
updatedAt: Date;
}