portal.mkgtu.ru/common/models/dictionary/DictionaryReasonForExam.php

56 lines
918 B
PHP
Raw Normal View History

2024-03-28 09:51:45 +03:00
<?php
namespace common\models\dictionary;
use common\components\queries\ArchiveQuery;
use common\models\interfaces\IArchiveQueryable;
class DictionaryReasonForExam extends \yii\db\ActiveRecord implements IArchiveQueryable
{
public static function tableName()
{
return '{{%dictionary_reasons_for_exam}}';
}
public function rules()
{
return [
[['code', 'name'], 'required'],
[['archive'], 'boolean'],
[['archive'], 'default', 'value' => false],
[['code', 'name'], 'string', 'max' => 255],
[['code'], 'unique'],
];
}
public static function find()
{
return new ArchiveQuery(static::class);
}
public static function getArchiveColumn(): string
{
return 'archive';
}
public static function getArchiveValue()
{
return true;
}
}