36 lines
546 B
PHP
36 lines
546 B
PHP
<?php
|
|
|
|
|
|
|
|
namespace app\common\model\store;
|
|
|
|
|
|
use app\common\model\BaseModel;
|
|
|
|
class StorePrinter extends BaseModel
|
|
{
|
|
|
|
public static function tablePk(): ?string
|
|
{
|
|
return 'printer_id';
|
|
}
|
|
|
|
public static function tableName(): string
|
|
{
|
|
return 'store_printer';
|
|
}
|
|
|
|
|
|
public function searchStatusAttr($query,$value)
|
|
{
|
|
$query->where('status',$value);
|
|
}
|
|
|
|
public function searchKeywordAttr($query,$value)
|
|
{
|
|
$query->whereLike('printer_name|printer_terminal',"%{$value}%");
|
|
}
|
|
|
|
|
|
}
|