__('审核中'), 'reject' => __('拒绝'), 'allow' => __('通过')]; } public function getStatusTextAttr($value, $data) { $value = $value ? $value : (isset($data['status']) ? $data['status'] : ''); $list = $this->getStatusList(); return isset($list[$value]) ? $list[$value] : ''; } public function massager() { return $this->belongsTo(Massager::class, 'massager_id', 'id', [], 'LEFT')->setEagerlyType(0); } public function findByMIdAndYm($m_id, $city_code, $year, $month) { return $this->where([ "massager_id" => $m_id, "city_code" => $city_code, "year" => $year, "month" => $month ])->where("status", "in", [\E_BASE_STATUS::Checking, "allow"]) ->order("id", "desc")->find(); } public function fetchByMassasger($m_id, $page, $size) { return $this->where([ "massager_id" => $m_id, ])->order("updatetime", "desc") ->page($page) ->paginate($size); } }