added relationships between models and created JOIN table for Event and Schedule models