kuzznya

mongo

Dec 16th, 2022
1,188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. db.user.insertMany([
  2.     {
  3.         _id: 'kuzznya',
  4.         password: 'password',
  5.         name: 'Ilya',
  6.         surname: 'Kuznetsov',
  7.         phone_number: '+353873432703',
  8.         verified: true,
  9.         address: '90 Greenville Place'
  10.     },
  11.     {
  12.         _id: 'afterbvrner',
  13.         password: 'password',
  14.         name: 'Max',
  15.         surname: 'Golish',
  16.         phone_number: '88005553535',
  17.         verified: true,
  18.         address: 'Somewhere'
  19.     },
  20.     {
  21.         _id: 'I-SER-I',
  22.         password: 'password',
  23.         name: 'Sergey',
  24.         surname: 'Papikyan',
  25.         phone_number: '88005553535',
  26.         verified: true,
  27.         address: 'Somewhere'
  28.     }
  29. ]);
  30.  
  31. db.store.insertMany([
  32.     {
  33.         _id: 'Peter the Great delivery market',
  34.         location: 'St. Petersburg'
  35.     },
  36.     {
  37.         _id: 'Mausoleum market',
  38.         location: 'Moscow'
  39.     },
  40.     {
  41.         _id: 'Guinness delivery',
  42.         location: 'Dublin'
  43.     }
  44. ]);
  45.  
  46. const guinness = db.product.insertOne({
  47.     name: 'Guinness',
  48.     description: 'Guinness is good for you',
  49.     price: 100,
  50.     category: 'Alcohol'
  51. }).insertedId;
  52.  
  53. const pinotGrigio = db.product.insertOne({
  54.     name: 'Pinot Grigio',
  55.     description: 'Italian white wine',
  56.     price: 100000,
  57.     category: 'Alcohol'
  58. }).insertedId;
  59.  
  60. const bordeaux = db.product.insertOne({
  61.     name: 'Bordeaux',
  62.     description: 'French red wine',
  63.     price: 50000,
  64.     category: 'Alcohol'
  65. }).insertedId;
  66.  
  67. const campoViejo = db.product.insertOne({
  68.     name: 'Campo Viejo Rioja',
  69.     description: 'Spanish red wine',
  70.     price: 120000,
  71.     category: 'Alcohol'
  72. }).insertedId;
  73.  
  74. const apples = db.product.insertOne({
  75.     name: 'Apples',
  76.     description: 'Local apples',
  77.     price: 5000,
  78.     category: 'Fruits'
  79. }).insertedId;
  80.  
  81. const peaches = db.product.insertOne({
  82.     name: 'Peaches',
  83.     description: 'Local peaches',
  84.     price: 6000,
  85.     category: 'Fruits'
  86. }).insertedId;
  87.  
  88. const carrot = db.product.insertOne({
  89.     name: 'Carrot',
  90.     description: 'Local carrot',
  91.     price: 4500,
  92.     category: 'Vegetables'
  93. }).insertedId;
  94.  
  95. const potato = db.product.insertOne({
  96.     name: 'Potato',
  97.     description: 'Local potato',
  98.     price: 4000,
  99.     category: 'Vegetables'
  100. }).insertedId;
  101.  
  102. const yogurt = db.product.insertOne({
  103.     name: 'Yogurt',
  104.     description: 'Turkish yogurt',
  105.     price: 10000,
  106.     category: 'Dairy'
  107. }).insertedId;
  108.  
  109. const milk1 = db.product.insertOne({
  110.     name: 'Milk "Happy farmer"',
  111.     price: 10000,
  112.     category: 'Dairy'
  113. }).insertedId;
  114.  
  115. const milk2 = db.product.insertOne({
  116.     name: 'Milk "Prostokvashino"',
  117.     price: 11000,
  118.     category: 'Dairy'
  119. }).insertedId;
  120.  
  121. const spaghetti = db.product.insertOne({
  122.     name: 'Spaghetti "Barilla"',
  123.     price: 15000,
  124.     category: 'Grocery'
  125. }).insertedId;
  126.  
  127. db.order.insertMany([
  128.     {
  129.         user: 'kuzznya',
  130.         store: 'Peter the Great delivery market',
  131.         state: 'PAID',
  132.         items: [
  133.             { product: guinness, amount: 1000 },
  134.             { product: pinotGrigio, amount: 2 }
  135.         ]
  136.     }
  137. ]);
  138.  
Advertisement
Add Comment
Please, Sign In to add comment