import { Factory } from "fishery"; import { ObjectId } from "mongodb"; import { faker } from "@faker-js/faker"; import type { Street } from "../../../municipal"; export const streetFactory = Factory.define(() => ({ _id: new ObjectId(), createdAt: new Date(), updatedAt: new Date(), id: faker.string.uuid(), name: faker.location.street(), cityName: faker.helpers.arrayElement([ "ashdod", "maltar", "billit", "hashkelon", ]), })); export function createStreet(overrides?: Partial): Street { return streetFactory.build(overrides); }