Skip to content

Commit 9791b1c

Browse files
committed
save
1 parent dbc1081 commit 9791b1c

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

src/services/seed.service.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,29 @@ export class SeedService {
9090

9191
const productsData: Array<Partial<Product>> = [];
9292
const size = 200;
93+
const category = faker.helpers.arrayElement(categoriesRta);
94+
productsData.push({
95+
title: faker.commerce.productName(),
96+
price: parseInt(faker.commerce.price(), 10),
97+
description: faker.commerce.productDescription(),
98+
category,
99+
images: JSON.stringify([
100+
'https://i.imgur.com/wUBxCQh.jpeg',
101+
'https://i.imgur.com/9aM8pz3.jpeg',
102+
'https://i.imgur.com/ZDMM36B.jpeg',
103+
]),
104+
});
105+
productsData.push({
106+
title: faker.commerce.productName(),
107+
price: parseInt(faker.commerce.price(), 10),
108+
description: faker.commerce.productDescription(),
109+
category,
110+
images: JSON.stringify([
111+
'https://i.imgur.com/CCnU4YX.jpeg',
112+
'https://i.imgur.com/JANnz25.jpeg',
113+
'https://i.imgur.com/ioc7lwM.jpeg',
114+
]),
115+
});
93116
for (let index = 0; index < size; index++) {
94117
const category = faker.helpers.arrayElement(categoriesRta);
95118
const images = [

0 commit comments

Comments
 (0)