catchAdmin/catch/system/model/SensitiveWord.php
2020-06-21 10:50:05 +08:00

43 lines
1.2 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
// +----------------------------------------------------------------------
// | CatchAdmin [Just Like ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017~2020 http://catchadmin.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( https://github.com/yanwenwu/catch-admin/blob/master/LICENSE.txt )
// +----------------------------------------------------------------------
// | Author: JaguarJack [ njphper@gmail.com ]
// +----------------------------------------------------------------------
namespace catchAdmin\system\model;
use catchAdmin\permissions\model\Users;
use catcher\base\CatchModel;
class SensitiveWord extends CatchModel
{
protected $name = 'sensitive_word';
protected $field = [
'id', //
'word', // 词汇
'creator_id', // 创建人ID
'created_at', // 创建时间
'updated_at', // 更新时间
'deleted_at', // 删除时间
];
/**
* 词汇查询
*
* @time 2020年06月17日
* @param $query
* @param $value
* @param $data
* @return mixed
*/
public function searchWordAttr($query, $value, $data)
{
return $query->whereLike('word', $value);
}
}