30 行
1.1 KiB
PHP
可执行文件
30 行
1.1 KiB
PHP
可执行文件
<?php
|
||
|
||
namespace Common\Model;
|
||
//[1.2.41]
|
||
class CashierModel extends BaseModel
|
||
{
|
||
protected $tableName = 'retail_cashier';
|
||
const ID = 'id'; //int(11) NOT NULL AUTO_INCREMENT,
|
||
const MOBILE = 'mobile'; //varchar(11) DEFAULT NULL COMMENT '收银员登录账号',
|
||
const PASSWORD = 'password'; //varchar(255) DEFAULT NULL COMMENT '登录密码',
|
||
const MERCHANT_ID = 'merchantid'; //int(11) DEFAULT NULL COMMENT '商户id',
|
||
const STORE_ID = 'storeid'; //int(11) DEFAULT NULL COMMENT '收银员所属门店id',
|
||
const ADD_TIME = 'addtime'; //varchar(11) DEFAULT NULL COMMENT '创建时间',
|
||
const STATUS = 'status'; //tinyint(1) DEFAULT '1' COMMENT '1:正常使用 2:已被删除',
|
||
const NAME = 'name'; //varchar(255) DEFAULT NULL COMMENT '收银员名字',
|
||
|
||
/**
|
||
* 获去数量
|
||
* @param $map
|
||
* @return mixed
|
||
*/
|
||
public function getCount($map)
|
||
{
|
||
if (!isset($map['status'])) {
|
||
$map['status'] = 1;
|
||
}
|
||
$res = $this->where($map)->count();
|
||
return $res;
|
||
}
|
||
} |