guild/frontend/modules/api/models/company/form/CompanyIdForm.php

31 lines
590 B
PHP
Raw Normal View History

2023-11-24 16:07:12 +03:00
<?php
namespace frontend\modules\api\models\company\form;
use frontend\modules\api\models\company\Company;
use yii\base\Model;
class CompanyIdForm extends Model
{
public $company_id;
/**
* @return array
*/
public function rules()
{
return [
[['company_id'], 'required'],
[['company_id'], 'exist', 'skipOnError' => false, 'targetClass' => Company::class, 'targetAttribute' => ['company_id' => 'id']],
];
}
/**
* @return string
*/
public function formName(): string
{
return '';
}
}