|
...
|
...
|
@@ -97,70 +97,70 @@ class Product extends Base |
|
|
|
}
|
|
|
|
return $value;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function setAttrsAttribute($value){
|
|
|
|
$this->attributes['attrs'] = Arr::a2s($value);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getAttrsAttribute($value){
|
|
|
|
return Arr::s2a($value);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function setDescribeAttribute($value){
|
|
|
|
$this->attributes['describe'] = Arr::a2s($value);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getDescribeAttribute($value){
|
|
|
|
return Arr::s2a($value);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function setSeoMateAttribute($value){
|
|
|
|
$this->attributes['seo_mate'] = Arr::a2s($value);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getSeoMateAttribute($value){
|
|
|
|
return Arr::s2a($value);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function setCategoryIdAttribute($value){
|
|
|
|
$this->attributes['category_id'] = ','.Arr::arrToSet($value).',';
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getCategoryIdAttribute($value){
|
|
|
|
return Arr::setToArr(trim($value,','));
|
|
|
|
}
|
|
|
|
|
|
|
|
public function setAttrIdAttribute($value){
|
|
|
|
$this->attributes['attr_id'] = Arr::arrToSet($value);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getAttrIdAttribute($value){
|
|
|
|
return Arr::setToArr($value);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function setDescribeIdAttribute($value){
|
|
|
|
$this->attributes['describe_id'] = Arr::arrToSet($value);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getDescribeIdAttribute($value){
|
|
|
|
return Arr::setToArr($value);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function setKeywordIdAttribute($value){
|
|
|
|
$this->attributes['keyword_id'] = ','.Arr::arrToSet($value).',';
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getKeywordIdAttribute($value){
|
|
|
|
return Arr::setToArr(trim($value,','));
|
|
|
|
}
|
|
|
|
|
|
|
|
public function setRelatedProductIdAttribute($value){
|
|
|
|
$this->attributes['related_product_id'] = Arr::arrToSet($value);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getRelatedProductIdAttribute($value){
|
|
|
|
return Arr::setToArr($value);
|
|
|
|
}
|
|
|
|
//
|
|
|
|
// public function setAttrsAttribute($value){
|
|
|
|
// $this->attributes['attrs'] = Arr::a2s($value);
|
|
|
|
// }
|
|
|
|
//
|
|
|
|
// public function getAttrsAttribute($value){
|
|
|
|
// return Arr::s2a($value);
|
|
|
|
// }
|
|
|
|
//
|
|
|
|
// public function setDescribeAttribute($value){
|
|
|
|
// $this->attributes['describe'] = Arr::a2s($value);
|
|
|
|
// }
|
|
|
|
//
|
|
|
|
// public function getDescribeAttribute($value){
|
|
|
|
// return Arr::s2a($value);
|
|
|
|
// }
|
|
|
|
//
|
|
|
|
// public function setSeoMateAttribute($value){
|
|
|
|
// $this->attributes['seo_mate'] = Arr::a2s($value);
|
|
|
|
// }
|
|
|
|
//
|
|
|
|
// public function getSeoMateAttribute($value){
|
|
|
|
// return Arr::s2a($value);
|
|
|
|
// }
|
|
|
|
//
|
|
|
|
// public function setCategoryIdAttribute($value){
|
|
|
|
// $this->attributes['category_id'] = ','.Arr::arrToSet($value).',';
|
|
|
|
// }
|
|
|
|
//
|
|
|
|
// public function getCategoryIdAttribute($value){
|
|
|
|
// return Arr::setToArr(trim($value,','));
|
|
|
|
// }
|
|
|
|
//
|
|
|
|
// public function setAttrIdAttribute($value){
|
|
|
|
// $this->attributes['attr_id'] = Arr::arrToSet($value);
|
|
|
|
// }
|
|
|
|
//
|
|
|
|
// public function getAttrIdAttribute($value){
|
|
|
|
// return Arr::setToArr($value);
|
|
|
|
// }
|
|
|
|
//
|
|
|
|
// public function setDescribeIdAttribute($value){
|
|
|
|
// $this->attributes['describe_id'] = Arr::arrToSet($value);
|
|
|
|
// }
|
|
|
|
//
|
|
|
|
// public function getDescribeIdAttribute($value){
|
|
|
|
// return Arr::setToArr($value);
|
|
|
|
// }
|
|
|
|
//
|
|
|
|
// public function setKeywordIdAttribute($value){
|
|
|
|
// $this->attributes['keyword_id'] = ','.Arr::arrToSet($value).',';
|
|
|
|
// }
|
|
|
|
//
|
|
|
|
// public function getKeywordIdAttribute($value){
|
|
|
|
// return Arr::setToArr(trim($value,','));
|
|
|
|
// }
|
|
|
|
//
|
|
|
|
// public function setRelatedProductIdAttribute($value){
|
|
|
|
// $this->attributes['related_product_id'] = Arr::arrToSet($value);
|
|
|
|
// }
|
|
|
|
//
|
|
|
|
// public function getRelatedProductIdAttribute($value){
|
|
|
|
// return Arr::setToArr($value);
|
|
|
|
// }
|
|
|
|
|
|
|
|
// public static function getNumByProjectId($project_id){
|
|
|
|
// return self::where('project_id', $project_id)->where('status', self::STATUS_ON)->count();
|
...
|
...
|
|