<?php


namespace Heanup\App\Api\Package\Database;


use Heanup\Frame\Package\Database\Single;

class Num extends Single
{
    const CONFIG_CLASS = 'MySQL\\Core';
    protected static $tableName = 'phone_num';
    protected static $fields = [];
    protected static $primaryKey = 'id';
    public static function insert($data, $returnLastInsertId = true)
    {
        if (self::getOne(['country'=>$data['country'],'phone'=>$data['phone']])){
            return true;
        }
        return parent::insert($data, $returnLastInsertId);
    }

}