Last active
August 28, 2025 04:51
-
-
Save andredubov/f80731ae33ae5072433a62db494b444d to your computer and use it in GitHub Desktop.
Seed data for a MongoDB "parts" collection. Contains 4 sample entries for spaceship parts with full attributes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The current database to use. | |
use("inventory"); | |
// Документ 1: Двигатель - Main Engine Thruster | |
db.getCollection("parts").insertOne({ | |
_id: "f8e7d6c5-4b3a-2c1d-9f0e-8d7c6b5a4f3e", | |
name: "Main Engine Thruster", | |
description: "High-efficiency plasma thruster for interplanetary travel", | |
price: 125000.99, | |
stockQuantity: 5, | |
category: 1, // PartCategoryEngine | |
dimensions: { | |
length: 250.5, | |
width: 120.3, | |
height: 85.7, | |
weight: 450.2 | |
}, | |
manufacturer: { | |
name: "Orbital Dynamics", | |
country: "US", | |
website: "https://orbital-dynamics.com" | |
}, | |
tags: ["engine", "thruster", "propulsion", "premium"], | |
metadata: { | |
maxThrust: { | |
doubleValue: 1500000.5 | |
}, | |
isCertified: { | |
boolValue: true | |
}, | |
serialNumber: { | |
stringValue: "ENG-789-XYZ" | |
}, | |
warrantyYears: { | |
int64Value: 5 | |
} | |
}, | |
createdAt: new Date("2024-01-15T10:30:00Z"), | |
updatedAt: new Date("2024-01-20T14:45:00Z") | |
}); | |
// Документ 2: Топливный бак | |
db.getCollection("parts").insertOne({ | |
_id: "a3b8f4d2-1c7e-4a9b-8f6d-3e2c1a9b7f5d", | |
name: "Cryogenic Fuel Tank", | |
description: "High-capacity cryogenic storage for liquid hydrogen", | |
price: 87500.75, | |
stockQuantity: 3, | |
category: 2, // PartCategoryFuel | |
dimensions: { | |
length: 400.0, | |
width: 200.0, | |
height: 180.0, | |
weight: 320.5 | |
}, | |
manufacturer: { | |
name: "CryoTech Systems", | |
country: "DE", | |
website: "https://cryotech.de" | |
}, | |
tags: ["fuel", "storage", "cryogenic", "tank"], | |
metadata: { | |
capacityLiters: { | |
doubleValue: 5000.0 | |
}, | |
maxPressure: { | |
doubleValue: 30.5 | |
}, | |
material: { | |
stringValue: "Titanium-Composite" | |
}, | |
insulationType: { | |
stringValue: "Multi-layer vacuum" | |
} | |
}, | |
createdAt: new Date("2024-02-10T09:15:00Z"), | |
updatedAt: new Date("2024-02-18T16:20:00Z") | |
}); | |
// Документ 3: Иллюминатор | |
db.getCollection("parts").insertOne({ | |
_id: "c5e9a2b8-7d3f-4c1a-9e6b-2d8f4a7c1b3e", | |
name: "Reinforced Observation Porthole", | |
description: "Multi-pane reinforced glass porthole with UV protection", | |
price: 22500.0, | |
stockQuantity: 12, | |
category: 3, // PartCategoryPorthole | |
dimensions: { | |
length: 80.0, | |
width: 80.0, | |
height: 15.0, | |
weight: 45.8 | |
}, | |
manufacturer: { | |
name: "SpaceGlass Inc", | |
country: "JP", | |
website: "https://spaceglass.jp" | |
}, | |
tags: ["window", "view", "safety", "transparent"], | |
metadata: { | |
diameter: { | |
doubleValue: 60.0 | |
}, | |
thickness: { | |
doubleValue: 8.5 | |
}, | |
uvProtection: { | |
boolValue: true | |
}, | |
pressureRating: { | |
doubleValue: 5.2 | |
}, | |
opticalQuality: { | |
stringValue: "Grade-A" | |
} | |
}, | |
createdAt: new Date("2024-01-28T14:00:00Z"), | |
updatedAt: new Date("2024-02-05T11:30:00Z") | |
}); | |
// Документ 4: Крыло шаттла | |
db.getCollection("parts").insertOne({ | |
_id: "e2d7f1a9-4b8c-3d6e-1f5a-7c9b2e4d8a3f", | |
name: "Delta Wing Assembly", | |
description: "Aerodynamic delta wing with heat-resistant coating", | |
price: 189000.0, | |
stockQuantity: 2, | |
category: 4, // PartCategoryWing | |
dimensions: { | |
length: 850.0, | |
width: 450.0, | |
height: 35.0, | |
weight: 780.3 | |
}, | |
manufacturer: { | |
name: "AeroSpace Dynamics", | |
country: "US", | |
website: "https://aerospace-dynamics.com" | |
}, | |
tags: ["wing", "aerodynamic", "assembly", "composite"], | |
metadata: { | |
wingspan: { | |
doubleValue: 900.0 | |
}, | |
surfaceArea: { | |
doubleValue: 85.5 | |
}, | |
heatTolerance: { | |
doubleValue: 2200.0 | |
}, | |
materialComposition: { | |
stringValue: "Carbon-Carbon Composite" | |
}, | |
controlSurfaces: { | |
int64Value: 3 | |
} | |
}, | |
createdAt: new Date("2024-03-01T08:45:00Z"), | |
updatedAt: new Date("2024-03-01T08:45:00Z") | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment