feat: admin hints with auto-expiry shown in album overview

This commit is contained in:
Leon Tonhäuser committed 2026-09-11 17:30:15 +02:00
1 parent 2a5a2f3815
commit abe072b2d1
15 files changed
+2946 -1

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
import { date, pgTable, text, timestamp, uuid } from "drizzle-orm/pg-core";
import { users } from "./auth";
// Time-limited hints for editorial users (e.g. "photographer is away at a
// match today"). Visible from creation until `eventDate` plus the service
// layer's visibility window, so expired hints never need a cleanup job.
export const announcements = pgTable("announcements", {
id: uuid("id").defaultRandom().primaryKey(),
message: text("message").notNull(),
eventDate: date("event_date").notNull(),
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
createdByUserId: uuid("created_by_user_id").references(() => users.id, {
onDelete: "restrict",
}),
});