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

#4 added entities and synchronization to project

This commit is contained in:
Fedor Katurov 2021-05-04 12:12:31 +07:00
parent c5c3c013ba
commit 50db549cbe
5 changed files with 33 additions and 4 deletions

View file

@ -1,5 +1,6 @@
import { VkEvent } from "../vk/types";
import { StoredEvent, StoredLike } from "./types";
import { Like } from "./postgres/entities/Like";
export interface Storage {
getEvent(
@ -9,7 +10,9 @@ export interface Storage {
channel: string
): Promise<StoredEvent>;
createEvent(event: StoredEvent): Promise<StoredEvent>;
createEvent(event: Partial<StoredEvent>): Promise<StoredEvent>;
createOrUpdateLike(like: Partial<StoredLike>): Promise<Like>;
getLikesFor(channel: string, messageId: number): Promise<StoredLike[]>;