OutInterface.php 476 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. namespace app\model\out;
  3. use crmeb\basic\BaseModel;
  4. use crmeb\traits\ModelTrait;
  5. class OutInterface extends BaseModel
  6. {
  7. use ModelTrait;
  8. /**
  9. * 数据表主键
  10. * @var string
  11. */
  12. protected $pk = 'id';
  13. /**
  14. * 模型名称
  15. * @var string
  16. */
  17. protected $name = 'out_interface';
  18. public function searchTypeAttr($query, $value)
  19. {
  20. if ($value !== '') {
  21. $query->where('type', $value);
  22. }
  23. }
  24. }