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:
parent
c0588acd26
commit
c5c3c013ba
5 changed files with 69 additions and 9 deletions
27
src/service/db/postgres/entities/Event.ts
Normal file
27
src/service/db/postgres/entities/Event.ts
Normal 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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue