From 45e8cd398bfe53d4cc25bcc6fe03f6825c83eafb Mon Sep 17 00:00:00 2001 From: quantum-grit Date: Sun, 29 Oct 2023 21:30:05 +0200 Subject: [PATCH] let db create the donationWish primary id --- db/seed/donationWish/factory.ts | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/db/seed/donationWish/factory.ts b/db/seed/donationWish/factory.ts index 588095a47..50a92cc86 100644 --- a/db/seed/donationWish/factory.ts +++ b/db/seed/donationWish/factory.ts @@ -1,14 +1,14 @@ import { Factory } from 'fishery' import { faker } from '@faker-js/faker' +import { Prisma } from '@prisma/client' -import { DonationWish } from '.prisma/client' - -export const donationWishFactory = Factory.define(({ associations }) => ({ - id: faker.datatype.uuid(), - message: faker.lorem.paragraph(), - campaignId: associations.campaignId || faker.datatype.uuid(), - personId: associations.personId || null, - donationId: associations.donationId || null, - createdAt: faker.date.past(), - updatedAt: faker.date.recent(), -})) +export const donationWishFactory = Factory.define( + ({ associations }) => ({ + message: faker.lorem.paragraph(), + campaignId: associations.campaignId || faker.datatype.uuid(), + personId: associations.personId || null, + donationId: associations.donationId || null, + createdAt: faker.date.past(), + updatedAt: faker.date.recent(), + }), +)