12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- <?php
- namespace App\Models;
- use App\Models\BaseModel;
- /**
- * @description 用户表
- * @author system;
- * @version 1.0
- * @date 2017-05-30 12:16:56
- *
- */
- class UserInfoModel extends BaseModel
- {
- /**
- * 数据表名
- *
- * @var string
- *
- */
- protected $table = 'user_info';
- /**
- 主键
- */
- protected $primaryKey = 'id';
- //分页
- protected $perPage = PAGE_NUMS;
- /**
- * 可以被集体附值的表的字段
- *
- * @var string
- */
- protected $fillable = [
- 'password',
- 'email',
- 'area',
- 'name',
- 'vip',
- 'level',
- 'idcard',
- 'contact',
- 'prize',
- 'openid',
- 'remember_token'
- ];
- public function UserCareUser()
- {
- return $this->belongsToMany('App\Models\UserInfoModel','user_care_user','user_id','other_user_id');
- }
- }
|