<?php
/**
 * Created by PhpStorm.
 * User: zengchaoxin
 * Date: 16/5/7
 * Time: 下午11:02
 */

namespace common\models;

use Yii;
use yii\behaviors\TimestampBehavior;
use yii\db\Expression;

class Base extends \yii\db\ActiveRecord
{
    public function behaviors()
    {
        return [
            [
                'class' => TimestampBehavior::className(),
                'createdAtAttribute' => 'created_at',
                'updatedAtAttribute' => 'updated_at',
                'value' => new Expression('NOW()'),
            ],
        ];
    }


    public static function model($className=__CLASS__)
    {
        return parent::model($className);
    }
}