<?php

namespace modules\custom\models;

use Yii;
use modules\users\models\User;
/**
 * This is the model class For table "dt143".
 *
 * @property string $id
 * @property string $created_by
 * @property string $updated_by
 * @property string $deleted_by
 * @property string $actid
 * @property string $relatedid
 * @property string $employee
 * @property int $created_at
 * @property int $updated_at
 * @property int $deleted_at
 * @property int $jobno
 * @property int $date
 * @property string $status
 * @property string $padno
 * @property string $signature
 * @property string $question1
 * @property string $question2
 * @property string $question3
 * @property string $question4
 * @property string $question5
 * @property string $question6
 * @property string $question7
 * @property string $question8
 * @property string $question9
 * @property string $question10
 * @property string $question12
 * @property string $question13
 * @property string $question14
 * @property string $question15
 * @property string $question16
 * @property string $question17
 * @property string $question18
 * @property string $question19
 * @property string $question20
 */
class Dt143 extends \common\models\Base {
	
    public $dates = ['created_at', 'updated_at', 'deleted_at', 'date'];
	public $uniqueidentifiers = [];
    public $securefields = [];
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'dt143';
    }

    /**
     * {@inheritdoc}
     */
    public function rules(): array
    {
        return [
            [['id', 'created_by', 'updated_by', 'deleted_by', 'actid', 'relatedid', 'employee', 'status', 'padno', 'signature', 'question1', 'question2', 'question3', 'question4', 'question5', 'question6', 'question7', 'question8', 'question9', 'question10', 'question12', 'question13', 'question14', 'question15', 'question16', 'question17', 'question18', 'question19', 'question20'], 'string'],
            [['created_at', 'updated_at', 'deleted_at', 'date'], 'safe'],
            [['jobno'], 'integer'],
            [['id'], 'unique'],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels(): array
    {
        return [
            'id' => 'ID',
            'created_by' => 'Created By',
            'updated_by' => 'Updated By',
            'deleted_by' => 'Deleted By',
            'actid' => 'Actid',
            'relatedid' => 'Relatedid',
            'employee' => 'Employee',
            'created_at' => 'Created At',
            'updated_at' => 'Updated At',
            'deleted_at' => 'Deleted At',
            'jobno' => 'Jobno',
            'date' => 'Date',
            'status' => 'Status',
            'padno' => 'Padno',
            'signature' => 'Signature',
            'question1' => 'Question1',
            'question2' => 'Question2',
            'question3' => 'Question3',
            'question4' => 'Question4',
            'question5' => 'Question5',
            'question6' => 'Question6',
            'question7' => 'Question7',
            'question8' => 'Question8',
            'question9' => 'Question9',
            'question10' => 'Question10',
            'question12' => 'Question12',
            'question13' => 'Question13',
            'question14' => 'Question14',
            'question15' => 'Question15',
            'question16' => 'Question16',
            'question17' => 'Question17',
            'question18' => 'Question18',
            'question19' => 'Question19',
            'question20' => 'Question20',
        ];
    }
    public function getEmployeel() {
		return $this->hasOne(User::class, ['id' => 'employee']);
	}
    
}
