changed the creator for tasks from project_user to user, fixed api, documentation, filters, some other fixes

This commit is contained in:
iIronside
2021-12-06 15:13:31 +03:00
parent daae8b16b6
commit e78ff7d779
23 changed files with 6024 additions and 117 deletions

View File

@ -34,6 +34,7 @@ class ProjectUser extends \yii\db\ActiveRecord
{
return [
[['project_id', 'user_id'], 'required'],
['user_id', 'unique', 'targetAttribute' => ['user_id', 'project_id'], 'message'=>'Сотрудник уже занят на этом проекте'],
[['project_id', 'user_id'], 'integer'],
[['project_id'], 'exist', 'skipOnError' => true, 'targetClass' => Project::className(), 'targetAttribute' => ['project_id' => 'id']],
[['user_id'], 'exist', 'skipOnError' => true, 'targetClass' => User::className(), 'targetAttribute' => ['user_id' => 'id']],
@ -69,7 +70,7 @@ class ProjectUser extends \yii\db\ActiveRecord
}
/**
* @return \yii\db\ActiveQuery
* @return ActiveQuery
*/
public function getCard()
{