Model.php
644 Bytes
<?php
namespace domain\model\models;
use yii\db\ActiveRecord;
use yii\behaviors\TimestampBehavior;
/**
* 机器型号
* Class Model
* @package domain\production\models
*/
class Model extends ActiveRecord
{
/**
* @inheritdoc
*/
public static function tableName()
{
return '{{%model}}';
}
/**
* @return array
*/
public function behaviors()
{
return [
'time' => [
'class' => TimestampBehavior::className(),
'createdAtAttribute' => 'created_at',
'updatedAtAttribute' => 'updated_at',
]
];
}
}