MallGoods.php 609 B

12345678910111213141516171819202122232425
  1. <?php
  2. namespace addons\OperationCenter\common\models;
  3. use common\models\goods\Goods;
  4. /**
  5. * MallGoods class
  6. * @package addons\OperationCenter\common\models
  7. */
  8. class MallGoods extends Goods
  9. {
  10. /**
  11. * @return ActiveQueryInterface the relational query object.
  12. */
  13. public function getItemSetting()
  14. {
  15. return $this->hasOne(CommissionItemSetting::class, [
  16. 'item_id' => 'id',
  17. ])->andWhere(['item_type' => 'goods', 'status' => 1])->select([
  18. 'id', 'mall_id', 'is_partake', 'is_enable', 'item_id', 'item_type', 'settings', 'is_percent'
  19. ]);
  20. }
  21. }