<?php
namespace app\models;

use yii\db\ActiveRecord;

class AdminAction extends ActiveRecord
{
    public static function tableName()
    {
        return '{{%admin_action}}';
    }

    public function rules()
    {
        return [
            [['admin_email', 'action'], 'required'],
            [['comment'], 'string'],
            [['created_at'], 'safe'],
        ];
    }

    public function getProfile()
    {
        return $this->hasOne(EmployeeProfile::class, ['id' => 'profile_id']);
    }
}