You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
558 B

<?php
namespace App\Models;
use Illuminate\Support\Facades\Cache;
class Message extends SoftDeletesModel
{
public function user()
{
return $this->hasOne(User::class, 'id', 'user_id');
}
public function toUser()
{
return $this->hasOne(User::class, 'id', 'to_user_id');
}
public function supplyDemand()
{
return $this->hasOne(SupplyDemand::class, 'id', 'supply_demand_id');
}
public function dialogue()
{
return $this->hasOne(Dialogue::class, 'id', 'dialogue_id');
}
}