1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <?php
- namespace catchAdmin\alarm\model;
- use catcher\base\CatchModel as Model;
- class RfidWithBw extends Model
- {
- // 表名
- public $name = 'rfid_with_bw';
- // 数据库字段映射
- public $field = array(
- 'id',
- // 黑白名单id
- 'bw_id',
- // 标签
- 'rfid',
- 'rfid_type',
- // 创建人ID
- 'creator_id',
- // 创建时间
- 'created_at',
- // 更新时间
- 'updated_at',
- // 软删除
- 'deleted_at',
- );
- public function getList()
- {
- $res=$this->catchSearch()
-
- ->order($this->aliasField('id'), 'desc')
- ->paginate();
- return $res;
- }
- //根据姓名搜索
- public function searchBwIdAttr($query, $value, $data)
- {
- return $query->where('bw_id', $value);
- }
- }
|