Skip to content

Instantly share code, notes, and snippets.

@Horaddrim
Created August 11, 2017 20:06
Show Gist options
  • Select an option

  • Save Horaddrim/a5e7c3b60c673c02622a2842bbf7a42f to your computer and use it in GitHub Desktop.

Select an option

Save Horaddrim/a5e7c3b60c673c02622a2842bbf7a42f to your computer and use it in GitHub Desktop.
:D
const patiosSchema = require('./patiosSchema');
exports.InserePatios = function(IdPatio,NomPatio,IndExclusao)
{
var newPatio = new Patio(IdPatio,NomPatio,IndExclusao);
patiosSchema.create(
{
IdPatio: newPatio.IdPatio,
NomPatio: newPatio.NomPatio,
IndExclusao: newPatio.IndExclusao
});
console.log("INSERIU NO MONGO!");
return newPatio;
}
class Patio
{
constructor(IdPatio,NomPatio,IndExclusao)
{
this.IdPatio = IdPatio;
this.NomPatio = NomPatio;
this.IndExclusao = IndExclusao;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment