Browse Source

alterando a palavra Parâmetros

main
lucas cardoso 2 years ago
parent
commit
a88c14010f
  1. 4
      app/Models/EventosUsuarioModel.php
  2. 7
      app/Models/SupervisorModel.php
  3. 7
      app/Models/UsuarioModel.php

4
app/Models/EventosUsuarioModel.php

@ -77,8 +77,8 @@ class EventosUsuarioModel implements Model
$query .= " WHERE matricula = :matricula AND login = (SELECT MAX(login) FROM $table WHERE matricula = :matricula);";
if (empty($params['matricula'])) {
throw new Exception('Parametrô matricula é obrigatório');
throw new Exception('Parâmetro matricula é obrigatório');
}
return $this->db->update($query, $params);
}
}
}

7
app/Models/SupervisorModel.php

@ -156,7 +156,7 @@ class SupervisorModel implements Model
$query .= " WHERE matricula = :matricula AND login = (SELECT MAX(login) FROM $table WHERE matricula = :matricula AND id_dac = :id_dac);";
if (empty($params['matricula'])) {
throw new Exception('Parametrô matricula é obrigatório');
throw new Exception('Parâmetro matricula é obrigatório');
}
return $this->db->update($query, $data);
}
@ -165,6 +165,9 @@ class SupervisorModel implements Model
{
$table = SupervisorModel::$table;
$query = "DELETE FROM $table WHERE matricula = :matricula";
if (empty($params['matricula'])) {
throw new Exception('Parâmetro matricula é obrigatório');
}
return $this->db->delete($query, $params);
}
}
}

7
app/Models/UsuarioModel.php

@ -43,6 +43,9 @@ class UsuarioModel implements Model
{
$table = UsuarioModel::$table;
$query = "DELETE FROM $table WHERE matricula = :matricula";
if (empty($params['matricula'])) {
throw new Exception('Parâmetro matricula é obrigatório');
}
return $this->db->delete($query, $params);
}
@ -60,8 +63,8 @@ class UsuarioModel implements Model
$table = UsuarioModel::$table;
$query = "UPDATE $table SET nome = :nome, apelido = :apelido WHERE matricula = :matricula";
if (empty($params['matricula'])) {
throw new Exception('Parametrô matricula é obrigatório');
throw new Exception('Parâmetro matricula é obrigatório');
}
return $this->db->update($query, $params);
}
}
}

Loading…
Cancel
Save