'ID', 'mall_id' => 'Mall ID', 'user_id' => 'User ID', 'goods_id' => 'Goods ID', 'created_at' => 'Created At', 'updated_at' => 'Updated At', 'deleted_at' => 'Deleted At', 'is_delete' => 'Is Delete', ]; } public function getAttr() { return $this->hasMany(GoodsAttr::class, ['goods_id' => 'goods_id'])->andWhere(['is_delete' => 0]); } public function getGoodsWarehouse() { return $this->hasOne(GoodsWarehouse::className(), ['id' => 'goods_warehouse_id']); } public function getMallGoods() { return $this->hasOne(MallGoods::className(), ['goods_id' => 'id']); } }