<?php

namespace app\model\project;

use think\Model;

class User extends Model
{

    protected $name = 'user';

    protected $autoWriteTimestamp = true;

    protected $createTime = 'create_time';

    protected $hidden = ['password','token','salt'];

    public function getSchoolData()
    {
        return $this->hasOne(School::class, 'user_id', 'id');
    }

    public function getBusinessData()
    {
        return $this->hasOne(Business::class, 'user_id', 'id');
    }


}