Skip to content

Commit

Permalink
let db create the donationWish primary id
Browse files Browse the repository at this point in the history
  • Loading branch information
quantum-grit committed Oct 29, 2023
1 parent cdda5b3 commit 45e8cd3
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions db/seed/donationWish/factory.ts
Original file line number Diff line number Diff line change
@@ -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<DonationWish>(({ 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<Prisma.DonationWishUncheckedCreateInput>(
({ 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(),
}),
)

0 comments on commit 45e8cd3

Please sign in to comment.