12345678910111213141516171819202122232425262728 |
- <?php
- namespace app\common\model;
- use think\Model;
- /**
- * 用户模型
- */
- class User extends Model
- {
- protected $name = 'StoreMember';
- //protected $resultSetType = 'collection';// 设置返回类型
- public function wallet()
- {
- return $this->hasOne('UserWallet','user_id','id');
- }
- // 批量获取员工信息
- public static function getUserList($ids,$field = "*")
- {
- return static::field($field)->where('id','in',$ids)->select()->toArray();
- }
- }
|