-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adicionada funcionalidade que busca reservas em dias específicos tamb…
…ém para reservas feitas no sistema legado
- Loading branch information
Showing
3 changed files
with
53 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
namespace App; | ||
|
||
use Illuminate\Database\Eloquent\Model; | ||
|
||
class ReservaLegado extends Model | ||
{ | ||
public $table = 'reservas_legado'; | ||
public $timestamps = false; | ||
|
||
protected $hidden = [ | ||
'id', | ||
]; | ||
|
||
/** | ||
* Recupera o usuário da reserva feita no sistema legado. | ||
*/ | ||
public function usuario() | ||
{ | ||
return $this->belongsTo('App\UsuarioLegado'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
namespace App; | ||
|
||
use Illuminate\Database\Eloquent\Model; | ||
|
||
class UsuarioLegado extends Model | ||
{ | ||
public $timestamps = false; | ||
public $table = 'usuarios_legado'; | ||
|
||
protected $hidden = [ | ||
'id', | ||
]; | ||
|
||
/** | ||
* Recupera as reservas feitas pelo usuário no sistema legado. | ||
*/ | ||
public function reservas() | ||
{ | ||
return $this->hasMany('App\ReservaLegado'); | ||
} | ||
} |