修改模型关联

This commit is contained in:
liu 2024-06-21 14:11:32 +08:00
parent 2232843ad1
commit 957f8ba187

View File

@ -4,6 +4,7 @@ namespace app\common\model\store_branch_product_attr_value;
use app\common\model\BaseModel;
use app\common\model\store_branch_product\StoreBranchProduct;
use app\common\model\store_product_attr_value\StoreProductAttrValue;
use think\model\concern\SoftDelete;
@ -21,7 +22,7 @@ class StoreBranchProductAttrValue extends BaseModel
public function attr()
{
return $this->hasOne(StoreProductAttrValue::class, 'unique', 'unique')->bind(['image']);
return $this->hasOne(StoreBranchProduct::class, 'product_id', 'product_id')->bind(['image']);
}
}