import { articleFactory } from "../__factories__/article.factory"; import type { Article } from "../entities/models/article"; /** * Realistic blog seed for dev mode + storybook stories. * * Built from `articleFactory` so factory defaults take care of the boring * fields (createdAt, updatedAt, content, authorId) and we only override what * makes the data look like a populated database. * * Lazily produced so importing this module is side-effect-free — the factory's * sequence counter only advances when a binder calls `buildDevArticles()`. */ export function buildDevArticles(): Article[] { return [ articleFactory.build({ id: "welcome", slug: "welcome", title: "Welcome to the blog", status: "published", }), articleFactory.build({ id: "vertical-feature-architecture", slug: "vertical-feature-architecture", title: "Why vertical-feature packages", status: "published", }), articleFactory.build({ id: "wip-post", slug: "work-in-progress", title: "A draft we haven't shipped yet", status: "draft", }), ]; }