|
|
@@ -133,6 +133,22 @@ class Order extends Model
|
|
|
return $this->belongsTo(OrderStatus::class);
|
|
|
}
|
|
|
|
|
|
+ public function photos(): BelongsToMany
|
|
|
+ {
|
|
|
+ return $this->belongsToMany(File::class, 'order_file', 'order_id', 'file_id');
|
|
|
+ }
|
|
|
+
|
|
|
+ public function documents(): BelongsToMany
|
|
|
+ {
|
|
|
+ return $this->belongsToMany(File::class, 'order_file', 'order_id', 'file_id');
|
|
|
+ }
|
|
|
+
|
|
|
+ public function statements(): BelongsToMany
|
|
|
+ {
|
|
|
+ return $this->belongsToMany(File::class, 'order_file', 'order_id', 'file_id');
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
|
|
|
public function getNeeds(): array
|
|
|
{
|