__('Type box_exchange'), 'refund' => __('Type refund'), 'withdrawal' => __('Type withdrawal'), 'to_coin' => __('Type to_coin'), 'withdrawal_fail' => __('Type withdrawal_fail'), 'withdrawals' => __('Type withdrawals')]; } public function getTypeTextAttr($value, $data) { $value = $value ? $value : (isset($data['type']) ? $data['type'] : ''); $list = $this->getTypeList(); return isset($list[$value]) ? $list[$value] : ''; } public function getCreateTimeTextAttr($value, $data) { $value = $value ? $value : (isset($data['create_time']) ? $data['create_time'] : ''); return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value; } public function getUpdateTimeTextAttr($value, $data) { $value = $value ? $value : (isset($data['update_time']) ? $data['update_time'] : ''); return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value; } public function getDeleteTimeTextAttr($value, $data) { $value = $value ? $value : (isset($data['delete_time']) ? $data['delete_time'] : ''); return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value; } protected function setCreateTimeAttr($value) { return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value); } protected function setUpdateTimeAttr($value) { return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value); } protected function setDeleteTimeAttr($value) { return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value); } }