feat (Worker): add a worker to check and adjust the TikTok graph
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
-- AlterTable
|
||||
ALTER TABLE "Snapshot" ADD COLUMN "likes" INTEGER NOT NULL DEFAULT 0,
|
||||
ADD COLUMN "videoCount" INTEGER NOT NULL DEFAULT 0,
|
||||
ALTER COLUMN "views" SET DEFAULT 0;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "User" ADD COLUMN "plan" TEXT NOT NULL DEFAULT 'free';
|
||||
@@ -13,6 +13,7 @@ model User {
|
||||
password String
|
||||
name String?
|
||||
role String @default("member")
|
||||
plan String @default("free")
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
accounts TrackedAccount[]
|
||||
@@ -51,10 +52,12 @@ model TrackedAccount {
|
||||
}
|
||||
|
||||
model Snapshot {
|
||||
id String @id @default(cuid())
|
||||
accountId String
|
||||
account TrackedAccount @relation(fields: [accountId], references: [id], onDelete: Cascade)
|
||||
followers Int
|
||||
views Int
|
||||
createdAt DateTime @default(now())
|
||||
id String @id @default(cuid())
|
||||
accountId String
|
||||
account TrackedAccount @relation(fields: [accountId], references: [id], onDelete: Cascade)
|
||||
followers Int
|
||||
likes Int @default(0)
|
||||
videoCount Int @default(0)
|
||||
views Int @default(0)
|
||||
createdAt DateTime @default(now())
|
||||
}
|
||||
Reference in New Issue
Block a user