|
1 | 1 | import { Factory } from 'fishery'
|
2 | 2 | import { faker } from '@faker-js/faker'
|
| 3 | +import { Prisma } from '@prisma/client' |
3 | 4 |
|
4 |
| -import { DonationWish } from '.prisma/client' |
5 |
| - |
6 |
| -export const donationWishFactory = Factory.define<DonationWish>(({ associations }) => ({ |
7 |
| - id: faker.datatype.uuid(), |
8 |
| - message: faker.lorem.paragraph(), |
9 |
| - campaignId: associations.campaignId || faker.datatype.uuid(), |
10 |
| - personId: associations.personId || null, |
11 |
| - donationId: associations.donationId || null, |
12 |
| - createdAt: faker.date.past(), |
13 |
| - updatedAt: faker.date.recent(), |
14 |
| -})) |
| 5 | +export const donationWishFactory = Factory.define<Prisma.DonationWishUncheckedCreateInput>( |
| 6 | + ({ associations }) => ({ |
| 7 | + message: faker.lorem.paragraph(), |
| 8 | + campaignId: associations.campaignId || faker.datatype.uuid(), |
| 9 | + personId: associations.personId || null, |
| 10 | + donationId: associations.donationId || null, |
| 11 | + createdAt: faker.date.past(), |
| 12 | + updatedAt: faker.date.recent(), |
| 13 | + }), |
| 14 | +) |
0 commit comments