<?php
class beautifulNumberModule extends Model
{
    public function __construct()
    {
        parent::__construct("sl_beautiful_number");
    }

    //查询所有用户的number
    public function getAllUserNumber(){
        $data = $this->find("number")->all();
        $number = [];
        foreach ($data as &$v){
            $number[] = $v["number"];
        }
        return $number;
    }
    //查询一个靓号
    public function getOneNumber($number){
        $one = $this->where(['number'=>$number,'is_sell'=>2,'type'=>1])->one();
        return $one;
    }
}