Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- db.user.insertMany([
- {
- _id: 'kuzznya',
- password: 'password',
- name: 'Ilya',
- surname: 'Kuznetsov',
- phone_number: '+353873432703',
- verified: true,
- address: '90 Greenville Place'
- },
- {
- _id: 'afterbvrner',
- password: 'password',
- name: 'Max',
- surname: 'Golish',
- phone_number: '88005553535',
- verified: true,
- address: 'Somewhere'
- },
- {
- _id: 'I-SER-I',
- password: 'password',
- name: 'Sergey',
- surname: 'Papikyan',
- phone_number: '88005553535',
- verified: true,
- address: 'Somewhere'
- }
- ]);
- db.store.insertMany([
- {
- _id: 'Peter the Great delivery market',
- location: 'St. Petersburg'
- },
- {
- _id: 'Mausoleum market',
- location: 'Moscow'
- },
- {
- _id: 'Guinness delivery',
- location: 'Dublin'
- }
- ]);
- const guinness = db.product.insertOne({
- name: 'Guinness',
- description: 'Guinness is good for you',
- price: 100,
- category: 'Alcohol'
- }).insertedId;
- const pinotGrigio = db.product.insertOne({
- name: 'Pinot Grigio',
- description: 'Italian white wine',
- price: 100000,
- category: 'Alcohol'
- }).insertedId;
- const bordeaux = db.product.insertOne({
- name: 'Bordeaux',
- description: 'French red wine',
- price: 50000,
- category: 'Alcohol'
- }).insertedId;
- const campoViejo = db.product.insertOne({
- name: 'Campo Viejo Rioja',
- description: 'Spanish red wine',
- price: 120000,
- category: 'Alcohol'
- }).insertedId;
- const apples = db.product.insertOne({
- name: 'Apples',
- description: 'Local apples',
- price: 5000,
- category: 'Fruits'
- }).insertedId;
- const peaches = db.product.insertOne({
- name: 'Peaches',
- description: 'Local peaches',
- price: 6000,
- category: 'Fruits'
- }).insertedId;
- const carrot = db.product.insertOne({
- name: 'Carrot',
- description: 'Local carrot',
- price: 4500,
- category: 'Vegetables'
- }).insertedId;
- const potato = db.product.insertOne({
- name: 'Potato',
- description: 'Local potato',
- price: 4000,
- category: 'Vegetables'
- }).insertedId;
- const yogurt = db.product.insertOne({
- name: 'Yogurt',
- description: 'Turkish yogurt',
- price: 10000,
- category: 'Dairy'
- }).insertedId;
- const milk1 = db.product.insertOne({
- name: 'Milk "Happy farmer"',
- price: 10000,
- category: 'Dairy'
- }).insertedId;
- const milk2 = db.product.insertOne({
- name: 'Milk "Prostokvashino"',
- price: 11000,
- category: 'Dairy'
- }).insertedId;
- const spaghetti = db.product.insertOne({
- name: 'Spaghetti "Barilla"',
- price: 15000,
- category: 'Grocery'
- }).insertedId;
- db.order.insertMany([
- {
- user: 'kuzznya',
- store: 'Peter the Great delivery market',
- state: 'PAID',
- items: [
- { product: guinness, amount: 1000 },
- { product: pinotGrigio, amount: 2 }
- ]
- }
- ]);
Advertisement
Add Comment
Please, Sign In to add comment