41 lines
731 B
PHP
41 lines
731 B
PHP
<?php
|
|
|
|
namespace app\crm\model;
|
|
|
|
use support\Model;
|
|
|
|
class Country extends Model
|
|
{
|
|
/**
|
|
* The table associated with the model.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $table = 'country';
|
|
|
|
/**
|
|
* The primary key associated with the table.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $primaryKey = 'id';
|
|
|
|
//设置黑名单
|
|
protected $guarded = ['id'];
|
|
|
|
// 指定日期字段存储格式为时间戳
|
|
protected $dateFormat = 'U';
|
|
|
|
/**
|
|
* Indicates if the model should be timestamped.
|
|
*
|
|
* @var bool
|
|
*/
|
|
public $timestamps = false;
|
|
|
|
public static function getAll()
|
|
{
|
|
$list = self::select('id','cn_addr','en_addr')->get();
|
|
return $list;
|
|
}
|
|
} |