12345678910111213141516171819 |
- <?php
- namespace App\Models;
- use Illuminate\Database\Eloquent\Model;
- use Illuminate\Database\Eloquent\SoftDeletes;
- class StoreGoodsSku extends Model{
- use SoftDeletes;
- protected $connection = 'mysql_w';
- protected $table='goods_sku';
- public function goods(){
- return $this->belongsTo(StoreGoods::class,'goods_id');
- }
- public function getPriceAttribute($value){
- return round($value);
- }
- }
|