feat(db): track last push time by device id with numeric timestamps

Assign stable ids to stored tokens, migrate legacy ISO lastNotifiedAt
to epoch ms, replace setLastNotifiedAt with db.update, and persist
lastNotifiedAt only after a successful FCM send. Extend Device with
optional lastNotifiedAt (ms).
This commit is contained in:
Jose Olarte III
2026-05-11 21:23:10 +08:00
parent 096f393df9
commit 86d589d0e8
3 changed files with 59 additions and 15 deletions

View File

@@ -4,4 +4,6 @@ export interface Device {
platform: "ios" | "android" | "web";
createdAt: Date;
updatedAt: Date;
/** Epoch ms; set only after a successful push send. */
lastNotifiedAt?: number;
}