surat/common/models/SearchDate.php

50 lines
1.2 KiB
PHP
Raw Normal View History

2024-12-25 03:04:59 +00:00
<?php
/**
* Created by PhpStorm.
* User: Peak
* Date: 21/3/2560
* Time: 13:05
*/
namespace common\models;
use yii\base\Model;
class SearchDate extends Model
{
public $date_start;
public $date_end;
public $report_type;
public $pathologist_id;
2025-10-07 07:00:40 +00:00
public $pathologist;
2024-12-25 03:04:59 +00:00
public $case_type;
public function rules()
{
return [
[['date_start', 'date_end'], 'required'],
2025-10-07 07:00:40 +00:00
[['report_type', 'pathologist_id', 'case_type', 'pathologist'], 'safe']
2024-12-25 03:04:59 +00:00
];
}
public function attributeLabels()
{
return [
'date_start' => 'จากวันที่',
'date_end' => 'ถึงวันที่',
'report_type' => 'Report Type',
2025-10-07 07:00:40 +00:00
'pathologist_id' => 'พยาธิแทพย์',
'pathologist' => 'พยาธิแทพย์'
2024-12-25 03:04:59 +00:00
];
}
public function attributeHints()
{
return [
'date_start' => 'เช่น วัน/เดือน/ปี ค.ศ. เช่น ' . date('d/m/Y'),
'date_end' => 'เช่น วัน/เดือน/ปี ค.ศ. เช่น ' . date('d/m/Y'),
];
}
2025-10-07 07:00:40 +00:00
}