91
* @property string $full_name
* @property string|null $medical_data
*
* @property ParentModel $parent
* @property Poll[] $polls
* @property Questionnaire[] $questionnaires
* @property Request[] $requests
* @property Test[] $tests
*/
class Child extends \yii\db\ActiveRecord
{
/**
* {@inheritdoc}
*/
public static function tableName()
{
return '{{%child}}';
}
/**
* {@inheritdoc}
*/
public function rules()
{
return [
[['parent_id', 'full_name'], 'required'],
[['parent_id'], 'integer'],
[['medical_data'], 'string'],
[['full_name'], 'string', 'max' => 255],
[['parent_id'], 'exist', 'skipOnError' => true, 'targetClass' =>
ParentModel::className(), 'targetAttribute' => ['parent_id' => 'id']],
];
}
/**
* {@inheritdoc}
*/