|
@@ -84,14 +84,14 @@ class GoodBasic extends Base
|
|
|
'isChild' =>'tinyint',//是否子商品
|
|
|
];
|
|
|
public function Unit(){
|
|
|
- return $this->hasOne('Unit','good_unit','id')->bind(["unit_name"]);
|
|
|
+ return $this->hasOne('Unit','id','good_unit')->bind(["unit_name"]);
|
|
|
}
|
|
|
public function Cat(){
|
|
|
- return $this->hasOne('Cat','cat_id','id')->bind(["cat_name","search"]);
|
|
|
+ return $this->hasOne('Cat','id','cat_id')->bind(["cat_name","search"]);
|
|
|
}
|
|
|
|
|
|
public function Brand(){
|
|
|
- return $this->hasOne('Brand','brand_id','id')->bind(["brand_name"]);
|
|
|
+ return $this->hasOne('Brand','id','brand_id')->bind(["brand_name"]);
|
|
|
}
|
|
|
|
|
|
public function getIsOnlineAttr($value,$data){
|