<?php

namespace app\api\controller\AboutUs\TeachingEnvir;

use app\BaseController;
use app\common\model\AboutUs\TeachingEnvir\TeachingEnvirType as ModelTeachingEnvirType;
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 app\common\exception\Tool;
use app\common\arw\adjfut\src\Traverse;
use think\facade\Db;
use think\facade\Env;


class TeachingEnvirType extends BaseController
{
    /**
     * 获取教学环境类型列表接口
     *
     * @param Request request
     * @return array
     * @date 2023-04-22
     * @author xjh
     * @since 1.0.0
     */
    public function getTeachingEnvirTypeList(Request $request): array
    {
        $select  = ModelTeachingEnvirType::field(['teaching_envir_type_id', 'teaching_envir_type_name' => 'name'])
            ->where('teaching_envir_type_parent_guid', "0")
            ->order('teaching_envir_type_order')
            ->select();

        return msg(0, "获取环境类型列表成功!", [
            'data' => $select,
            'count' => count($select)
        ]);
    }
}
