<?php

namespace App\Services;

use App\CarType;
use App\Traits\ServiceAppAop;


class CarTypeService
{
    use ServiceAppAop;
    protected $modelClass=CarType::class;
    /*
     * array | string $column
     * 默认一些select字段,可传递string 或 array来指定select字段
     */
    public function getSelection($column = ['id','name']){
        if (!is_array($column)) {
            $column = [$column];
        }
        return CarType::query()->select($column)->get();
    }

}
