<?php

namespace app\models;

use Yii;
use yii\base\Model;

/**
 * Clientreport is the model behind the contact form.
 */
class Clientreport extends Model
{
    public $pid;

    /**
     * @return array the validation rules.
     */
    public function rules()
    {
        return [
		    ['pid', 'safe'],
            ['pid', 'required'],
        ];
    }
	
	public function getVisit()
    {
        $query = $this->hasOne(Visitmaster::className(), ['visit_code' => 'visit_code']);
        return $query;
    }

    /**
     * @return array customized attribute labels
     */
    public function attributeLabels()
    {
        return [
            'pid' => 'ICC Client ID',
        ];
    }
}
