added /materials route
This commit is contained in:
16
src/models/material.ts
Normal file
16
src/models/material.ts
Normal file
@ -0,0 +1,16 @@
|
||||
import mongoose from 'mongoose';
|
||||
|
||||
const MaterialSchema = new mongoose.Schema({
|
||||
name: {type: String, index: {unique: true}},
|
||||
supplier: String,
|
||||
group: String,
|
||||
mineral: String,
|
||||
glass_fiber: String,
|
||||
carbon_fiber: String,
|
||||
numbers: [{
|
||||
color: String,
|
||||
number: Number
|
||||
}]
|
||||
});
|
||||
|
||||
export default mongoose.model('material', MaterialSchema);
|
Reference in New Issue
Block a user