Align exchange demo multimodal catalog
Build and deploy Docker image / build (push) Successful in 2m20s
Build and deploy Docker image / build (push) Successful in 2m20s
This commit is contained in:
+29
-19
@@ -6,24 +6,24 @@ const DEMO_TEAM_UUID = process.env.DEMO_TEAM_UUID ?? '11111111-1111-4111-8111-11
|
|||||||
const products = [
|
const products = [
|
||||||
{
|
{
|
||||||
uuid: '55555555-1111-4111-8111-111111111111',
|
uuid: '55555555-1111-4111-8111-111111111111',
|
||||||
sku: 'DEMO-COPPER-CATHODE',
|
sku: 'DEMO-SOLAR-PANELS',
|
||||||
name: 'Copper cathode',
|
name: 'Solar panels',
|
||||||
categoryName: 'Metals',
|
categoryName: 'Equipment',
|
||||||
unit: 'ton',
|
unit: 'pallet',
|
||||||
description: 'Demo exchange product',
|
description: 'Demo exchange product',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
uuid: '55555555-1111-4111-8111-222222222222',
|
uuid: '55555555-1111-4111-8111-222222222222',
|
||||||
sku: 'DEMO-ALUMINUM-INGOT',
|
sku: 'DEMO-INDUSTRIAL-PUMPS',
|
||||||
name: 'Aluminum ingot',
|
name: 'Industrial pumps',
|
||||||
categoryName: 'Metals',
|
categoryName: 'Equipment',
|
||||||
unit: 'ton',
|
unit: 'unit',
|
||||||
description: 'Demo exchange product',
|
description: 'Demo exchange product',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
uuid: '55555555-1111-4111-8111-333333333333',
|
uuid: '55555555-1111-4111-8111-333333333333',
|
||||||
sku: 'DEMO-WHEAT',
|
sku: 'DEMO-SOYBEAN-MEAL',
|
||||||
name: 'Wheat',
|
name: 'Soybean meal',
|
||||||
categoryName: 'Agriculture',
|
categoryName: 'Agriculture',
|
||||||
unit: 'ton',
|
unit: 'ton',
|
||||||
description: 'Demo exchange product',
|
description: 'Demo exchange product',
|
||||||
@@ -34,17 +34,17 @@ const suppliers = [
|
|||||||
{
|
{
|
||||||
uuid: '66666666-2222-4111-8111-111111111111',
|
uuid: '66666666-2222-4111-8111-111111111111',
|
||||||
teamUuid: DEMO_TEAM_UUID,
|
teamUuid: DEMO_TEAM_UUID,
|
||||||
name: 'Demo Supplier Almaty',
|
name: 'Guangzhou Solar Factory',
|
||||||
description: 'Demo supplier tied to the seeded client team',
|
description: 'Demo solar panel supplier near Guangzhou rail terminal',
|
||||||
country: 'Kazakhstan',
|
country: 'China',
|
||||||
countryCode: 'KZ',
|
countryCode: 'CN',
|
||||||
isVerified: true,
|
isVerified: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
uuid: '66666666-2222-4111-8111-222222222222',
|
uuid: '66666666-2222-4111-8111-222222222222',
|
||||||
teamUuid: null,
|
teamUuid: null,
|
||||||
name: 'Demo Supplier Urumqi',
|
name: 'Shenzhen Pump Works',
|
||||||
description: 'Demo supplier for catalog testing',
|
description: 'Demo industrial supplier near Yantian sea port',
|
||||||
country: 'China',
|
country: 'China',
|
||||||
countryCode: 'CN',
|
countryCode: 'CN',
|
||||||
isVerified: true,
|
isVerified: true,
|
||||||
@@ -52,8 +52,17 @@ const suppliers = [
|
|||||||
{
|
{
|
||||||
uuid: '66666666-2222-4111-8111-333333333333',
|
uuid: '66666666-2222-4111-8111-333333333333',
|
||||||
teamUuid: null,
|
teamUuid: null,
|
||||||
name: 'Demo Supplier Moscow',
|
name: 'Harbin Agro Export',
|
||||||
description: 'Demo supplier for catalog testing',
|
description: 'Demo agriculture supplier near rail export hub',
|
||||||
|
country: 'China',
|
||||||
|
countryCode: 'CN',
|
||||||
|
isVerified: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
uuid: '66666666-2222-4111-8111-444444444444',
|
||||||
|
teamUuid: null,
|
||||||
|
name: 'Vladivostok Timber Terminal',
|
||||||
|
description: 'Demo Russian supplier near Far East port and rail',
|
||||||
country: 'Russia',
|
country: 'Russia',
|
||||||
countryCode: 'RU',
|
countryCode: 'RU',
|
||||||
isVerified: true,
|
isVerified: true,
|
||||||
@@ -87,8 +96,9 @@ for (let index = 0; index < 24; index += 1) {
|
|||||||
const supplier = await prisma.supplier.findUniqueOrThrow({ where: { uuid: supplierSeed.uuid } })
|
const supplier = await prisma.supplier.findUniqueOrThrow({ where: { uuid: supplierSeed.uuid } })
|
||||||
const originPointUuid = [
|
const originPointUuid = [
|
||||||
'logistics-demo-hub-1',
|
'logistics-demo-hub-1',
|
||||||
'logistics-demo-hub-3',
|
|
||||||
'logistics-demo-hub-2',
|
'logistics-demo-hub-2',
|
||||||
|
'logistics-demo-hub-3',
|
||||||
|
'logistics-demo-hub-4',
|
||||||
][Math.floor(index / products.length) % suppliers.length]
|
][Math.floor(index / products.length) % suppliers.length]
|
||||||
|
|
||||||
await prisma.quote.upsert({
|
await prisma.quote.upsert({
|
||||||
|
|||||||
Reference in New Issue
Block a user