aboutsummaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorKush Thaker <[email protected]>2024-08-05 21:25:11 +0530
committerKush Thaker <[email protected]>2024-08-05 21:25:11 +0530
commite4fd7f5aacc3c9f7f000e1858248d49aa4d3410e (patch)
tree4f1af30951860629ef376c37bc995a65dda8b813 /packages
parentdb schema in packages (diff)
downloadsupermemory-e4fd7f5aacc3c9f7f000e1858248d49aa4d3410e.tar.xz
supermemory-e4fd7f5aacc3c9f7f000e1858248d49aa4d3410e.zip
move limit to backend and thread service binding
Diffstat (limited to 'packages')
-rw-r--r--packages/db/schema.ts10
-rw-r--r--packages/shared-types/index.ts9
2 files changed, 17 insertions, 2 deletions
diff --git a/packages/db/schema.ts b/packages/db/schema.ts
index 11711997..70860066 100644
--- a/packages/db/schema.ts
+++ b/packages/db/schema.ts
@@ -256,8 +256,14 @@ export const jobs = createTable(
attempts: integer("attempts").notNull().default(0),
lastAttemptAt: integer("lastAttemptAt"),
error: blob("error"),
- createdAt: integer("createdAt").notNull(),
- updatedAt: integer("updatedAt").notNull(),
+ createdAt: int("createdAt", { mode: "timestamp" })
+ .notNull()
+ .notNull()
+ .default(new Date()),
+ updatedAt: int("updatedAt", { mode: "timestamp" })
+ .notNull()
+ .notNull()
+ .default(new Date()),
},
(job) => ({
userIdx: index("jobs_userId_idx").on(job.userId),
diff --git a/packages/shared-types/index.ts b/packages/shared-types/index.ts
index a9933b84..e49cf8e0 100644
--- a/packages/shared-types/index.ts
+++ b/packages/shared-types/index.ts
@@ -1,5 +1,14 @@
import { z } from "zod";
+
+export const LIMITS = {
+ page: 100,
+ tweet: 1000,
+ note: 1000,
+};
+
+
+
export const SourceZod = z.object({
type: z.string(),
source: z.string(),