退换货

This commit is contained in:
TL 2022-08-17 10:55:09 +08:00
parent d2a9056802
commit dca5bdd4a3
2 changed files with 2 additions and 2 deletions

View File

@ -38,7 +38,7 @@ class Rma extends Base
public function reason() :BelongsTo
{
return $this->belongsTo(RmaReason::class)->where('locale', locale());
return $this->belongsTo(RmaReason::class, 'rma_reason_id', 'id')->where('locale', locale());
}
public function histories() :HasMany

View File

@ -31,7 +31,7 @@ class RmaDetail extends JsonResource
'product_name' => $this->product_name,
'name' => $this->name,
'sku' => $this->sku,
'reason' => $this->reason,
'reason' => $this->reason->name,
'type_text' => $this->type_text,
];
}