photum/backend/docs/docs.go
NANDO9322 28b76a0f54 feat(fot-management): implementação de ações editar/excluir e correção no mapeamento da agenda
- Implementadas ações de Editar e Excluir na página de Gestão de FOT
- Adicionado filtro de busca para FOTs
- Corrigido desalinhamento de colunas na tabela de Gestão de FOT
- Atualizado FotForm para suportar a edição de registros existentes
- Corrigido erro de renderização do React no Dashboard mapeando corretamente os objetos de atribuição
- Removidos dados de mock (INITIAL_EVENTS) e corrigido erro de referência nula no DataContext
- Adicionados métodos de atualização/exclusão ao apiService
2025-12-16 18:10:46 -03:00

3164 lines
100 KiB
Go

// 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}}",
"termsOfService": "http://swagger.io/terms/",
"contact": {
"name": "API Support",
"url": "http://www.swagger.io/support",
"email": "support@swagger.io"
},
"license": {
"name": "Apache 2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
},
"version": "{{.Version}}"
},
"host": "{{.Host}}",
"basePath": "{{.BasePath}}",
"paths": {
"/api/admin/users": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "List all users (Admin only)",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "List all users",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": true
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
},
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "Create a new user with specific role (Admin only)",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "Create user (Admin)",
"parameters": [
{
"description": "Create User Request",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/auth.registerRequest"
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/api/admin/users/pending": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "List users with ativo=false",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "List pending users",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": true
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/api/admin/users/{id}": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Get user details by ID (Admin only)",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "Get user by ID",
"parameters": [
{
"type": "string",
"description": "User ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": true
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"404": {
"description": "Not Found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
},
"delete": {
"security": [
{
"BearerAuth": []
}
],
"description": "Delete user (Admin only)",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "Delete user",
"parameters": [
{
"type": "string",
"description": "User ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/api/admin/users/{id}/approve": {
"patch": {
"security": [
{
"BearerAuth": []
}
],
"description": "Set user ativo=true",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "Approve user",
"parameters": [
{
"type": "string",
"description": "User ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/api/admin/users/{id}/role": {
"patch": {
"security": [
{
"BearerAuth": []
}
],
"description": "Update user role (Admin only)",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "Update user role",
"parameters": [
{
"type": "string",
"description": "User ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Update Role Request",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/auth.updateRoleRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/api/agenda": {
"get": {
"description": "List all agenda events with details",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"agenda"
],
"summary": "List all agenda events",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": true
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
},
"post": {
"description": "Create a new agenda event",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"agenda"
],
"summary": "Create a new agenda event",
"parameters": [
{
"description": "Create Agenda Request",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/agenda.CreateAgendaRequest"
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"type": "object",
"additionalProperties": true
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/api/agenda/{id}": {
"get": {
"description": "Get agenda event details by ID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"agenda"
],
"summary": "Get agenda event by ID",
"parameters": [
{
"type": "string",
"description": "Agenda ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": true
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
},
"put": {
"description": "Update agenda event by ID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"agenda"
],
"summary": "Update agenda event",
"parameters": [
{
"type": "string",
"description": "Agenda ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Update Agenda Request",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/agenda.CreateAgendaRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": true
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
},
"delete": {
"description": "Delete agenda event by ID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"agenda"
],
"summary": "Delete agenda event",
"parameters": [
{
"type": "string",
"description": "Agenda ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"description": "No Content"
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/api/agenda/{id}/professionals": {
"get": {
"tags": [
"agenda"
],
"summary": "Get professionals assigned to agenda",
"responses": {}
},
"post": {
"tags": [
"agenda"
],
"summary": "Assign professional to agenda",
"responses": {}
}
},
"/api/agenda/{id}/professionals/{profId}": {
"delete": {
"tags": [
"agenda"
],
"summary": "Remove professional from agenda",
"responses": {}
}
},
"/api/agenda/{id}/professionals/{profId}/status": {
"patch": {
"tags": [
"agenda"
],
"summary": "Update professional assignment status",
"responses": {}
}
},
"/api/agenda/{id}/status": {
"patch": {
"tags": [
"agenda"
],
"summary": "Update agenda status",
"responses": {}
}
},
"/api/anos-formaturas": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"anos_formaturas"
],
"summary": "List all graduation years",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/anos_formaturas.AnoFormaturaResponse"
}
}
}
}
},
"post": {
"security": [
{
"BearerAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"anos_formaturas"
],
"summary": "Create a new graduation year",
"parameters": [
{
"description": "Ano Semestre",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/anos_formaturas.CreateAnoFormaturaRequest"
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/anos_formaturas.AnoFormaturaResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"409": {
"description": "Conflict",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/api/anos-formaturas/{id}": {
"put": {
"security": [
{
"BearerAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"anos_formaturas"
],
"summary": "Update a graduation year",
"parameters": [
{
"type": "string",
"description": "ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Ano Semestre",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/anos_formaturas.CreateAnoFormaturaRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/anos_formaturas.AnoFormaturaResponse"
}
}
}
},
"delete": {
"security": [
{
"BearerAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"anos_formaturas"
],
"summary": "Delete a graduation year",
"parameters": [
{
"type": "string",
"description": "ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"description": "No Content"
}
}
}
},
"/api/cadastro-fot": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"cadastro_fot"
],
"summary": "List all FOT records",
"parameters": [
{
"type": "string",
"description": "Filter by Company ID",
"name": "empresa_id",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/cadastro_fot.CadastroFotResponse"
}
}
}
}
},
"post": {
"security": [
{
"BearerAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"cadastro_fot"
],
"summary": "Create a new FOT record",
"parameters": [
{
"description": "FOT Data",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/cadastro_fot.CreateInput"
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/cadastro_fot.CadastroFotResponse"
}
}
}
}
},
"/api/cadastro-fot/{id}": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"cadastro_fot"
],
"summary": "Get FOT record by ID",
"parameters": [
{
"type": "string",
"description": "ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/cadastro_fot.CadastroFotResponse"
}
}
}
},
"put": {
"security": [
{
"BearerAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"cadastro_fot"
],
"summary": "Update FOT record",
"parameters": [
{
"type": "string",
"description": "ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Data",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/cadastro_fot.CreateInput"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/cadastro_fot.CadastroFotResponse"
}
}
}
},
"delete": {
"security": [
{
"BearerAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"cadastro_fot"
],
"summary": "Delete FOT record",
"parameters": [
{
"type": "string",
"description": "ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"description": "No Content"
}
}
}
},
"/api/cursos": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"cursos"
],
"summary": "List all courses",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/cursos.CursoResponse"
}
}
}
}
},
"post": {
"security": [
{
"BearerAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"cursos"
],
"summary": "Create a new course",
"parameters": [
{
"description": "Curso Name",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/cursos.CreateCursoRequest"
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/cursos.CursoResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"409": {
"description": "Conflict",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/api/cursos/{id}": {
"put": {
"security": [
{
"BearerAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"cursos"
],
"summary": "Update a course",
"parameters": [
{
"type": "string",
"description": "Curso ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Curso Name",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/cursos.CreateCursoRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/cursos.CursoResponse"
}
}
}
},
"delete": {
"security": [
{
"BearerAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"cursos"
],
"summary": "Delete a course",
"parameters": [
{
"type": "string",
"description": "Curso ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"description": "No Content"
}
}
}
},
"/api/empresas": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"empresas"
],
"summary": "List all companies",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/empresas.EmpresaResponse"
}
}
}
}
},
"post": {
"security": [
{
"BearerAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"empresas"
],
"summary": "Create a new company",
"parameters": [
{
"description": "Empresa Name",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/empresas.CreateEmpresaRequest"
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/empresas.EmpresaResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"409": {
"description": "Conflict",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/api/empresas/{id}": {
"put": {
"security": [
{
"BearerAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"empresas"
],
"summary": "Update a company",
"parameters": [
{
"type": "string",
"description": "Empresa ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Empresa Name",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/empresas.CreateEmpresaRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/empresas.EmpresaResponse"
}
}
}
},
"delete": {
"security": [
{
"BearerAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"empresas"
],
"summary": "Delete a company",
"parameters": [
{
"type": "string",
"description": "Empresa ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"description": "No Content"
}
}
}
},
"/api/funcoes": {
"get": {
"description": "List all professional functions",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"funcoes"
],
"summary": "List functions",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/funcoes.FuncaoResponse"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
},
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "Create a new professional function",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"funcoes"
],
"summary": "Create a new function",
"parameters": [
{
"description": "Create Function Request",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/funcoes.CreateFuncaoRequest"
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/funcoes.FuncaoResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"409": {
"description": "Conflict",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/api/funcoes/{id}": {
"put": {
"security": [
{
"BearerAuth": []
}
],
"description": "Update a professional function by ID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"funcoes"
],
"summary": "Update function",
"parameters": [
{
"type": "string",
"description": "Function ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Update Function Request",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/funcoes.CreateFuncaoRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/funcoes.FuncaoResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"409": {
"description": "Conflict",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
},
"delete": {
"security": [
{
"BearerAuth": []
}
],
"description": "Delete a professional function by ID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"funcoes"
],
"summary": "Delete function",
"parameters": [
{
"type": "string",
"description": "Function ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/api/me": {
"get": {
"description": "Get current authenticated user",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"auth"
],
"summary": "Get current user",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/auth.loginResponse"
}
}
}
}
},
"/api/profissionais": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "List all profissionais",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"profissionais"
],
"summary": "List profissionais",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/profissionais.ProfissionalResponse"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
},
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "Create a new profissional record",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"profissionais"
],
"summary": "Create a new profissional",
"parameters": [
{
"description": "Create Profissional Request",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/profissionais.CreateProfissionalInput"
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/profissionais.ProfissionalResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/api/profissionais/{id}": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Get a profissional by ID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"profissionais"
],
"summary": "Get profissional by ID",
"parameters": [
{
"type": "string",
"description": "Profissional ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/profissionais.ProfissionalResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"404": {
"description": "Not Found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
},
"put": {
"security": [
{
"BearerAuth": []
}
],
"description": "Update a profissional by ID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"profissionais"
],
"summary": "Update profissional",
"parameters": [
{
"type": "string",
"description": "Profissional ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Update Profissional Request",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/profissionais.UpdateProfissionalInput"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/profissionais.ProfissionalResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
},
"delete": {
"security": [
{
"BearerAuth": []
}
],
"description": "Delete a profissional by ID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"profissionais"
],
"summary": "Delete profissional",
"parameters": [
{
"type": "string",
"description": "Profissional ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/api/tipos-eventos": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"tipos_eventos"
],
"summary": "List all event types",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/tipos_eventos.EventoResponse"
}
}
}
}
},
"post": {
"security": [
{
"BearerAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"tipos_eventos"
],
"summary": "Create a new event type",
"parameters": [
{
"description": "Nome",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/tipos_eventos.CreateEventoRequest"
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/tipos_eventos.EventoResponse"
}
}
}
}
},
"/api/tipos-eventos/precos": {
"post": {
"security": [
{
"BearerAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"tipos_eventos"
],
"summary": "Set price for an event function",
"parameters": [
{
"description": "Price Input",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/tipos_eventos.PriceInput"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/api/tipos-eventos/{id}": {
"put": {
"security": [
{
"BearerAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"tipos_eventos"
],
"summary": "Update an event type",
"parameters": [
{
"type": "string",
"description": "Event ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Event Data",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/tipos_eventos.CreateEventoRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/tipos_eventos.EventoResponse"
}
}
}
},
"delete": {
"security": [
{
"BearerAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"tipos_eventos"
],
"summary": "Delete an event type",
"parameters": [
{
"type": "string",
"description": "Event ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"description": "No Content"
}
}
}
},
"/api/tipos-eventos/{id}/precos": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"tipos_eventos"
],
"summary": "List prices for an event",
"parameters": [
{
"type": "string",
"description": "Event ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/tipos_eventos.PrecoResponse"
}
}
}
}
}
},
"/api/tipos-servicos": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"tipos_servicos"
],
"summary": "List all service types",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/tipos_servicos.TipoServicoResponse"
}
}
}
}
},
"post": {
"security": [
{
"BearerAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"tipos_servicos"
],
"summary": "Create a new service type",
"parameters": [
{
"description": "Nome",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/tipos_servicos.CreateTipoServicoRequest"
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/tipos_servicos.TipoServicoResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"409": {
"description": "Conflict",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/api/tipos-servicos/{id}": {
"put": {
"security": [
{
"BearerAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"tipos_servicos"
],
"summary": "Update a service type",
"parameters": [
{
"type": "string",
"description": "ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Nome",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/tipos_servicos.CreateTipoServicoRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/tipos_servicos.TipoServicoResponse"
}
}
}
},
"delete": {
"security": [
{
"BearerAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"tipos_servicos"
],
"summary": "Delete a service type",
"parameters": [
{
"type": "string",
"description": "ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"description": "No Content"
}
}
}
},
"/auth/login": {
"post": {
"description": "Login with email and password",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"auth"
],
"summary": "Login",
"parameters": [
{
"description": "Login Request",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/auth.loginRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/auth.loginResponse"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/auth/logout": {
"post": {
"description": "Revoke refresh token and clear cookie",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"auth"
],
"summary": "Logout user",
"parameters": [
{
"description": "Refresh Token",
"name": "refresh_token",
"in": "body",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/auth/refresh": {
"post": {
"description": "Get a new access token using a valid refresh token",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"auth"
],
"summary": "Refresh access token",
"parameters": [
{
"description": "Refresh Token",
"name": "refresh_token",
"in": "body",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": true
}
},
"401": {
"description": "Unauthorized",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/auth/register": {
"post": {
"description": "Register a new user with email, password, name, phone and role",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"auth"
],
"summary": "Register a new user",
"parameters": [
{
"description": "Register Request",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/auth.registerRequest"
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
}
},
"definitions": {
"agenda.CreateAgendaRequest": {
"type": "object",
"properties": {
"cine_faltante": {
"type": "integer"
},
"data_evento": {
"type": "string"
},
"endereco": {
"type": "string"
},
"fot_id": {
"type": "string"
},
"foto_faltante": {
"type": "integer"
},
"horario": {
"type": "string"
},
"local_evento": {
"type": "string"
},
"logistica_observacoes": {
"type": "string"
},
"observacoes_evento": {
"type": "string"
},
"pre_venda": {
"type": "boolean"
},
"qtd_cinegrafistas": {
"type": "integer"
},
"qtd_estudios": {
"type": "integer"
},
"qtd_formandos": {
"type": "integer"
},
"qtd_fotografos": {
"type": "integer"
},
"qtd_plataforma_360": {
"type": "integer"
},
"qtd_ponto_decorado": {
"type": "integer"
},
"qtd_ponto_foto": {
"type": "integer"
},
"qtd_ponto_id": {
"type": "integer"
},
"qtd_pontos_led": {
"type": "integer"
},
"qtd_recepcionistas": {
"type": "integer"
},
"recep_faltante": {
"type": "integer"
},
"status_profissionais": {
"type": "string"
},
"tipo_evento_id": {
"type": "string"
}
}
},
"anos_formaturas.AnoFormaturaResponse": {
"type": "object",
"properties": {
"ano_semestre": {
"type": "string"
},
"id": {
"type": "string"
}
}
},
"anos_formaturas.CreateAnoFormaturaRequest": {
"type": "object",
"required": [
"ano_semestre"
],
"properties": {
"ano_semestre": {
"type": "string",
"example": "2029.1"
}
}
},
"auth.loginRequest": {
"type": "object",
"required": [
"email",
"senha"
],
"properties": {
"email": {
"type": "string",
"example": "admin@photum.com"
},
"senha": {
"type": "string",
"minLength": 6,
"example": "123456"
}
}
},
"auth.loginResponse": {
"type": "object",
"properties": {
"access_token": {
"type": "string"
},
"expires_at": {
"type": "string"
},
"profissional": {},
"user": {
"$ref": "#/definitions/auth.userResponse"
}
}
},
"auth.registerRequest": {
"type": "object",
"required": [
"email",
"nome",
"role",
"senha"
],
"properties": {
"email": {
"type": "string"
},
"empresa_id": {
"description": "Optional, for EVENT_OWNER",
"type": "string"
},
"nome": {
"type": "string"
},
"role": {
"description": "Role is now required",
"type": "string"
},
"senha": {
"type": "string",
"minLength": 6
},
"telefone": {
"type": "string"
}
}
},
"auth.updateRoleRequest": {
"type": "object",
"required": [
"role"
],
"properties": {
"role": {
"type": "string"
}
}
},
"auth.userResponse": {
"type": "object",
"properties": {
"ativo": {
"type": "boolean"
},
"company_id": {
"type": "string"
},
"company_name": {
"type": "string"
},
"email": {
"type": "string"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"phone": {
"type": "string"
},
"role": {
"type": "string"
}
}
},
"cadastro_fot.CadastroFotResponse": {
"type": "object",
"properties": {
"ano_formatura_id": {
"type": "string"
},
"ano_formatura_label": {
"type": "string"
},
"cidade": {
"type": "string"
},
"curso_id": {
"type": "string"
},
"curso_nome": {
"type": "string"
},
"empresa_id": {
"type": "string"
},
"empresa_nome": {
"type": "string"
},
"estado": {
"type": "string"
},
"fot": {
"type": "integer"
},
"gastos_captacao": {
"type": "number"
},
"id": {
"type": "string"
},
"instituicao": {
"type": "string"
},
"observacoes": {
"type": "string"
},
"pre_venda": {
"type": "boolean"
}
}
},
"cadastro_fot.CreateInput": {
"type": "object",
"properties": {
"ano_formatura_id": {
"type": "string"
},
"cidade": {
"type": "string"
},
"curso_id": {
"type": "string"
},
"empresa_id": {
"type": "string"
},
"estado": {
"type": "string"
},
"fot": {
"type": "integer"
},
"gastos_captacao": {
"type": "number"
},
"instituicao": {
"type": "string"
},
"observacoes": {
"type": "string"
},
"pre_venda": {
"type": "boolean"
}
}
},
"cursos.CreateCursoRequest": {
"type": "object",
"required": [
"nome"
],
"properties": {
"nome": {
"type": "string"
}
}
},
"cursos.CursoResponse": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"nome": {
"type": "string"
}
}
},
"empresas.CreateEmpresaRequest": {
"type": "object",
"required": [
"nome"
],
"properties": {
"nome": {
"type": "string"
}
}
},
"empresas.EmpresaResponse": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"nome": {
"type": "string"
}
}
},
"funcoes.CreateFuncaoRequest": {
"type": "object",
"required": [
"nome"
],
"properties": {
"nome": {
"type": "string"
}
}
},
"funcoes.FuncaoResponse": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"nome": {
"type": "string"
}
}
},
"profissionais.CreateProfissionalInput": {
"type": "object",
"properties": {
"agencia": {
"type": "string"
},
"banco": {
"type": "string"
},
"carro_disponivel": {
"type": "boolean"
},
"cidade": {
"type": "string"
},
"conta_pix": {
"type": "string"
},
"cpf_cnpj_titular": {
"type": "string"
},
"desempenho_evento": {
"type": "integer"
},
"disp_horario": {
"type": "integer"
},
"educacao_simpatia": {
"type": "integer"
},
"endereco": {
"type": "string"
},
"equipamentos": {
"type": "string"
},
"extra_por_equipamento": {
"type": "boolean"
},
"funcao_profissional_id": {
"type": "string"
},
"media": {
"type": "number"
},
"nome": {
"type": "string"
},
"observacao": {
"type": "string"
},
"qtd_estudio": {
"type": "integer"
},
"qual_tec": {
"type": "integer"
},
"tabela_free": {
"type": "string"
},
"tem_estudio": {
"type": "boolean"
},
"tipo_cartao": {
"type": "string"
},
"uf": {
"type": "string"
},
"whatsapp": {
"type": "string"
}
}
},
"profissionais.ProfissionalResponse": {
"type": "object",
"properties": {
"agencia": {
"type": "string"
},
"banco": {
"type": "string"
},
"carro_disponivel": {
"type": "boolean"
},
"cidade": {
"type": "string"
},
"conta_pix": {
"type": "string"
},
"cpf_cnpj_titular": {
"type": "string"
},
"desempenho_evento": {
"type": "integer"
},
"disp_horario": {
"type": "integer"
},
"educacao_simpatia": {
"type": "integer"
},
"email": {
"type": "string"
},
"endereco": {
"type": "string"
},
"equipamentos": {
"type": "string"
},
"extra_por_equipamento": {
"type": "boolean"
},
"funcao_profissional": {
"description": "Now returns name from join",
"type": "string"
},
"funcao_profissional_id": {
"type": "string"
},
"id": {
"type": "string"
},
"media": {
"type": "number"
},
"nome": {
"type": "string"
},
"observacao": {
"type": "string"
},
"qtd_estudio": {
"type": "integer"
},
"qual_tec": {
"type": "integer"
},
"tabela_free": {
"type": "string"
},
"tem_estudio": {
"type": "boolean"
},
"tipo_cartao": {
"type": "string"
},
"uf": {
"type": "string"
},
"usuario_id": {
"type": "string"
},
"whatsapp": {
"type": "string"
}
}
},
"profissionais.UpdateProfissionalInput": {
"type": "object",
"properties": {
"agencia": {
"type": "string"
},
"banco": {
"type": "string"
},
"carro_disponivel": {
"type": "boolean"
},
"cidade": {
"type": "string"
},
"conta_pix": {
"type": "string"
},
"cpf_cnpj_titular": {
"type": "string"
},
"desempenho_evento": {
"type": "integer"
},
"disp_horario": {
"type": "integer"
},
"educacao_simpatia": {
"type": "integer"
},
"endereco": {
"type": "string"
},
"equipamentos": {
"type": "string"
},
"extra_por_equipamento": {
"type": "boolean"
},
"funcao_profissional_id": {
"type": "string"
},
"media": {
"type": "number"
},
"nome": {
"type": "string"
},
"observacao": {
"type": "string"
},
"qtd_estudio": {
"type": "integer"
},
"qual_tec": {
"type": "integer"
},
"tabela_free": {
"type": "string"
},
"tem_estudio": {
"type": "boolean"
},
"tipo_cartao": {
"type": "string"
},
"uf": {
"type": "string"
},
"whatsapp": {
"type": "string"
}
}
},
"tipos_eventos.CreateEventoRequest": {
"type": "object",
"required": [
"nome"
],
"properties": {
"nome": {
"type": "string"
}
}
},
"tipos_eventos.EventoResponse": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"nome": {
"type": "string"
},
"precos": {
"type": "array",
"items": {
"$ref": "#/definitions/tipos_eventos.PrecoResponse"
}
}
}
},
"tipos_eventos.PrecoResponse": {
"type": "object",
"properties": {
"funcao_nome": {
"type": "string"
},
"funcao_profissional_id": {
"type": "string"
},
"id": {
"type": "string"
},
"tipo_evento_id": {
"type": "string"
},
"valor": {
"type": "number"
}
}
},
"tipos_eventos.PriceInput": {
"type": "object",
"properties": {
"funcao_profissional_id": {
"type": "string"
},
"tipo_evento_id": {
"type": "string"
},
"valor": {
"type": "number"
}
}
},
"tipos_servicos.CreateTipoServicoRequest": {
"type": "object",
"required": [
"nome"
],
"properties": {
"nome": {
"type": "string"
}
}
},
"tipos_servicos.TipoServicoResponse": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"nome": {
"type": "string"
}
}
}
},
"securityDefinitions": {
"BearerAuth": {
"type": "apiKey",
"name": "Authorization",
"in": "header"
}
},
"tags": [
{
"description": "Authentication related operations",
"name": "auth"
},
{
"description": "Administration operations",
"name": "admin"
}
]
}`
// SwaggerInfo holds exported Swagger Info so clients can modify it
var SwaggerInfo = &swag.Spec{
Version: "1.0",
Host: "localhost:8080",
BasePath: "/",
Schemes: []string{},
Title: "Photum Backend API",
Description: "Backend authentication service for Photum.",
InfoInstanceName: "swagger",
SwaggerTemplate: docTemplate,
LeftDelim: "{{",
RightDelim: "}}",
}
func init() {
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
}