58 lines
948 B
PHP
58 lines
948 B
PHP
<?php
|
|
|
|
namespace App;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class StationFavorites extends Model
|
|
{
|
|
/**
|
|
* Table name of model
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $table = 'station_favorite';
|
|
|
|
/**
|
|
* Primary key field name of table
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $primaryKey = 'sf_id';
|
|
|
|
/**
|
|
* Additional fields from other connected tables
|
|
*
|
|
* @var array
|
|
*/
|
|
protected $appends = [];
|
|
|
|
/**
|
|
* The attributes that should be hidden for arrays.
|
|
*
|
|
* @var array
|
|
*/
|
|
|
|
protected $hidden = [];
|
|
|
|
|
|
/**
|
|
* Enable / Disable timestamp saving
|
|
*
|
|
* @var array
|
|
*/
|
|
public $timestamps = false;
|
|
|
|
|
|
public function station()
|
|
{
|
|
return $this->belongsTo('App\Station','station_id','station_id');
|
|
}
|
|
|
|
public function loyaltyCard()
|
|
{
|
|
return $this->belongsTo('App\LoyaltyCard','lcard_id','lcard_id');
|
|
}
|
|
|
|
}
|