|
@ -1,6 +1,7 @@ |
|
|
import { |
|
|
import { |
|
|
AccountType, |
|
|
AccountType, |
|
|
Currency, |
|
|
Currency, |
|
|
|
|
|
DataSource, |
|
|
PrismaClient, |
|
|
PrismaClient, |
|
|
Role, |
|
|
Role, |
|
|
Type |
|
|
Type |
|
@ -135,17 +136,47 @@ async function main() { |
|
|
where: { id: '9b112b4d-3b7d-4bad-9bdd-3b0f7b4dac2f' } |
|
|
where: { id: '9b112b4d-3b7d-4bad-9bdd-3b0f7b4dac2f' } |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
await prisma.symbolProfile.createMany({ |
|
|
|
|
|
data: [ |
|
|
|
|
|
{ |
|
|
|
|
|
countries: [{ code: 'US', weight: 1 }], |
|
|
|
|
|
dataSource: DataSource.YAHOO, |
|
|
|
|
|
id: '2bd26362-136e-411c-b578-334084b4cdcc', |
|
|
|
|
|
symbol: 'AMZN' |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
countries: [{ code: 'US', weight: 1 }], |
|
|
|
|
|
dataSource: DataSource.YAHOO, |
|
|
|
|
|
id: 'd1ee9681-fb21-4f99-a3b7-afd4fc04df2e', |
|
|
|
|
|
symbol: 'TSLA' |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
countries: [ |
|
|
|
|
|
{ code: 'US', weight: 0.9886789999999981 }, |
|
|
|
|
|
{ code: 'NL', weight: 0.000203 }, |
|
|
|
|
|
{ code: 'CA', weight: 0.000362 } |
|
|
|
|
|
], |
|
|
|
|
|
dataSource: DataSource.YAHOO, |
|
|
|
|
|
id: '7d9c8540-061e-4e7e-b019-0d0f4a84e796', |
|
|
|
|
|
symbol: 'VTI' |
|
|
|
|
|
} |
|
|
|
|
|
], |
|
|
|
|
|
skipDuplicates: true |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
await prisma.order.createMany({ |
|
|
await prisma.order.createMany({ |
|
|
data: [ |
|
|
data: [ |
|
|
{ |
|
|
{ |
|
|
accountId: '65cfb79d-b6c7-4591-9d46-73426bc62094', |
|
|
accountId: '65cfb79d-b6c7-4591-9d46-73426bc62094', |
|
|
accountUserId: userDemo.id, |
|
|
accountUserId: userDemo.id, |
|
|
currency: Currency.USD, |
|
|
currency: Currency.USD, |
|
|
|
|
|
dataSource: DataSource.YAHOO, |
|
|
date: new Date(Date.UTC(2017, 0, 3, 0, 0, 0)), |
|
|
date: new Date(Date.UTC(2017, 0, 3, 0, 0, 0)), |
|
|
fee: 30, |
|
|
fee: 30, |
|
|
id: 'cf7c0418-8535-4089-ae3d-5dbfa0aec2e1', |
|
|
id: 'cf7c0418-8535-4089-ae3d-5dbfa0aec2e1', |
|
|
quantity: 50, |
|
|
quantity: 50, |
|
|
symbol: 'TSLA', |
|
|
symbol: 'TSLA', |
|
|
|
|
|
symbolProfileId: 'd1ee9681-fb21-4f99-a3b7-afd4fc04df2e', |
|
|
type: Type.BUY, |
|
|
type: Type.BUY, |
|
|
unitPrice: 42.97, |
|
|
unitPrice: 42.97, |
|
|
userId: userDemo.id |
|
|
userId: userDemo.id |
|
@ -154,6 +185,7 @@ async function main() { |
|
|
accountId: 'd804de69-0429-42dc-b6ca-b308fd7dd926', |
|
|
accountId: 'd804de69-0429-42dc-b6ca-b308fd7dd926', |
|
|
accountUserId: userDemo.id, |
|
|
accountUserId: userDemo.id, |
|
|
currency: Currency.USD, |
|
|
currency: Currency.USD, |
|
|
|
|
|
dataSource: DataSource.YAHOO, |
|
|
date: new Date(Date.UTC(2017, 7, 16, 0, 0, 0)), |
|
|
date: new Date(Date.UTC(2017, 7, 16, 0, 0, 0)), |
|
|
fee: 29.9, |
|
|
fee: 29.9, |
|
|
id: 'a1c5d73a-8631-44e5-ac44-356827a5212c', |
|
|
id: 'a1c5d73a-8631-44e5-ac44-356827a5212c', |
|
@ -167,11 +199,13 @@ async function main() { |
|
|
accountId: '480269ce-e12a-4fd1-ac88-c4b0ff3f899c', |
|
|
accountId: '480269ce-e12a-4fd1-ac88-c4b0ff3f899c', |
|
|
accountUserId: userDemo.id, |
|
|
accountUserId: userDemo.id, |
|
|
currency: Currency.USD, |
|
|
currency: Currency.USD, |
|
|
|
|
|
dataSource: DataSource.YAHOO, |
|
|
date: new Date(Date.UTC(2018, 9, 1, 0, 0, 0)), |
|
|
date: new Date(Date.UTC(2018, 9, 1, 0, 0, 0)), |
|
|
fee: 80.79, |
|
|
fee: 80.79, |
|
|
id: '71c08e2a-4a86-44ae-a890-c337de5d5f9b', |
|
|
id: '71c08e2a-4a86-44ae-a890-c337de5d5f9b', |
|
|
quantity: 5, |
|
|
quantity: 5, |
|
|
symbol: 'AMZN', |
|
|
symbol: 'AMZN', |
|
|
|
|
|
symbolProfileId: '2bd26362-136e-411c-b578-334084b4cdcc', |
|
|
type: Type.BUY, |
|
|
type: Type.BUY, |
|
|
unitPrice: 2021.99, |
|
|
unitPrice: 2021.99, |
|
|
userId: userDemo.id |
|
|
userId: userDemo.id |
|
@ -180,11 +214,13 @@ async function main() { |
|
|
accountId: '480269ce-e12a-4fd1-ac88-c4b0ff3f899c', |
|
|
accountId: '480269ce-e12a-4fd1-ac88-c4b0ff3f899c', |
|
|
accountUserId: userDemo.id, |
|
|
accountUserId: userDemo.id, |
|
|
currency: Currency.USD, |
|
|
currency: Currency.USD, |
|
|
|
|
|
dataSource: DataSource.YAHOO, |
|
|
date: new Date(Date.UTC(2019, 2, 1, 0, 0, 0)), |
|
|
date: new Date(Date.UTC(2019, 2, 1, 0, 0, 0)), |
|
|
fee: 19.9, |
|
|
fee: 19.9, |
|
|
id: '385f2c2c-d53e-4937-b0e5-e92ef6020d4e', |
|
|
id: '385f2c2c-d53e-4937-b0e5-e92ef6020d4e', |
|
|
quantity: 10, |
|
|
quantity: 10, |
|
|
symbol: 'VTI', |
|
|
symbol: 'VTI', |
|
|
|
|
|
symbolProfileId: '7d9c8540-061e-4e7e-b019-0d0f4a84e796', |
|
|
type: Type.BUY, |
|
|
type: Type.BUY, |
|
|
unitPrice: 144.38, |
|
|
unitPrice: 144.38, |
|
|
userId: userDemo.id |
|
|
userId: userDemo.id |
|
@ -193,11 +229,13 @@ async function main() { |
|
|
accountId: '480269ce-e12a-4fd1-ac88-c4b0ff3f899c', |
|
|
accountId: '480269ce-e12a-4fd1-ac88-c4b0ff3f899c', |
|
|
accountUserId: userDemo.id, |
|
|
accountUserId: userDemo.id, |
|
|
currency: Currency.USD, |
|
|
currency: Currency.USD, |
|
|
|
|
|
dataSource: DataSource.YAHOO, |
|
|
date: new Date(Date.UTC(2019, 8, 3, 0, 0, 0)), |
|
|
date: new Date(Date.UTC(2019, 8, 3, 0, 0, 0)), |
|
|
fee: 19.9, |
|
|
fee: 19.9, |
|
|
id: '185f2c2c-d53e-4937-b0e5-a93ef6020d4e', |
|
|
id: '185f2c2c-d53e-4937-b0e5-a93ef6020d4e', |
|
|
quantity: 10, |
|
|
quantity: 10, |
|
|
symbol: 'VTI', |
|
|
symbol: 'VTI', |
|
|
|
|
|
symbolProfileId: '7d9c8540-061e-4e7e-b019-0d0f4a84e796', |
|
|
type: Type.BUY, |
|
|
type: Type.BUY, |
|
|
unitPrice: 147.99, |
|
|
unitPrice: 147.99, |
|
|
userId: userDemo.id |
|
|
userId: userDemo.id |
|
@ -206,11 +244,13 @@ async function main() { |
|
|
accountId: '480269ce-e12a-4fd1-ac88-c4b0ff3f899c', |
|
|
accountId: '480269ce-e12a-4fd1-ac88-c4b0ff3f899c', |
|
|
accountUserId: userDemo.id, |
|
|
accountUserId: userDemo.id, |
|
|
currency: Currency.USD, |
|
|
currency: Currency.USD, |
|
|
|
|
|
dataSource: DataSource.YAHOO, |
|
|
date: new Date(Date.UTC(2020, 2, 2, 0, 0, 0)), |
|
|
date: new Date(Date.UTC(2020, 2, 2, 0, 0, 0)), |
|
|
fee: 19.9, |
|
|
fee: 19.9, |
|
|
id: '347b0430-a84f-4031-a0f9-390399066ad6', |
|
|
id: '347b0430-a84f-4031-a0f9-390399066ad6', |
|
|
quantity: 10, |
|
|
quantity: 10, |
|
|
symbol: 'VTI', |
|
|
symbol: 'VTI', |
|
|
|
|
|
symbolProfileId: '7d9c8540-061e-4e7e-b019-0d0f4a84e796', |
|
|
type: Type.BUY, |
|
|
type: Type.BUY, |
|
|
unitPrice: 151.41, |
|
|
unitPrice: 151.41, |
|
|
userId: userDemo.id |
|
|
userId: userDemo.id |
|
@ -219,11 +259,13 @@ async function main() { |
|
|
accountId: '480269ce-e12a-4fd1-ac88-c4b0ff3f899c', |
|
|
accountId: '480269ce-e12a-4fd1-ac88-c4b0ff3f899c', |
|
|
accountUserId: userDemo.id, |
|
|
accountUserId: userDemo.id, |
|
|
currency: Currency.USD, |
|
|
currency: Currency.USD, |
|
|
|
|
|
dataSource: DataSource.YAHOO, |
|
|
date: new Date(Date.UTC(2020, 8, 1, 0, 0, 0)), |
|
|
date: new Date(Date.UTC(2020, 8, 1, 0, 0, 0)), |
|
|
fee: 19.9, |
|
|
fee: 19.9, |
|
|
id: '67ec3f47-3189-4b63-ba05-60d3a06b302f', |
|
|
id: '67ec3f47-3189-4b63-ba05-60d3a06b302f', |
|
|
quantity: 10, |
|
|
quantity: 10, |
|
|
symbol: 'VTI', |
|
|
symbol: 'VTI', |
|
|
|
|
|
symbolProfileId: '7d9c8540-061e-4e7e-b019-0d0f4a84e796', |
|
|
type: Type.BUY, |
|
|
type: Type.BUY, |
|
|
unitPrice: 177.69, |
|
|
unitPrice: 177.69, |
|
|
userId: userDemo.id |
|
|
userId: userDemo.id |
|
@ -232,11 +274,13 @@ async function main() { |
|
|
accountId: '480269ce-e12a-4fd1-ac88-c4b0ff3f899c', |
|
|
accountId: '480269ce-e12a-4fd1-ac88-c4b0ff3f899c', |
|
|
accountUserId: userDemo.id, |
|
|
accountUserId: userDemo.id, |
|
|
currency: Currency.USD, |
|
|
currency: Currency.USD, |
|
|
|
|
|
dataSource: DataSource.YAHOO, |
|
|
date: new Date(Date.UTC(2020, 2, 1, 0, 0, 0)), |
|
|
date: new Date(Date.UTC(2020, 2, 1, 0, 0, 0)), |
|
|
fee: 19.9, |
|
|
fee: 19.9, |
|
|
id: 'd01c6fbc-fa8d-47e6-8e80-66f882d2bfd2', |
|
|
id: 'd01c6fbc-fa8d-47e6-8e80-66f882d2bfd2', |
|
|
quantity: 10, |
|
|
quantity: 10, |
|
|
symbol: 'VTI', |
|
|
symbol: 'VTI', |
|
|
|
|
|
symbolProfileId: '7d9c8540-061e-4e7e-b019-0d0f4a84e796', |
|
|
type: Type.BUY, |
|
|
type: Type.BUY, |
|
|
unitPrice: 203.15, |
|
|
unitPrice: 203.15, |
|
|
userId: userDemo.id |
|
|
userId: userDemo.id |
|
|