跳至主要内容

[note] faker 筆記

// seed.js
await queryInterface.bulkInsert(
'Restaurants',
[...Array(50).keys()].map((i) => ({
name: faker.name.findName(),
tel: faker.phone.phoneNumber(),
address: faker.address.streetAddress(),
opening_hours: '08:00',
image: `https://picsum.photos/seed/${i}/800/480`,
description: faker.lorem.text(),
createdAt: new Date(),
updatedAt: new Date(),
})),
);