// Package docs Code generated by swaggo/swag. DO NOT EDIT
package docs

import "github.com/swaggo/swag"

const docTemplate = `{
    "schemes": {{ marshal .Schemes }},
    "swagger": "2.0",
    "info": {
        "description": "{{escape .Description}}",
        "title": "{{.Title}}",
        "contact": {
            "name": "API Support",
            "email": "support@naqa-api.com"
        },
        "version": "{{.Version}}"
    },
    "host": "{{.Host}}",
    "basePath": "{{.BasePath}}",
    "paths": {
        "/": {
            "get": {
                "description": "Get basic API information including version, description, and supported endpoints",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Root"
                ],
                "summary": "Get API root information",
                "responses": {
                    "200": {
                        "description": "API information",
                        "schema": {
                            "$ref": "#/definitions/models.RootResponse"
                        }
                    }
                }
            }
        },
        "/api/v1": {
            "get": {
                "description": "Get API v1 status, version, and available endpoints",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "API Info"
                ],
                "summary": "Get API v1 information",
                "responses": {
                    "200": {
                        "description": "API v1 information",
                        "schema": {
                            "$ref": "#/definitions/models.ApiV1Response"
                        }
                    }
                }
            }
        },
        "/api/v1/health": {
            "get": {
                "description": "Check if the API is healthy and running",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Health"
                ],
                "summary": "Health check",
                "responses": {
                    "200": {
                        "description": "Health check response",
                        "schema": {
                            "$ref": "#/definitions/models.HealthResponse"
                        }
                    }
                }
            }
        },
        "/api/v1/stocks": {
            "get": {
                "description": "Get information about available stock endpoints, years, and examples",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Stocks"
                ],
                "summary": "Get stocks API information",
                "responses": {
                    "200": {
                        "description": "Stocks API information",
                        "schema": {
                            "$ref": "#/definitions/models.StocksBaseResponse"
                        }
                    }
                }
            }
        },
        "/api/v1/stocks/year/{year}": {
            "get": {
                "description": "Retrieve all stocks and their information for a given year",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Stocks"
                ],
                "summary": "Get all stocks for a specific year",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Year (e.g., 2024)",
                        "name": "year",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of stocks",
                        "schema": {
                            "$ref": "#/definitions/models.StockResponse"
                        }
                    },
                    "400": {
                        "description": "Invalid year",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    },
                    "500": {
                        "description": "Database error",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    }
                }
            }
        },
        "/api/v1/stocks/year/{year}/calculate-purification": {
            "post": {
                "description": "Calculate the purification amount for a stock based on holding period and number of shares",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Stocks"
                ],
                "summary": "Calculate stock purification amount",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Year (e.g., 2024)",
                        "name": "year",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Purification calculation request",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/models.PurificationRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Purification calculation result",
                        "schema": {
                            "$ref": "#/definitions/models.PurificationResponse"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    },
                    "404": {
                        "description": "Stock not found",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    },
                    "500": {
                        "description": "Server error",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    }
                }
            }
        },
        "/api/v1/stocks/year/{year}/search": {
            "get": {
                "description": "Search for stocks using various filters like name, code, sector, or sharia opinion",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Stocks"
                ],
                "summary": "Search stocks with filters",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Year (e.g., 2024)",
                        "name": "year",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Stock name (Arabic or English)",
                        "name": "name",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Stock code",
                        "name": "code",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Business sector",
                        "name": "sector",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Sharia compliance opinion",
                        "name": "sharia_opinion",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Purification percentage",
                        "name": "purification",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Filtered list of stocks",
                        "schema": {
                            "$ref": "#/definitions/models.StockResponse"
                        }
                    },
                    "400": {
                        "description": "Invalid parameters",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    },
                    "500": {
                        "description": "Database error",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    }
                }
            }
        }
    },
    "definitions": {
        "models.ApiV1Response": {
            "type": "object",
            "properties": {
                "endpoints": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    },
                    "example": [
                        "/api/v1/stocks",
                        "/api/v1/health",
                        "/api/v1/metrics"
                    ]
                },
                "env": {
                    "type": "string",
                    "example": "development"
                },
                "message": {
                    "type": "string",
                    "example": "Welcome to NAQA API v1"
                },
                "request_id": {
                    "type": "string",
                    "example": "123e4567-e89b-12d3-a456-426614174000"
                },
                "server_time": {
                    "type": "string",
                    "example": "2023-01-01T00:00:00Z"
                },
                "status": {
                    "type": "string",
                    "example": "active"
                },
                "version": {
                    "type": "string",
                    "example": "1.0.0"
                }
            }
        },
        "models.EndpointInfo": {
            "type": "object",
            "properties": {
                "description": {
                    "type": "string",
                    "example": "Get all stocks for a specific year"
                },
                "example": {},
                "method": {
                    "type": "string",
                    "example": "GET"
                },
                "name": {
                    "type": "string",
                    "example": "Get Stocks"
                },
                "parameters": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    },
                    "example": [
                        "name",
                        "code",
                        "sector"
                    ]
                },
                "path": {
                    "type": "string",
                    "example": "/api/v1/stocks/year/{year}"
                }
            }
        },
        "models.HealthResponse": {
            "type": "object",
            "properties": {
                "message": {
                    "type": "string",
                    "example": "API is healthy"
                },
                "request_id": {
                    "type": "string",
                    "example": "123e4567-e89b-12d3-a456-426614174000"
                },
                "status": {
                    "type": "string",
                    "example": "OK"
                },
                "timestamp": {
                    "type": "string",
                    "example": "2023-01-01T00:00:00Z"
                }
            }
        },
        "models.PurificationRequest": {
            "type": "object",
            "required": [
                "end_date",
                "number_of_stocks",
                "start_date",
                "stock_code"
            ],
            "properties": {
                "end_date": {
                    "type": "string",
                    "example": "2023-12-31"
                },
                "number_of_stocks": {
                    "type": "integer",
                    "example": 100
                },
                "start_date": {
                    "type": "string",
                    "example": "2023-01-01"
                },
                "stock_code": {
                    "type": "string",
                    "example": "1111"
                }
            }
        },
        "models.PurificationResponse": {
            "type": "object",
            "properties": {
                "_id": {
                    "type": "string"
                },
                "days_held": {
                    "type": "integer",
                    "example": 365
                },
                "is_multi_year": {
                    "type": "boolean",
                    "example": false
                },
                "purification_amount": {
                    "type": "number",
                    "example": 25.5
                },
                "purification_rate": {
                    "type": "number",
                    "example": 0.25
                },
                "warnings": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "yearly_breakdown": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/models.YearlyPurificationInfo"
                    }
                }
            }
        },
        "models.RootResponse": {
            "type": "object",
            "properties": {
                "app_name": {
                    "type": "string",
                    "example": "Naqa API"
                },
                "description": {
                    "type": "string",
                    "example": "A stock analysis and Sharia compliance API"
                },
                "environment": {
                    "type": "string",
                    "example": "development"
                },
                "request_time": {
                    "type": "string",
                    "example": "2023-01-01T00:00:00Z"
                },
                "supported_api": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    },
                    "example": [
                        "/api/v1"
                    ]
                },
                "version": {
                    "type": "string",
                    "example": "1.0.0"
                }
            }
        },
        "models.Stock": {
            "type": "object",
            "properties": {
                "_id": {
                    "type": "string"
                },
                "code": {
                    "type": "string",
                    "example": "1111"
                },
                "created_at": {
                    "type": "string",
                    "format": "date-time"
                },
                "logo": {
                    "type": "string",
                    "example": "https://example.com/logo.png"
                },
                "name_ar": {
                    "type": "string",
                    "example": "شركة الطاقة السعودية"
                },
                "name_en": {
                    "type": "string",
                    "example": "Saudi Energy Company"
                },
                "purification": {
                    "type": "string",
                    "example": "0.25"
                },
                "sector": {
                    "type": "string",
                    "example": "الطاقة"
                },
                "sharia_opinion": {
                    "type": "string",
                    "example": "نقية"
                },
                "updated_at": {
                    "type": "string",
                    "format": "date-time"
                }
            }
        },
        "models.StockResponse": {
            "type": "object",
            "properties": {
                "stocks": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/models.Stock"
                    }
                }
            }
        },
        "models.StocksBaseResponse": {
            "type": "object",
            "properties": {
                "available_years": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    },
                    "example": [
                        "2023",
                        "2024"
                    ]
                },
                "documentation": {
                    "type": "string",
                    "example": "https://github.com/anqorithm/naqa-api"
                },
                "endpoints": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/models.EndpointInfo"
                    }
                },
                "message": {
                    "type": "string",
                    "example": "Welcome to Stocks API"
                },
                "status": {
                    "type": "string",
                    "example": "success"
                }
            }
        },
        "models.YearlyPurificationInfo": {
            "type": "object",
            "properties": {
                "company_name_ar": {
                    "type": "string"
                },
                "company_name_en": {
                    "type": "string"
                },
                "days_in_period": {
                    "type": "integer"
                },
                "purification_amount": {
                    "type": "number"
                },
                "purification_rate": {
                    "type": "number"
                },
                "sharia_opinion": {
                    "type": "string"
                },
                "total_days_in_year": {
                    "type": "integer"
                },
                "year": {
                    "type": "integer"
                },
                "year_proportion": {
                    "type": "number"
                }
            }
        }
    }
}`

// SwaggerInfo holds exported Swagger Info so clients can modify it
var SwaggerInfo = &swag.Spec{
	Version:          "1.0",
	Host:             "localhost:3000",
	BasePath:         "/",
	Schemes:          []string{},
	Title:            "NAQA API",
	Description:      "A stock analysis and Sharia compliance API",
	InfoInstanceName: "swagger",
	SwaggerTemplate:  docTemplate,
	LeftDelim:        "{{",
	RightDelim:       "}}",
}

func init() {
	swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
}
