RensheCode.php 435 B

123456789101112131415161718192021222324
  1. <?php
  2. namespace app\common\model;
  3. use think\Model;
  4. class RensheCode extends Model
  5. {
  6. // 设置字段信息
  7. protected $schema = [
  8. 'id' => 'int',
  9. 'name' => 'string',
  10. 'code' => 'string',
  11. 'type' => 'string',
  12. ];
  13. /**
  14. * 根据类型获取列表
  15. */
  16. public static function getList($type)
  17. {
  18. return self::where('type', $type)->field('id,name,code')->select();
  19. }
  20. }