RensheCodeModel.php 376 B

123456789101112131415161718192021
  1. <?php
  2. namespace app\common\model\odd_job;
  3. use think\Model;
  4. class RensheCodeModel extends Model
  5. {
  6. protected $connection = 'odd_job';
  7. //设置表名
  8. protected $name = 'renshe_code';
  9. /**
  10. * 根据类型获取列表
  11. */
  12. public static function getList($type)
  13. {
  14. return self::where('type', $type)->field('id,name,code')->select();
  15. }
  16. }