WechatTemplateMsgs.php 738 B

123456789101112131415161718192021222324252627
  1. <?php
  2. namespace App\Modules\OfficialAccount\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. class WechatTemplateMsgs extends Model
  5. {
  6. protected $connection = 'api_mysql';
  7. protected $tables = 'wechat_template_msgs';
  8. protected $fillable = ['template_id','name','send_time','appid','template_content','redirect_url','status','remark','distribution_channel_id','subscribe_time','sex','balance','order_type','category_id','user_num','del_flag','is_full_send','is_show_list','description','book_name','chapter_name','is_activity'];
  9. /**
  10. * 根据id获取模板消息
  11. */
  12. static function wechatTemplateMsgsById($id)
  13. {
  14. return self::where('id', isset($id) ? $id : '')->first();
  15. }
  16. }