add new fields

This commit is contained in:
king199025 committed 2018-10-11 17:38:49 +03:00
1 parent 5e2bc02bb5
commit 43557838ac
5 files changed
+160

No files matched your search

+14
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}
*/