52 lines
1.1 KiB
PHP
52 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace Modules\AssetExchange\Models;
|
|
|
|
use App\Contact;
|
|
use App\User;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class PriceInquiryRecipient extends Model
|
|
{
|
|
protected $table = 'aex_price_inquiry_recipients';
|
|
|
|
protected $fillable = [
|
|
'business_id',
|
|
'price_inquiry_id',
|
|
'recipient_type',
|
|
'contact_id',
|
|
'user_id',
|
|
'status',
|
|
'quoted_price',
|
|
'currency',
|
|
'quote_notes',
|
|
'sent_at',
|
|
'viewed_at',
|
|
'notified_at',
|
|
'responded_at',
|
|
];
|
|
|
|
protected $casts = [
|
|
'quoted_price' => 'integer',
|
|
'sent_at' => 'datetime',
|
|
'viewed_at' => 'datetime',
|
|
'notified_at' => 'datetime',
|
|
'responded_at' => 'datetime',
|
|
];
|
|
|
|
public function inquiry()
|
|
{
|
|
return $this->belongsTo(PriceInquiry::class, 'price_inquiry_id');
|
|
}
|
|
|
|
public function contact()
|
|
{
|
|
return $this->belongsTo(Contact::class, 'contact_id');
|
|
}
|
|
|
|
public function user()
|
|
{
|
|
return $this->belongsTo(User::class, 'user_id');
|
|
}
|
|
}
|