2023-11-20 02:14:14 +00:00
|
|
|
import { Static, t } from "elysia";
|
2023-10-23 00:39:01 +00:00
|
|
|
import { db } from "./db.ts";
|
2023-11-20 02:14:14 +00:00
|
|
|
import { Tkv } from "../utils/Tkv.ts";
|
2023-10-23 00:39:01 +00:00
|
|
|
|
2023-11-20 02:14:14 +00:00
|
|
|
export const adminSchema = t.Object({
|
|
|
|
promotedBy: t.Nullable(t.Number()),
|
|
|
|
});
|
2023-10-23 00:39:01 +00:00
|
|
|
|
2023-11-20 02:14:14 +00:00
|
|
|
export type Admin = Static<typeof adminSchema>;
|
2023-10-23 00:39:01 +00:00
|
|
|
|
2023-11-20 02:14:14 +00:00
|
|
|
export const adminStore = new Tkv<["admins", number], Admin>(db);
|