where(['status'=>1])->select(); } public function getBatchList(){ return (new GoodsBatch())->select(); } public function goods() { return $this->belongsTo('Goods', 'goods_id', 'id', [], 'LEFT')->setEagerlyType(0); } }