public function __construct(Lecture $lecture)
 {
     $this->id = $lecture->getId();
     $this->name = $lecture->getName();
     $this->startDate = $lecture->getStart();
     $this->endDate = $lecture->getEnd();
     $this->conferenceId = $lecture->getConferenceId();
     $this->venueId = $lecture->getVenueId();
 }
 private static function insert(Lecture $model)
 {
     $db = Db::getInstance(\ConferenceScheduler\Configs\DatabaseConfig::DB_INSTANCE);
     $query = "INSERT INTO lectures (Name,Start,End,hallId,venueId,conferenceId) VALUES (:Name, :Start, :End, :hallId, :venueId, :conferenceId);";
     $result = $db->prepare($query);
     $result->execute([':Name' => $model->getName(), ':Start' => $model->getStart(), ':End' => $model->getEnd(), ':hallId' => $model->getHallId(), ':venueId' => $model->getVenueId(), ':conferenceId' => $model->getConferenceId()]);
     $model->setId($db->lastInsertId());
 }