posted at for sorting

This commit is contained in:
ntr committed 2024-04-14 13:35:25 +10:00
1 parent 544b7085ed
commit d3cc44a959
4 files changed
+49 -3

No files matched your search

+7
View File
@@ -27,6 +27,7 @@ model Attachment {
createdAt DateTime @default(now())
updatedAt DateTime @default(now())
postedAt DateTime
@@index([channelId])
@@map("attachments")
@@ -38,6 +39,12 @@ model Meme {
text String
tags Json
// need an timestamp for giving to meili to sort by
// i think a usize would actually work but can't
// convince the meili-js lib to serialize it properly to json
// this one actually has to be .valueOf()'d before we send it
// cause js numbers are bigger than postgres int4
postedAt DateTime
createdAt DateTime @default(now())
updatedAt DateTime @default(now())