func (VS *Server) registerAddDatabaseMovement(c *gin.Context, object interface{}, objectID bson.ObjectId, serviceID bson.ObjectId) {
	// Get the Audit, EventDB and save the object
	// Audit
	audit := VS.getAudit(c, object, objectID, serviceID, Created)
	err := VS.DataBase.Upsert(audit.ID, audit)
	VS.checkOperation(c, "transactions", "registerAddDatabaseMovement", "Insert audit in DB-Upsert", err)

	// EventDB
	// We need to register the struct as an interface to save it on the EventDB
	gob.Register(object)
	event := VS.getEvent(c, nil, object, audit.ID)
	err = VS.DataBase.Upsert(event.ID, event)
	VS.checkOperation(c, "transactions", "registerAddDatabaseMovement", "Insert event in DB-Upsert", err)
}
// registerAddDatabaseMovement adds the element to DB and registers the audit and the event related with the object created or modified
registerAddDatabaseMovement adds the element to DB and registers the audit and the event related with the object created or modified
// registerAddDatabaseMovement adds the element to DB and registers the audit and the event related with the object created or modified
func (VS *Server) registerAddDatabaseMovement(c *gin.Context, object interface{}, objectID bson.ObjectId, serviceID bson.ObjectId) {
	audit := VS.getAudit(c, object, objectID, serviceID, Created)
	err := VS.DataBase.Upsert(audit.ID, audit)
	VS.checkOperation(c, "transactions", "registerAddDatabaseMovement", "Insert audit in DB-Upsert", err)
	gob.Register(object)
	event := VS.getEvent(c, nil, object, audit.ID)
	err = VS.DataBase.Upsert(event.ID, event)
	VS.checkOperation(c, "transactions", "registerAddDatabaseMovement", "Insert event in DB-Upsert", err)
}
func ( VS * Server ) registerAddDatabaseMovement ( c * gin . Context , object interface { } , objectID bson . ObjectId , serviceID bson . ObjectId ) { audit := VS . getAudit ( c , object , objectID , serviceID , Created ) err := VS . DataBase . Upsert ( audit . ID , audit ) VS . checkOperation ( c , " " , " " , " " , err ) gob . Register ( object ) event := VS . getEvent ( c , nil , object , audit . ID ) err = VS . DataBase . Upsert ( event . ID , event ) VS . checkOperation ( c , " " , " " , " " , err ) }
registerAddDatabaseMovement adds the element to DB and registers the audit and the event related with the object created or modified
registerAddDatabaseMovement adds the element to DB and registers the audit and the event related with the object created or modified
// Get the Audit, EventDB and save the object // Audit // EventDB // We need to register the struct as an interface to save it on the EventDB