* @day: 2017/11/02 */ namespace app\admin\model\auction; use crmeb\traits\ModelTrait; use crmeb\basic\BaseModel; /** * 图文管理 Model * Class WechatNews * @package app\admin\model\wechat */ class Auction extends BaseModel { use ModelTrait; protected $pk = 'id'; protected $name = 'auction'; public static function list($where) { $model = self::getAuctionWhere($where); if ($where['page'] && $where['limit']){ $model = self::page($where['page'], $where['limit']); }else{ $model = self::page(20, 1); } $data['count'] = self::count(); $data['data'] = self::select()->toArray(); return $data; } /** * 处理where条件 * @param $where * @return mixed */ public static function getAuctionWhere($where, $aler = '', $join = '') { $model = self::where('status', $where['status']); return $model; } }