|
|
|
|
@ -17,6 +17,7 @@ class SupplyDemand extends SoftDeletesModel
|
|
|
|
|
if (empty($this->file_ids)) return [];
|
|
|
|
|
return Upload::whereIn('id', $this->file_ids)->get();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function user()
|
|
|
|
|
{
|
|
|
|
|
return $this->hasOne(User::class, 'id', 'user_id');
|
|
|
|
|
@ -27,5 +28,11 @@ class SupplyDemand extends SoftDeletesModel
|
|
|
|
|
return $this->hasMany(SupplyDemandKeep::class, 'supply_demand_id', 'id');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public function messages()
|
|
|
|
|
{
|
|
|
|
|
return $this->hasMany(Message::class, 'supply_demand_id', 'id');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|