EventoGrupo.php 502 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. namespace v1\models;
  3. use app\models\EventoGrupo as ModeloEventoGrupo;
  4. class EventoGrupo extends ModeloEventoGrupo {
  5. public function fields() {
  6. return [
  7. 'idEvento',
  8. 'idGrupo',
  9. ];
  10. }
  11. public function extraFields() {
  12. return [
  13. 'evento',
  14. 'grupo'
  15. ];
  16. }
  17. public function getEvento() {
  18. return $this->hasOne(Evento::className(), ['id' => 'idEvento']);
  19. }
  20. public function getGrupo() {
  21. return $this->hasOne(Grupo::className(), ['id' => 'idGrupo']);
  22. }
  23. }