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 [ return [
[['title', 'project_id'], 'required'], [['title', 'project_id'], 'required'],
[['project_id', 'status', 'priority'], 'integer'], [['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'], [['created_at', 'updated_at'], 'safe'],
[['title'], 'string', 'max' => 255], [['title'], 'string', 'max' => 255],
[['project_id'], 'exist', 'skipOnError' => true, 'targetClass' => Project::className(), 'targetAttribute' => ['project_id' => 'id']], [['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 public function verbs(): array
{ {
return [ return [
'get-column' => ['get'],
'get-column-list' => ['get'], 'get-column-list' => ['get'],
'create-column' => ['post'], 'create-column' => ['post'],
'set-priority' => ['post'], 'set-priority' => ['post'],
@ -22,11 +21,6 @@ class ProjectColumnController extends ApiController
]; ];
} }
public function actionGetColumn()
{
}
/** /**
* *
* @OA\Get(path="/project-column/get-column-list", * @OA\Get(path="/project-column/get-column-list",