title: Node.js - Abstracting mongoose model from domain model
body: <p>I am building a rest API in node. I am following a general ddd architecture ie repositories, domain models, entities, value objects etc.
  I chose montodb for my persistence needs and am using mongoose to interface with the dB engine.</p>
  
  <p>In mongoose we create models from a defined schema. 
  I am trying to figure out how I can separate my domain model out from the mongoose model. I want to implement value objects and I don't see how I can do this with mongoose models.</p>
  
  <p>I cant find any information on how I can do this anywhere. I am wondering if it is I'll advised perhaps. I can add methods to a mongoose model so I guess it is acting as a domain model. If this is the case, then how might I implement value objects?</p>