123456789101112131415161718192021222324252627282930313233343536 |
- <?php
- namespace App\Http\Controllers\Channel\OfficialAccount\Transformers;
- class CustomSendMsgsTransformers
- {
- public function transform($customSendMsgs){
- return [
- 'id' => $customSendMsgs->id,
- 'appid' => $customSendMsgs->appid,
- 'name' => $customSendMsgs->name,
- 'send_time' => $customSendMsgs->send_time,
- 'content' => $customSendMsgs->content,
- 'description' => isset($customSendMsgs->description)?$customSendMsgs->description:'',
- 'is_activity' => isset($customSendMsgs->is_activity)?$customSendMsgs->is_activity:'0',
- 'redirect_url' => $customSendMsgs->redirect_url,
- 'status' => $customSendMsgs->status,
- 'distribution_channel_id' => $customSendMsgs->distribution_channel_id,
- 'subscribe_time' => $customSendMsgs->subscribe_time,
- 'sex' => $customSendMsgs->sex,
- 'balance' => $customSendMsgs->balance,
- 'order_type' => $customSendMsgs->order_type,
- 'category_id' => $customSendMsgs->category_id,
- 'is_full_send' => $customSendMsgs->is_full_send,
- 'user_num' => $customSendMsgs->user_num,
- 'uv' => isset($customSendMsgs->uv)?$customSendMsgs->uv:'',
- 'pv' => isset($customSendMsgs->pv)?$customSendMsgs->pv:'',
- 'register_user_num' => isset($customSendMsgs->register_user_num)?$customSendMsgs->register_user_num:'',
- 'pay_user_num' => isset($customSendMsgs->pay_user_num)?$customSendMsgs->pay_user_num:'',
- 'charge_amount' => isset($customSendMsgs->charge_amount)?$customSendMsgs->charge_amount:'',
- 'book_name' => isset($customSendMsgs->book_name)?$customSendMsgs->book_name:'',
- 'chapter_name' => isset($customSendMsgs->chapter_name)?$customSendMsgs->chapter_name:'',
- 'user_category' => isset($customSendMsgs->user_category)?$customSendMsgs->user_category:'',
- ];
- }
- }
|