unioil-mobile-api/app/PromotionStations.php

56 lines
943 B
PHP

<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class PromotionStations extends Model
{
/**
* Table name of model
*
* @var string
*/
protected $table = 'promotion_stations';
/**
* Primary key field name of table
*
* @var string
*/
protected $primaryKey = 'ps_id';
/**
* Additional fields from other connected tables
*
* @var array
*/
protected $appends = [];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [];
/**
* The attributes that should be mutated to dates.
*
* @var array
*/
protected $dates = [];
/**
* Enable / Disable timestamp saving
*
* @var array
*/
public $timestamps = false;
public function station()
{
return $this->hasOne('App\Station','station_id','station_id');
}
}