improved validation in ProjectColumn

This commit is contained in:
iIronside 2023-10-31 13:05:15 +03:00
parent 6f99921671
commit 934d2ccd0c
2 changed files with 1 additions and 7 deletions

View File

@ -65,7 +65,7 @@ class ProjectColumn extends \yii\db\ActiveRecord
return [
[['title', 'project_id'], 'required'],
[['project_id', 'status', 'priority'], 'integer'],
[['project_id', 'title'], 'unique', 'targetAttribute' => ['project_id', 'title']],
['title', 'unique', 'targetAttribute' => ['title','project_id' => 'status']],
[['created_at', 'updated_at'], 'safe'],
[['title'], 'string', 'max' => 255],
[['project_id'], 'exist', 'skipOnError' => true, 'targetClass' => Project::className(), 'targetAttribute' => ['project_id' => 'id']],

View File

@ -14,7 +14,6 @@ class ProjectColumnController extends ApiController
public function verbs(): array
{
return [
'get-column' => ['get'],
'get-column-list' => ['get'],
'create-column' => ['post'],
'set-priority' => ['post'],
@ -22,11 +21,6 @@ class ProjectColumnController extends ApiController
];
}
public function actionGetColumn()
{
}
/**
*
* @OA\Get(path="/project-column/get-column-list",