Sindbad~EG File Manager
/**
* @swagger
* components:
* schemas:
* Goal:
* type: object
* required:
* - month
* - year
* - user_id
* properties:
* month:
* type: string
* description: The month for the goal
* year:
* type: string
* description: The year for the goal
* policy_count:
* type: string
* description: The number of policies targeted
* premium:
* type: string
* description: Indicates if there is a premium
* agency_commission:
* type: string
* description: The commission percentage for the agency
* user_id:
* type: string
* description: The ID of the user who created this entry
* example:
* month: "09"
* year: "2024"
* policy_count: "2"
* premium: "No"
* agency_commission: "10%"
* user_id: "667dcaf3f52d0d7678ea7dea"
* UpdateResponse:
* type: object
* properties:
* message:
* type: string
* example: "Data updated successfully"
* DeleteResponse:
* type: object
* properties:
* message:
* type: string
* example: "entry_name and related data deleted successfully"
* securitySchemes:
* bearerAuth:
* type: http
* scheme: bearer
* bearerFormat: JWT
*/
/**
* @swagger
* tags:
* - name: Goal
* description: Goal-related operations
*/
/**
* @swagger
* /goals/list:
* get:
* summary: Returns the list of goals
* tags: [Goal]
* security:
* - bearerAuth: []
* parameters:
* - in: query
* name: contact_id
* schema:
* type: string
* required: false
* description: ID of the contact
* - in: query
* name: user_id
* schema:
* type: string
* required: false
* description: ID of the user/agent ID
* responses:
* 200:
* description: The list of goals
* content:
* application/json:
* schema:
* type: array
* items:
* $ref: '#/components/schemas/Goal'
*/
/**
* @swagger
* /goals/add:
* post:
* summary: Create a new goal
* tags: [Goal]
* security:
* - bearerAuth: []
* requestBody:
* required: true
* content:
* application/json:
* schema:
* $ref: '#/components/schemas/Goal'
* responses:
* 201:
* description: The goal was successfully created
* content:
* application/json:
* schema:
* $ref: '#/components/schemas/Goal'
*/
/**
* @swagger
* /goals/edit/{id}:
* put:
* summary: Update the goal by ID
* tags: [Goal]
* security:
* - bearerAuth: []
* parameters:
* - in: path
* name: id
* schema:
* type: string
* required: true
* description: The ID of the goal
* requestBody:
* required: true
* content:
* application/json:
* schema:
* $ref: '#/components/schemas/Goal'
* responses:
* 200:
* description: The goal was successfully updated
* content:
* application/json:
* schema:
* $ref: '#/components/schemas/UpdateResponse'
* 404:
* description: Goal not found
*/
/**
* @swagger
* /goals/delete/{id}:
* delete:
* summary: Delete the goal by ID
* tags: [Goal]
* security:
* - bearerAuth: []
* parameters:
* - in: path
* name: id
* schema:
* type: string
* required: true
* description: The ID of the goal
* responses:
* 200:
* description: The goal was successfully deleted
* content:
* application/json:
* schema:
* $ref: '#/components/schemas/DeleteResponse'
* 404:
* description: Goal not found
*/
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists