Your IP : 216.73.216.79


Current Path : /var/www/html/mtdc/backend/models/networking/
Upload File :
Current File : /var/www/html/mtdc/backend/models/networking/NetworkingExpertsDetails.php.20210712

<?php

namespace backend\models\networking;

use Yii;
use yii\behaviors\TimestampBehavior;
use yii\behaviors\BlameableBehavior;
use yii\db\Expression;
use yii\db\ActiveRecord;
use asinfotrack\yii2\audittrail\behaviors\AuditTrailBehavior;

/**
 * This is the model class for table "networking_experts_details".
 *
 * @property int $id
 * @property int $experts_id
 * @property string $qualification
 * @property string $working_experience
 * @property string $year_survive
 * @property string $skills
 * @property int $created_by
 * @property string $created_at
 * @property int $updated_by
 * @property int $updated_at
 */
class NetworkingExpertsDetails extends \yii\db\ActiveRecord {

    /**
     * {@inheritdoc}
     */
    public static function tableName() {
        return 'networking_experts_details';
    }

    public function behaviors() {
        return [
            'audittrail' => [
                'class' => AuditTrailBehavior::className(),
                // some of the optional configurations
                'ignoredAttributes' => ['created_at', 'updated_at'],
                'consoleUserId' => 1,
                'attributeOutput' => [
                    'desktop_id' => function ($value) {
                        $model = Desktop::findOne($value);
                        return sprintf('%s %s', $model->manufacturer, $model->device_name);
                    },
                    'last_checked' => 'datetime',
                ],
            ],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function rules() {
        return [
            [['experts_id', 'created_by', 'updated_by'], 'integer'],
            [['qualification', 'working_experience', 'year_survive', 'skills'], 'string'],
            [['created_at', 'updated_at', 'area_expertise'], 'safe'],
            [['year_survive'], 'number'],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels() {
        return [
            'id' => Yii::t('app', 'ID'),
            'experts_id' => Yii::t('app', 'Experts ID'),
            'qualification' => Yii::t('app', 'Qualification'),
            'working_experience' => Yii::t('app', 'Working Experience'),
            'year_survive' => Yii::t('app', 'Year Began Service'),
            'skills' => Yii::t('app', 'Skills'),
            'created_by' => Yii::t('app', 'Created By'),
            'created_at' => Yii::t('app', 'Created At'),
            'updated_by' => Yii::t('app', 'Updated By'),
            'updated_at' => Yii::t('app', 'Updated At'),
            'area_expertise' => Yii::t('app', 'Area Expertise'),
        ];
    }

}