'timestamp', 'finish_time' => 'timestamp', ]; /** * 状态字段转化 * @param $value * @param $data * @return mixed */ public function getTransferStatusNameAttr($value, $data) { if (empty($data['transfer_status'])) return ''; return TransferDict::getStatus()[$data['transfer_status']] ?? ''; } /** * 转账方式字段转化 * @param $value * @param $data * @return mixed */ public function getTransferTypeNameAttr($value, $data) { if (empty($data['transfer_type'])) return ''; $temp = TransferDict::getTransferType()[$data['transfer_type']] ?? []; return $temp['name'] ?? ''; } }