Browse Source

商品拼单位

master
weigang 5 years ago
parent
commit
2985a2abca
  1. 5
      app/Model/v3/Goods.php
  2. 5
      app/Model/v3/GoodsActivity.php

5
app/Model/v3/Goods.php

@ -125,6 +125,11 @@ class Goods extends Model
});
}
public function getNameAttribute($value)
{
return $value . ' ' . $this->attributes['goods_unit'];
}
public function store()
{
return $this->belongsTo(Store::class, 'store_id', 'id');

5
app/Model/v3/GoodsActivity.php

@ -94,6 +94,11 @@ class GoodsActivity extends Model
return $this->attachmentService->switchImgToAliOss($value, OssThumbnail::THUMBNAIL_600_Q90);
}
public function getNameAttribute($value)
{
return $value . ' ' . $this->attributes['goods_unit'];
}
public function store()
{
return $this->belongsTo(Store::class, 'store_id', 'id');

Loading…
Cancel
Save