<?php
// +----------------------------------------------------------------------
// | A3Mall
// +----------------------------------------------------------------------
// | Copyright (c) 2020 http://www.a3-mall.com All rights reserved.
// +----------------------------------------------------------------------
// | Author: xzncit <158373108@qq.com>
// +----------------------------------------------------------------------

namespace app\adminapi\model;

use app\common\model\wechat\WechatAccountReply as WechatAccountReplyModel;

/**
 * @package app\adminapi\model
 * @class WechatAccountReply
 * @author xzncit 2024-02-01
 */
class WechatAccountReply extends WechatAccountReplyModel {

    /**
     * 增加查询条件
     * @param $query
     * @param $value
     * @param $data
     */
    public function searchTitleAttr($query, $value, $data){
        if(!empty($value)){
            $query->where("title","like","%".$value."%");
        }
    }

    /**
     * 增加查询条件
     * @param $query
     * @param $value
     * @param $data
     */
    public function searchActiveAttr($query, $value, $data){
        if(!empty($value) && is_numeric($value)){
            $query->where("type","=",$value);
        }
    }

}