<?php

namespace app\common\model;

use think\Model;

class RensheCode extends Model
{
    // 设置字段信息
    protected $schema = [
        'id'   => 'int',
        'name' => 'string',
        'code' => 'string',
        'type' => 'string',
    ];

    /**
     * 根据类型获取列表
     */
    public static function getList($type)
    {
        return self::where('type', $type)->field('id,name,code')->select();
    }
}