add new fields

This commit is contained in:
king199025
2018-10-11 17:38:49 +03:00
parent 5e2bc02bb5
commit 43557838ac
5 changed files with 160 additions and 0 deletions

View File

@ -3,6 +3,8 @@
namespace common\models;
use Yii;
use yii\behaviors\TimestampBehavior;
use yii\db\Expression;
/**
* This is the model class for table "company".
@ -27,6 +29,18 @@ class Company extends \yii\db\ActiveRecord
return 'company';
}
public function behaviors()
{
return [
[
'class' => TimestampBehavior::class,
'createdAtAttribute' => 'created_at',
'updatedAtAttribute' => 'updated_at',
'value' => new Expression('NOW()'),
],
];
}
/**
* {@inheritdoc}
*/