| 1234567891011121314151617181920212223 |
- import { faker } from '@faker-js/faker'
-
- interface FakeData {
- id: number;
- name: string;
- color: string;
- price: string;
- company: string;
- }
-
- module.exports = () => {
- const items:FakeData[] = [];
- for (let id = 1; id <= 500; id++) {
- items.push({
- id: id,
- name: `${faker.commerce.productAdjective()} ${faker.commerce.productMaterial()} ${faker.commerce.product()}`,
- color: faker.commerce.color(),
- price: `$${faker.commerce.price()}`,
- company: faker.company.companyName(),
- });
- }
- return { items };
- };
|