finish taller5

This commit is contained in:
2021-11-26 21:36:26 -03:00
parent aa1848691e
commit 0232b1dcf1
29 changed files with 13885 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
'use strict'
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const AutoSchema = Schema({
patente: String,
anio: Number,
marca: { type: Schema.ObjectId, ref: "marca" }
});
module.exports = mongoose.model('auto', AutoSchema);

View File

@@ -0,0 +1,8 @@
'use strict'
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const MarcaSchema = Schema({
descripcion: String
});
module.exports = mongoose.model('marca', MarcaSchema);