修改模型关联
This commit is contained in:
parent
2232843ad1
commit
957f8ba187
@ -4,6 +4,7 @@ namespace app\common\model\store_branch_product_attr_value;
|
|||||||
|
|
||||||
|
|
||||||
use app\common\model\BaseModel;
|
use app\common\model\BaseModel;
|
||||||
|
use app\common\model\store_branch_product\StoreBranchProduct;
|
||||||
use app\common\model\store_product_attr_value\StoreProductAttrValue;
|
use app\common\model\store_product_attr_value\StoreProductAttrValue;
|
||||||
use think\model\concern\SoftDelete;
|
use think\model\concern\SoftDelete;
|
||||||
|
|
||||||
@ -21,7 +22,7 @@ class StoreBranchProductAttrValue extends BaseModel
|
|||||||
|
|
||||||
public function attr()
|
public function attr()
|
||||||
{
|
{
|
||||||
return $this->hasOne(StoreProductAttrValue::class, 'unique', 'unique')->bind(['image']);
|
return $this->hasOne(StoreBranchProduct::class, 'product_id', 'product_id')->bind(['image']);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user