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.

29 lines
517 B

6 months ago
<?php
namespace App\Models;
class Dialogue 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');
}
4 months ago
public function supplyDemand()
{
6 months ago
return $this->hasOne(SupplyDemand::class, 'id', 'supply_demand_id');
}
4 months ago
public function messages()
{
return $this->hasMany(Message::class, 'dialogue_id', 'id');
}
6 months ago
}