$this->id])->column('staff_id'); return $ids?implode(',',$ids):''; } public function staff() { return $this->hasOne(Staff::class, 'id', 'staff_id')->field('id,name,img'); } //获取审批人 public function getFlowAttr($value){ return json_decode($value,true); } // public function getCreatetimeAttr($value){ return date('Y-m-d H:i:s',$value); } //团队业绩 public function teamAchievement() { return $this->belongsTo(Achievement::class, 'id', 'obj_id')->where(['type' => 2]); } }