CpsChannel.php 397 B

1234567891011121314151617181920212223
  1. <?php
  2. namespace app\common\model;
  3. /**
  4. * 渠道冻结表
  5. * @author Administrator
  6. */
  7. class CpsChannel extends \think\Model
  8. {
  9. protected $pk = 'id';
  10. protected $table= 'cy_cps_channel';
  11. /**
  12. * 一对一关联,获取渠道名称
  13. * @return $this
  14. */
  15. public function Channel()
  16. {
  17. return $this->hasOne('Channel','id','channel_id')->field('name');
  18. }
  19. }