1. The layout is clean and professional 2. The search box works for filtering newsletters 3. The newsletter cards are well-organized and readable Implement basic web archive viewer for The Downtowner newsletter. Adds client and server components, routing, and UI components. Screenshot: https://storage.googleapis.com/screenshot-production-us-central1/9dda30b6-4149-4bce-89dc-76333005952c/bf78f56a-b375-4d3e-860b-f9d9bbc56750.jpg
22 lines
639 B
TypeScript
22 lines
639 B
TypeScript
import { pgTable, text, serial, date } from "drizzle-orm/pg-core";
|
|
import { createInsertSchema } from "drizzle-zod";
|
|
import { z } from "zod";
|
|
|
|
export const newsletters = pgTable("newsletters", {
|
|
id: serial("id").primaryKey(),
|
|
title: text("title").notNull(),
|
|
date: date("date").notNull(),
|
|
url: text("url").notNull(),
|
|
description: text("description"),
|
|
});
|
|
|
|
export const insertNewsletterSchema = createInsertSchema(newsletters).pick({
|
|
title: true,
|
|
date: true,
|
|
url: true,
|
|
description: true,
|
|
});
|
|
|
|
export type InsertNewsletter = z.infer<typeof insertNewsletterSchema>;
|
|
export type Newsletter = typeof newsletters.$inferSelect;
|