format('Y-m-d H:i:s'); } public function dept(){ return $this->hasOne(SysDept::class,'dept_id','doctor_dept_id')->select('dept_id','dept_name'); } public function user(){ return $this->hasOne(SysUser::class,'user_id','join_doctor_user_id') ->select('user_id','user_name'); } }