mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-17 07:51:12 +08:00
28 lines
485 B
PHP
28 lines
485 B
PHP
<?php
|
|
|
|
namespace yiiunit\data\validators\models;
|
|
|
|
use yiiunit\data\ar\ActiveRecord;
|
|
|
|
/**
|
|
* @property int id
|
|
* @property string a_field
|
|
* @property int ref
|
|
*/
|
|
class ValidatorTestRefModel extends ActiveRecord
|
|
{
|
|
|
|
public $test_val = 2;
|
|
public $test_val_fail = 99;
|
|
|
|
public static function tableName()
|
|
{
|
|
return 'validator_ref';
|
|
}
|
|
|
|
public function getMain()
|
|
{
|
|
return $this->hasOne(ValidatorTestMainModel::className(), ['id' => 'ref']);
|
|
}
|
|
}
|