| 1234567891011121314151617181920212223 |
- <?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);
- }
- }
|