guild/common/models/forms/TasksImportForm.php

45 lines
1.0 KiB
PHP
Raw Permalink Normal View History

2023-11-10 15:55:01 +03:00
<?php
namespace common\models\forms;
use yii\base\Model;
class TasksImportForm extends Model
{
public $companyId;
public $userId;
public $projectId;
public $fromDate;
public $toDate;
/**
* @return array
*/
public function rules()
{
return [
[['companyId', 'userId', 'projectId'], 'integer'],
['fromDate', 'date', 'format' => 'php:Y-m-d', 'timestampAttribute' => 'fromDate'],
['toDate', 'date', 'format' => 'php:Y-m-d', 'timestampAttribute' => 'toDate'],
];
}
public function attributeLabels()
{
return [
'companyId' => 'ID компании',
'userId' => 'ID пользователя',
'projectId' => 'ID проекта',
'fromDate' => 'Дата начала поиска',
'toDate' => 'Дата конца поиска',
];
}
/**
* @return string
*/
public function formName(): string
{
return '';
}
}