File: /home/aliazzsr/api.crm.vqode.com/controllers/InfluencerController.php
<?php
namespace app\controllers;
use app\components\BaseActiveController;
use app\models\enums\PermissionEnum;
class InfluencerController extends BaseActiveController
{
public $modelClass = 'app\models\core\Influencer';
protected static $permissionRequired = PermissionEnum::REFERENCES;
}
/**
* @SWG\Get(
* path="/influencers",
* tags={"Influencer"},
* security={{"bearer":{}}},
* summary="Finds Influencers records existing.",
* consumes={"application/json"},
* produces={"application/json"},
* @SWG\Response(response=200, description="Successful operation.",
* @SWG\Schema(type="array", @SWG\Items(ref="#/definitions/Influencer"))
* ),
* @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="/influencers/{id}",
* tags={"Influencer"},
* security={{"bearer":{}}},
* summary="Returns a single Influencer record.",
* consumes={"application/json"},
* produces={"application/json"},
* @SWG\Parameter(description="ID", in="path", name="id", required=true, type="integer"),
* @SWG\Response(response=200, description="Successful operation.", @SWG\Schema(ref="#/definitions/Influencer")),
* @SWG\Response(response=401, description="Unauthorized."),
* @SWG\Response(response=404, description="Not found."),
* @SWG\Response(response=500, description="Internal server error.")
* )
*
* @SWG\Post(
* path="/influencers",
* tags={"Influencer"},
* security={{"bearer":{}}},
* summary="Creates a new Influencer record.",
* consumes={"application/json"},
* produces={"application/json"},
* @SWG\Parameter(name="body", required=true, in="body", @SWG\Schema(
* ref="#/definitions/Influencer", 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="/influencers/{id}",
* tags={"Influencer"},
* security={{"bearer":{}}},
* summary="Updates an existed Influencer record.",
* consumes={"application/json"},
* produces={"application/json"},
* @SWG\Parameter(description="ID", in="path", name="id", required=true, type="integer"),
* @SWG\Parameter(name="body", required=true, in="body", @SWG\Schema(
* ref="#/definitions/Influencer")),
* @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="/influencers/{id}",
* tags={"Influencer"},
* security={{"bearer":{}}},
* summary="Deletes a Influencer record.",
* consumes={"application/json"},
* produces={"application/json"},
* @SWG\Parameter(description="ID", 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.")
* )
*/