Comment ajouter un autre ID de schéma sur MongoDB

//first Schema
const user = new Schema({
	username:[type:String, unique:true]
})

//second Schema
const notes = new Schema({
	id : [{ type: Schema.Types.ObjectId, ref: 'user' }] // gets _id of first Schema(user)
  notes:[type:String, trim:true]
})
Rohit Yadav