25 lines
635 B
PHP
Executable File
25 lines
635 B
PHP
Executable File
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class MarketReport extends Model
|
|
{
|
|
protected $guarded = array('id');
|
|
public $table = "market_reports";
|
|
|
|
public function client_info(){
|
|
return $this->hasOne('App\Models\Client', 'id', 'client');
|
|
}
|
|
public function payment_info(){
|
|
return $this->hasOne('App\Models\PaymentType', 'id', 'payment_type');
|
|
}
|
|
public function auth_user_info(){
|
|
return $this->hasOne('App\Models\Account', 'id', 'auth_user_id');
|
|
}
|
|
public function sam_comment_info(){
|
|
return $this->hasMany('App\Models\SamComment', 'report_id', 'id');
|
|
}
|
|
}
|