<?php

namespace common\models;

use Yii;
use common\components\giro\GiroDETSTA;
use yii\db\BaseActiveRecord;

/**
 * This is the model class for table "message_detsta".
 *
 * @property integer $id_message
 * @property string $path
 * @property integer $id_user
 * @property string $created_at
 * @property string $updated_at
 */
class MessageDetsta extends BaseFitnessActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'message_detsta';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id_message' => Yii::t('common/message_detsta', 'Id Message'),
            'path' => Yii::t('common/message_detsta', 'Path'),
            'id_user' => Yii::t('common/message_detsta', 'Id User'),
            'created_at' => Yii::t('common/message_detsta', 'Created At'),
            'updated_at' => Yii::t('common/message_detsta', 'Updated At'),
        ];
    }
    
    public function getFej( ) {
    	return $this->hasOne(MessageDetstaFej::className(), ['id_message' => 'id_message']);
    }
    public function getLab( ) {
    	return $this->hasOne(MessageDetstaLab::className(), ['id_message' => 'id_message']);
    }
    public function getTetelek( ) {
    	return $this->hasMany(MessageDetstaTetel::className(), ['id_message' => 'id_message']);
    }
    
    
    
    
}
