<?php

namespace app\api\controller\ExaminationInformation;

use app\BaseController;
use app\common\model\ExaminationInformation\InfoArticleType as ModelinfoArticleType;
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 InfoArticleType extends BaseController
{
    /**
     * 获取资讯文章类型列表
     */
    public function getinfoArticleTypeList(Request $request): array
    {
        $params = $request->param();
        $con = [];

        $con = Tool::getOptionalQuery();

        $query = ModelinfoArticleType::where($con)
            ->field([
                'info_article_type_id',
                'info_article_type_name' => 'name',
            ])
            ->order('info_article_type_sort', 'asc')
            ->select();

            return msg(0, "获取资讯文章类型列表成功!", [
                'data' => $query,
                'count' => count($query)
            ]);
    }

}
