__('Platform android'), 'ios' => __('Platform ios'), 'applets' => __('Platform applets'), 'h5' => __('Platform h5')]; } public function getPlatformTextAttr($value, $data) { $value = $value ? $value : (isset($data['platform']) ? $data['platform'] : ''); $list = $this->getPlatformList(); 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); } }