<?php

namespace app\api\controller\TeachersStrength;

use app\BaseController;
use app\common\model\TeachersStrength\Subject as ModelSubject;
use app\Request;
use think\Validate;
use think\exception\ValidateException;
use think\facade\Filesystem;
use app\common\arw\adjfut\src\Excel;
use app\common\arw\adjfut\src\UploadFile;
use think\facade\Db;
use app\common\exception\Tool;
use think\facade\Env;


class Subject extends BaseController
{
    /**
     * 获取授课科目列表
     */
    public function getSubjectList(Request $request): array
    {
        $params = $request->param();
        $con = [];

        $query = ModelSubject::where($con)
            ->field([
                'subject_id',
                'subject_name' => 'name',
            ])
            ->order('subject_sort', 'asc')
            ->select()
            ;

        return msg(0, "获取授课科目列表成功!", [
            'data' => $query,
            'count' => count($query)
        ]);
    }

}
