File: /home/aliazzsr/api.crm.vqode.com/controllers/ProjectContactController.php
<?php
namespace app\controllers;
use app\components\BaseActiveController;
class ProjectContactController extends BaseActiveController
{
public $modelClass = 'app\models\core\ProjectContact';
}
/**
* @SWG\Get(
* path="/project-contacts?expand={models}",
* tags={"Project Contacts"},
* security={{"bearer":{}}},
* summary="Finds ProjectContact records existing.",
* consumes={"application/json"},
* produces={"application/json"},
* @SWG\Parameter(in="path", name="models", type="string",
* description="List of relative to models comma-separated. Available: companyContact,project"
* ),
* @SWG\Response(response=200, description="Successful operation.",
* @SWG\Schema(type="array", @SWG\Items(ref="#/definitions/ProjectContact"))
* ),
* @SWG\Response(response=401, description="Unauthorized."),
* @SWG\Response(response=422, description="Data validation error."),
* @SWG\Response(response=500, description="Internal server error.")
* )
*
* @SWG\Get(
* path="/project-contacts/{id}?expand={models}",
* tags={"Project Contacts"},
* security={{"bearer":{}}},
* summary="Returns a single ProjectContact record.",
* consumes={"application/json"},
* produces={"application/json"},
* @SWG\Parameter(description="Unique identifier", in="path", name="id", required=true, type="integer"),
* @SWG\Parameter(in="path", name="models", type="string",
* description="List of relative to models comma-separated. Available: company,project"
* ),
* @SWG\Response(response=200, description="Successful operation.", @SWG\Schema(ref="#/definitions/ProjectContact")),
* @SWG\Response(response=401, description="Unauthorized."),
* @SWG\Response(response=404, description="Not found."),
* @SWG\Response(response=500, description="Internal server error.")
* )
*
* @SWG\Post(
* path="/project-contacts",
* tags={"Project Contacts"},
* security={{"bearer":{}}},
* summary="Creates a new ProjectContact record.",
* consumes={"application/json"},
* produces={"application/json"},
* @SWG\Parameter(name="body", required=true, in="body", @SWG\Schema(
* ref="#/definitions/ProjectContact", required={"name"}
* )),
* @SWG\Response(response=201, description="Successful operation."),
* @SWG\Response(response=401, description="Unauthorized."),
* @SWG\Response(response=422, description="Data validation error."),
* @SWG\Response(response=500, description="Internal server error.")
* )
*
* @SWG\Put(
* path="/project-contacts/{id}",
* tags={"Project Contacts"},
* security={{"bearer":{}}},
* summary="Updates an existed ProjectContact record.",
* consumes={"application/json"},
* produces={"application/json"},
* @SWG\Parameter(description="Unique identifier", in="path", name="id", required=true, type="integer"),
* @SWG\Parameter(name="body", required=true, in="body", @SWG\Schema(
* ref="#/definitions/ProjectContact")),
* @SWG\Response(response=401, description="Unauthorized."),
* @SWG\Response(response=422, description="Data validation error."),
* @SWG\Response(response=500, description="Internal server error.")
* )
*
* @SWG\Delete(
* path="/project-contacts/{id}",
* tags={"Project Contacts"},
* security={{"bearer":{}}},
* summary="Deletes a ProjectContact record.",
* consumes={"application/json"},
* produces={"application/json"},
* @SWG\Parameter(description="Unique identifier", in="path", name="id", required=true, type="integer"),
* @SWG\Response(response=204, description="Successful operation."),
* @SWG\Response(response=401, description="Unauthorized."),
* @SWG\Response(response=404, description="Not found."),
* @SWG\Response(response=500, description="Internal server error.")
* )
*/