diff options
| author | Joe Carstairs <me@joeac.net> | 2025-12-18 10:59:15 +0000 |
|---|---|---|
| committer | Joe Carstairs <me@joeac.net> | 2025-12-18 10:59:15 +0000 |
| commit | a85b7b36c6b549642c8cc125a498fa521588bf5e (patch) | |
| tree | 50025d6a098f9c4a0df680c3a12a97f36023631f /website/db/config.ts | |
| parent | 1d83c50e273987b30c790c93f2933cd94a6862f5 (diff) | |
adds SentEmails and SendmailToken tables to DB
Diffstat (limited to 'website/db/config.ts')
| -rw-r--r-- | website/db/config.ts | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/website/db/config.ts b/website/db/config.ts index aa0408c..1ff2450 100644 --- a/website/db/config.ts +++ b/website/db/config.ts @@ -1,5 +1,34 @@ -import { defineDb } from "astro:db"; +import { column, defineDb, defineTable } from "astro:db"; + +const Otp = defineTable({ + columns: { + userId: column.text(), + value: column.text(), + createdAt: column.number(), + validUntil: column.number(), + }, +}); + +const SendmailToken = defineTable({ + columns: { + userId: column.text(), + value: column.text(), + createdAt: column.number(), + validUntil: column.number(), + }, +}); + +const SentEmails = defineTable({ + columns: { + messageId: column.text(), + sentAt: column.number(), + }, +}); export default defineDb({ - tables: {}, + tables: { + Otp, + SendmailToken, + SentEmails, + }, }); |
