func (VS *Server) registerAddDatabaseMovementForStartinggTheAPP(object interface{}, objectID bson.ObjectId, serviceID bson.ObjectId, IDAdmin bson.ObjectId, IDVillage bson.ObjectId) {
	// Get the Audit, EventDB and save the object
	// Audit
	audit := VS.getAuditForStartingTheAPP(object, objectID, IDAdmin, IDVillage, serviceID, Created)
	err := VS.DataBase.Upsert(audit.ID, audit)
	if err != nil {
		fmt.Print(err)
		return
	}
	// EventDB
	// We need to register the struct as an interface to save it on the EventDB
	gob.Register(object)
	event := VS.getEventForStartingAPP(nil, object, audit.ID, IDVillage)
	err = VS.DataBase.Upsert(event.ID, event)
}
// 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) registerAddDatabaseMovementForStartinggTheAPP(object interface{}, objectID bson.ObjectId, serviceID bson.ObjectId, IDAdmin bson.ObjectId, IDVillage bson.ObjectId) {
	audit := VS.getAuditForStartingTheAPP(object, objectID, IDAdmin, IDVillage, serviceID, Created)
	err := VS.DataBase.Upsert(audit.ID, audit)
	if err != nil {
		fmt.Print(err)
		return
	}
	gob.Register(object)
	event := VS.getEventForStartingAPP(nil, object, audit.ID, IDVillage)
	err = VS.DataBase.Upsert(event.ID, event)
}
func ( VS * Server ) registerAddDatabaseMovementForStartinggTheAPP ( object interface { } , objectID bson . ObjectId , serviceID bson . ObjectId , IDAdmin bson . ObjectId , IDVillage bson . ObjectId ) { audit := VS . getAuditForStartingTheAPP ( object , objectID , IDAdmin , IDVillage , serviceID , Created ) err := VS . DataBase . Upsert ( audit . ID , audit ) if err != nil { fmt . Print ( err ) return } gob . Register ( object ) event := VS . getEventForStartingAPP ( nil , object , audit . ID , IDVillage ) err = VS . DataBase . Upsert ( event . ID , event ) }
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