add methods to project task category

This commit is contained in:
iIronside
2023-01-25 11:50:07 +03:00
parent a353cbec6c
commit f2c77fb72c
3 changed files with 235 additions and 0 deletions

View File

@ -29,6 +29,8 @@ class ProjectTaskCategory extends \yii\db\ActiveRecord
public function rules()
{
return [
[['project_id', 'title'], 'required'],
[['project_id', 'title'], 'unique', 'targetAttribute' => ['project_id', 'title']],
[['project_id'], 'integer'],
[['title'], 'string', 'max' => 255],
[['project_id'], 'exist', 'skipOnError' => true, 'targetClass' => Project::className(), 'targetAttribute' => ['project_id' => 'id']],