<?php

namespace app\admin\model\user;

use crmeb\basic\BaseModel;
use crmeb\traits\ModelTrait;

/**
 * Class UserChannel
 * @package app\admin\model\user
 */
class UserChannel extends BaseModel
{
    /**
     * 数据表主键
     * @var string
     */
    protected $pk = 'id';

    /**
     * 模型名称
     * @var string
     */
    protected $name = 'dict_channels';

    use ModelTrait;

    /**
     * @param $where
     * @return array
     */
    public static function getList($where)
    {

        $data = self::page((int)$where['page'], (int)$where['limit'])->select();
        $count = $data->count();
        return compact('count', 'data');
    }
}
