Added Basic Fact of the Day Feature

This commit is contained in:
Ahmad 2025-03-08 00:29:19 -05:00
parent 2139f2efa0
commit 40942e2539
No known key found for this signature in database
GPG key ID: 8FD8A93530D182BF
9 changed files with 544 additions and 27 deletions

View file

@ -61,3 +61,23 @@ export const moderationRelations = relations(moderationTable, ({ one }) => ({
references: [memberTable.discordId],
}),
}));
export type factTableTypes = {
id?: number;
content: string;
source?: string;
addedBy: string;
addedAt?: Date;
approved?: boolean;
usedOn?: Date;
};
export const factTable = pgTable('facts', {
id: integer().primaryKey().generatedAlwaysAsIdentity(),
content: varchar('content').notNull(),
source: varchar('source'),
addedBy: varchar('added_by').notNull(),
addedAt: timestamp('added_at').defaultNow().notNull(),
approved: boolean('approved').default(false).notNull(),
usedOn: timestamp('used_on'),
});