<?php namespace app\model; use DateTimeInterface; use support\Model; class SysApi extends Model { protected $table = "sys_api"; protected $primaryKey = 'api_id'; protected $dateFormat = 'U'; protected $keyType = 'string'; const CREATED_AT = 'api_addtimes'; const UPDATED_AT = null; protected function serializeDate(DateTimeInterface $date) { return $date->format('Y-m-d H:i:s'); } }