| 123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <?php
- // +----------------------------------------------------------------------
- // | 商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ]
- // +----------------------------------------------------------------------
- // | Copyright (c) 2017~2021 https://www.thinkphp.com All rights reserved.
- // +----------------------------------------------------------------------
- // | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行
- // +----------------------------------------------------------------------
- // | Author: thinkphp <admin@yiovo.com>
- // +----------------------------------------------------------------------
- declare (strict_types=1);
- namespace app\common\model;
- use cores\BaseModel;
- /**
- * 生源学校模型类
- * Class SourceShoolApply
- * @package app\common\model
- */
- class SourceShoolApply extends BaseModel
- {
- protected $globalScope = [''];
- // 定义表名
- protected $name = 'source_shools_apply';
- // 定义主键
- protected $pk = 'id';
- /**
- * 获取老师已经申请的生源学校
- * @param $userId
- * @return array
- */
- public static function getSchoolsByUser($userId)
- {
- return self::where(['user_id'=> $userId,'status'=>1])
- ->column('source_shools_id');
- }
- }
|