43 lines
852 B
PHP
43 lines
852 B
PHP
<?php
|
|
|
|
namespace Modules\AssetExchange\Models;
|
|
|
|
use App\Business;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class MarketComp extends Model
|
|
{
|
|
protected $table = 'aex_market_comps';
|
|
|
|
protected $fillable = [
|
|
'business_id',
|
|
'listing_id',
|
|
'source',
|
|
'ie_competitive_benchmark_id',
|
|
'comp_title',
|
|
'manufacturer',
|
|
'model',
|
|
'year_manufactured',
|
|
'observed_price',
|
|
'currency',
|
|
'observed_date',
|
|
'notes',
|
|
];
|
|
|
|
protected $casts = [
|
|
'year_manufactured' => 'integer',
|
|
'observed_price' => 'integer',
|
|
'observed_date' => 'date',
|
|
];
|
|
|
|
public function business()
|
|
{
|
|
return $this->belongsTo(Business::class);
|
|
}
|
|
|
|
public function listing()
|
|
{
|
|
return $this->belongsTo(Listing::class, 'listing_id');
|
|
}
|
|
}
|