<?php

namespace modules\activities\models;

use Yii;

/**
 * This is the model class For table "todaysactivities".
 *
 * @property integer $id
 * @property string $welder
 * @property string $travelstarttime
 * @property string $starttime
 * @property string $finishtime
 * @property string $travelfinishtime
 * @property integer $shiftlength
 * @property string $company
 * @property string $assistant
 * @property string $contact
 * @property string $contactno
 * @property string $location
 * @property string $createdby
 * @property string $createdon
 * @property string $noofwelds
 * @property string $contactemail
 * @property string $date
 */
class Todaysactivities extends \common\models\Base
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'activities';
    }

    /**
     * @inheritdoc
     */
    public function rules(): array
    {
        return [
            [['id', 'shiftlength'], 'integer'],
            [['createdon'], 'safe'],
            [['welder', 'company'], 'string', 'max' => 100],
            [['travelstarttime', 'starttime', 'finishtime', 'travelfinishtime', 'assistant', 'contact', 'contactno', 'location', 'createdby', 'noofwelds', 'contactemail'], 'string', 'max' => 45]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels(): array
    {
        return [
            'id' => 'ID',
            'welder' => 'Welder',
            'travelstarttime' => 'Travelstarttime',
            'starttime' => 'Starttime',
            'finishtime' => 'Finishtime',
            'travelfinishtime' => 'Travelfinishtime',
            'shiftlength' => 'Shiftlength',
            'company' => 'Company',
            'assistant' => 'Assistant',
            'contact' => 'Contact',
            'contactno' => 'Contactno',
            'location' => 'Location',
            'created_by' => 'Createdby',
            'created_on' => 'Createdon',
            'noofwelds' => 'Noofwelds',
            'contactemail' => 'Contactemail',
                    ];
    }
    
    function getActsdate() {
		return strtodate(sdate);
	}
    
    function getActedate() {
		return strtodate(edate);
	}
}
