Upgrade.php 649 Bytes
<?php

namespace domain\upgrade\models;

use yii\db\ActiveRecord;
use yii\behaviors\TimestampBehavior;

/**
 * 版本管理
 * Class Upgrade
 * @package domain\upgrade\models
 */
class Upgrade extends ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%upgrade}}';
    }

    /**
     * @return array
     */
    public function behaviors()
    {
        return [
            'time' => [
                'class' => TimestampBehavior::className(),
                'createdAtAttribute' => 'created_at',
                'updatedAtAttribute' => 'updated_at',
            ]
        ];
    }
}