ultimatepos/Modules/AssetExchange/Models/CatalogMatch.php

40 lines
769 B
PHP

<?php
namespace Modules\AssetExchange\Models;
use App\User;
use Illuminate\Database\Eloquent\Model;
class CatalogMatch extends Model
{
protected $table = 'aex_catalog_matches';
protected $fillable = [
'business_id',
'listing_id',
'catalog_type',
'catalog_id',
'catalog_label',
'match_score',
'match_reason',
'status',
'confirmed_by',
'confirmed_at',
];
protected $casts = [
'match_score' => 'float',
'confirmed_at' => 'datetime',
];
public function listing()
{
return $this->belongsTo(Listing::class, 'listing_id');
}
public function confirmer()
{
return $this->belongsTo(User::class, 'confirmed_by');
}
}