feat: add register no swaggger
This commit is contained in:
parent
450557513a
commit
90967dd351
6 changed files with 1018 additions and 417 deletions
|
|
@ -2,6 +2,12 @@
|
||||||
# GoHorse Jobs Backend - Environment Variables
|
# GoHorse Jobs Backend - Environment Variables
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
|
|
||||||
|
# =============================================================================
|
||||||
|
# Seeding Configuration
|
||||||
|
# =============================================================================
|
||||||
|
ADMIN_EMAIL=master@gohorsejobs.com
|
||||||
|
ADMIN_PASSWORD=teste1234
|
||||||
|
|
||||||
# Database Configuration (use DATABASE_URL format)
|
# Database Configuration (use DATABASE_URL format)
|
||||||
DATABASE_URL=postgresql://user:password@localhost:5432/gohorsejobs?sslmode=disable
|
DATABASE_URL=postgresql://user:password@localhost:5432/gohorsejobs?sslmode=disable
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ const docTemplate = `{
|
||||||
"summary": "List Applications",
|
"summary": "List Applications",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "integer",
|
"type": "string",
|
||||||
"description": "Filter applications by job ID",
|
"description": "Filter applications by job ID",
|
||||||
"name": "jobId",
|
"name": "jobId",
|
||||||
"in": "query",
|
"in": "query",
|
||||||
|
|
@ -78,7 +78,7 @@ const docTemplate = `{
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/definitions/github_com_rede5_gohorsejobs_backend_internal_models.Application"
|
"$ref": "#/definitions/models.Application"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -115,7 +115,7 @@ const docTemplate = `{
|
||||||
"in": "body",
|
"in": "body",
|
||||||
"required": true,
|
"required": true,
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/github_com_rede5_gohorsejobs_backend_internal_dto.CreateApplicationRequest"
|
"$ref": "#/definitions/dto.CreateApplicationRequest"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
@ -123,7 +123,7 @@ const docTemplate = `{
|
||||||
"201": {
|
"201": {
|
||||||
"description": "Created",
|
"description": "Created",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/github_com_rede5_gohorsejobs_backend_internal_models.Application"
|
"$ref": "#/definitions/models.Application"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"400": {
|
"400": {
|
||||||
|
|
@ -141,6 +141,44 @@ const docTemplate = `{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/api/v1/applications/me": {
|
||||||
|
"get": {
|
||||||
|
"description": "List all applications for the logged-in user",
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"Applications"
|
||||||
|
],
|
||||||
|
"summary": "Get My Applications",
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK",
|
||||||
|
"schema": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/definitions/models.ApplicationWithDetails"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"401": {
|
||||||
|
"description": "Unauthorized",
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"500": {
|
||||||
|
"description": "Internal Server Error",
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"/api/v1/applications/{id}": {
|
"/api/v1/applications/{id}": {
|
||||||
"get": {
|
"get": {
|
||||||
"description": "Retrieve a job application by its ID",
|
"description": "Retrieve a job application by its ID",
|
||||||
|
|
@ -156,7 +194,7 @@ const docTemplate = `{
|
||||||
"summary": "Get Application",
|
"summary": "Get Application",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "integer",
|
"type": "string",
|
||||||
"description": "Application ID",
|
"description": "Application ID",
|
||||||
"name": "id",
|
"name": "id",
|
||||||
"in": "path",
|
"in": "path",
|
||||||
|
|
@ -167,7 +205,7 @@ const docTemplate = `{
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/github_com_rede5_gohorsejobs_backend_internal_models.Application"
|
"$ref": "#/definitions/models.Application"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"400": {
|
"400": {
|
||||||
|
|
@ -239,7 +277,7 @@ const docTemplate = `{
|
||||||
"summary": "Update Application Status",
|
"summary": "Update Application Status",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "integer",
|
"type": "string",
|
||||||
"description": "Application ID",
|
"description": "Application ID",
|
||||||
"name": "id",
|
"name": "id",
|
||||||
"in": "path",
|
"in": "path",
|
||||||
|
|
@ -251,7 +289,7 @@ const docTemplate = `{
|
||||||
"in": "body",
|
"in": "body",
|
||||||
"required": true,
|
"required": true,
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/github_com_rede5_gohorsejobs_backend_internal_dto.UpdateApplicationStatusRequest"
|
"$ref": "#/definitions/dto.UpdateApplicationStatusRequest"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
@ -259,7 +297,7 @@ const docTemplate = `{
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/github_com_rede5_gohorsejobs_backend_internal_models.Application"
|
"$ref": "#/definitions/models.Application"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"400": {
|
"400": {
|
||||||
|
|
@ -340,6 +378,52 @@ const docTemplate = `{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/api/v1/auth/register": {
|
||||||
|
"post": {
|
||||||
|
"description": "Register a new candidate account.",
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"Auth"
|
||||||
|
],
|
||||||
|
"summary": "Register Candidate",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"description": "Registration Details",
|
||||||
|
"name": "register",
|
||||||
|
"in": "body",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/dto.RegisterCandidateRequest"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"201": {
|
||||||
|
"description": "Created",
|
||||||
|
"schema": {
|
||||||
|
"type": "object"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"400": {
|
||||||
|
"description": "Invalid Request",
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"409": {
|
||||||
|
"description": "Conflict",
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"/api/v1/companies": {
|
"/api/v1/companies": {
|
||||||
"get": {
|
"get": {
|
||||||
"description": "Returns a list of all companies.",
|
"description": "Returns a list of all companies.",
|
||||||
|
|
@ -522,7 +606,7 @@ const docTemplate = `{
|
||||||
"in": "body",
|
"in": "body",
|
||||||
"required": true,
|
"required": true,
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/github_com_rede5_gohorsejobs_backend_internal_dto.UpdateCompanyRequest"
|
"$ref": "#/definitions/dto.UpdateCompanyRequest"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
@ -578,7 +662,7 @@ const docTemplate = `{
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/definitions/github_com_rede5_gohorsejobs_backend_internal_services.Conversation"
|
"$ref": "#/definitions/services.Conversation"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -618,7 +702,7 @@ const docTemplate = `{
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/definitions/github_com_rede5_gohorsejobs_backend_internal_services.Message"
|
"$ref": "#/definitions/services.Message"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -666,7 +750,7 @@ const docTemplate = `{
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/github_com_rede5_gohorsejobs_backend_internal_services.Message"
|
"$ref": "#/definitions/services.Message"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -699,7 +783,7 @@ const docTemplate = `{
|
||||||
"in": "query"
|
"in": "query"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "integer",
|
"type": "string",
|
||||||
"description": "Filter by company ID",
|
"description": "Filter by company ID",
|
||||||
"name": "companyId",
|
"name": "companyId",
|
||||||
"in": "query"
|
"in": "query"
|
||||||
|
|
@ -715,7 +799,7 @@ const docTemplate = `{
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/github_com_rede5_gohorsejobs_backend_internal_dto.PaginatedResponse"
|
"$ref": "#/definitions/dto.PaginatedResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"500": {
|
"500": {
|
||||||
|
|
@ -745,7 +829,7 @@ const docTemplate = `{
|
||||||
"in": "body",
|
"in": "body",
|
||||||
"required": true,
|
"required": true,
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/github_com_rede5_gohorsejobs_backend_internal_dto.CreateJobRequest"
|
"$ref": "#/definitions/dto.CreateJobRequest"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
@ -753,7 +837,7 @@ const docTemplate = `{
|
||||||
"201": {
|
"201": {
|
||||||
"description": "Created",
|
"description": "Created",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/github_com_rede5_gohorsejobs_backend_internal_models.Job"
|
"$ref": "#/definitions/models.Job"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"400": {
|
"400": {
|
||||||
|
|
@ -792,7 +876,7 @@ const docTemplate = `{
|
||||||
"summary": "Get job by ID",
|
"summary": "Get job by ID",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "integer",
|
"type": "string",
|
||||||
"description": "Job ID",
|
"description": "Job ID",
|
||||||
"name": "id",
|
"name": "id",
|
||||||
"in": "path",
|
"in": "path",
|
||||||
|
|
@ -803,7 +887,7 @@ const docTemplate = `{
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/github_com_rede5_gohorsejobs_backend_internal_models.Job"
|
"$ref": "#/definitions/models.Job"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"400": {
|
"400": {
|
||||||
|
|
@ -834,7 +918,7 @@ const docTemplate = `{
|
||||||
"summary": "Update a job",
|
"summary": "Update a job",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "integer",
|
"type": "string",
|
||||||
"description": "Job ID",
|
"description": "Job ID",
|
||||||
"name": "id",
|
"name": "id",
|
||||||
"in": "path",
|
"in": "path",
|
||||||
|
|
@ -846,7 +930,7 @@ const docTemplate = `{
|
||||||
"in": "body",
|
"in": "body",
|
||||||
"required": true,
|
"required": true,
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/github_com_rede5_gohorsejobs_backend_internal_dto.UpdateJobRequest"
|
"$ref": "#/definitions/dto.UpdateJobRequest"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
@ -854,7 +938,7 @@ const docTemplate = `{
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/github_com_rede5_gohorsejobs_backend_internal_models.Job"
|
"$ref": "#/definitions/models.Job"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"400": {
|
"400": {
|
||||||
|
|
@ -885,7 +969,7 @@ const docTemplate = `{
|
||||||
"summary": "Delete a job",
|
"summary": "Delete a job",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "integer",
|
"type": "string",
|
||||||
"description": "Job ID",
|
"description": "Job ID",
|
||||||
"name": "id",
|
"name": "id",
|
||||||
"in": "path",
|
"in": "path",
|
||||||
|
|
@ -1050,7 +1134,7 @@ const docTemplate = `{
|
||||||
"in": "body",
|
"in": "body",
|
||||||
"required": true,
|
"required": true,
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/internal_handlers.CreateCheckoutRequest"
|
"$ref": "#/definitions/handlers.CreateCheckoutRequest"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
@ -1058,7 +1142,7 @@ const docTemplate = `{
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/internal_handlers.CreateCheckoutResponse"
|
"$ref": "#/definitions/handlers.CreateCheckoutResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"400": {
|
"400": {
|
||||||
|
|
@ -1166,7 +1250,7 @@ const docTemplate = `{
|
||||||
"in": "body",
|
"in": "body",
|
||||||
"required": true,
|
"required": true,
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/internal_handlers.DownloadURLRequest"
|
"$ref": "#/definitions/handlers.DownloadURLRequest"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
@ -1174,7 +1258,7 @@ const docTemplate = `{
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/internal_handlers.DownloadURLResponse"
|
"$ref": "#/definitions/handlers.DownloadURLResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"400": {
|
"400": {
|
||||||
|
|
@ -1263,7 +1347,7 @@ const docTemplate = `{
|
||||||
"in": "body",
|
"in": "body",
|
||||||
"required": true,
|
"required": true,
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/internal_handlers.UploadURLRequest"
|
"$ref": "#/definitions/handlers.UploadURLRequest"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
@ -1271,7 +1355,7 @@ const docTemplate = `{
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/internal_handlers.UploadURLResponse"
|
"$ref": "#/definitions/handlers.UploadURLResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"400": {
|
"400": {
|
||||||
|
|
@ -2164,29 +2248,7 @@ const docTemplate = `{
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"definitions": {
|
"definitions": {
|
||||||
"github_com_rede5_gohorsejobs_backend_internal_core_dto.LoginRequest": {
|
"dto.CreateApplicationRequest": {
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"email": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"password": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"github_com_rede5_gohorsejobs_backend_internal_core_dto.SaveFCMTokenRequest": {
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"platform": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"token": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"github_com_rede5_gohorsejobs_backend_internal_dto.CreateApplicationRequest": {
|
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": [
|
"required": [
|
||||||
"jobId"
|
"jobId"
|
||||||
|
|
@ -2225,7 +2287,7 @@ const docTemplate = `{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"github_com_rede5_gohorsejobs_backend_internal_dto.CreateJobRequest": {
|
"dto.CreateJobRequest": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": [
|
"required": [
|
||||||
"companyId",
|
"companyId",
|
||||||
|
|
@ -2334,16 +2396,16 @@ const docTemplate = `{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"github_com_rede5_gohorsejobs_backend_internal_dto.PaginatedResponse": {
|
"dto.PaginatedResponse": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"data": {},
|
"data": {},
|
||||||
"pagination": {
|
"pagination": {
|
||||||
"$ref": "#/definitions/github_com_rede5_gohorsejobs_backend_internal_dto.Pagination"
|
"$ref": "#/definitions/dto.Pagination"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"github_com_rede5_gohorsejobs_backend_internal_dto.Pagination": {
|
"dto.Pagination": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"limit": {
|
"limit": {
|
||||||
|
|
@ -2357,7 +2419,54 @@ const docTemplate = `{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"github_com_rede5_gohorsejobs_backend_internal_dto.UpdateApplicationStatusRequest": {
|
"dto.RegisterCandidateRequest": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"address": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"birthDate": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"city": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"education": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"email": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"experience": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"objective": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"password": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"phone": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"skills": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"state": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"username": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"zipCode": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"dto.UpdateApplicationStatusRequest": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": [
|
"required": [
|
||||||
"status"
|
"status"
|
||||||
|
|
@ -2378,7 +2487,7 @@ const docTemplate = `{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"github_com_rede5_gohorsejobs_backend_internal_dto.UpdateCompanyRequest": {
|
"dto.UpdateCompanyRequest": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"active": {
|
"active": {
|
||||||
|
|
@ -2429,7 +2538,7 @@ const docTemplate = `{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"github_com_rede5_gohorsejobs_backend_internal_dto.UpdateJobRequest": {
|
"dto.UpdateJobRequest": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"benefits": {
|
"benefits": {
|
||||||
|
|
@ -2530,7 +2639,113 @@ const docTemplate = `{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"github_com_rede5_gohorsejobs_backend_internal_models.Application": {
|
"github_com_rede5_gohorsejobs_backend_internal_core_dto.LoginRequest": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"email": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"password": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"github_com_rede5_gohorsejobs_backend_internal_core_dto.SaveFCMTokenRequest": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"platform": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"token": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"handlers.CreateCheckoutRequest": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"cancelUrl": {
|
||||||
|
"description": "URL after cancel",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"jobId": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"priceId": {
|
||||||
|
"description": "Stripe Price ID",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"successUrl": {
|
||||||
|
"description": "URL after success",
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"handlers.CreateCheckoutResponse": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"checkoutUrl": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"sessionId": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"handlers.DownloadURLRequest": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"key": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"handlers.DownloadURLResponse": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"downloadUrl": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"expiresIn": {
|
||||||
|
"description": "seconds",
|
||||||
|
"type": "integer"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"handlers.UploadURLRequest": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"contentType": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"filename": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"folder": {
|
||||||
|
"description": "Optional: logos, resumes, documents",
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"handlers.UploadURLResponse": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"expiresIn": {
|
||||||
|
"description": "seconds",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"key": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"publicUrl": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"uploadUrl": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"models.Application": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"createdAt": {
|
"createdAt": {
|
||||||
|
|
@ -2541,7 +2756,7 @@ const docTemplate = `{
|
||||||
"description": "Array of {type, url}",
|
"description": "Array of {type, url}",
|
||||||
"allOf": [
|
"allOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/github_com_rede5_gohorsejobs_backend_internal_models.JSONMap"
|
"$ref": "#/definitions/models.JSONMap"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
@ -2590,15 +2805,91 @@ const docTemplate = `{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"github_com_rede5_gohorsejobs_backend_internal_models.JSONMap": {
|
"models.ApplicationWithDetails": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"applicantName": {
|
||||||
|
"description": "From user or guest name",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"applicantPhone": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"companyId": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"companyName": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"createdAt": {
|
||||||
|
"description": "Metadata",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"documents": {
|
||||||
|
"description": "Array of {type, url}",
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/definitions/models.JSONMap"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"email": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"id": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"jobId": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"jobTitle": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"lineId": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"message": {
|
||||||
|
"description": "Application Content",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"description": "Applicant Info (for guest applications)",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"notes": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"phone": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"resumeUrl": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"status": {
|
||||||
|
"description": "Status \u0026 Notes",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"updatedAt": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"userId": {
|
||||||
|
"description": "NULL for guest applications",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"whatsapp": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"models.JSONMap": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"additionalProperties": true
|
"additionalProperties": true
|
||||||
},
|
},
|
||||||
"github_com_rede5_gohorsejobs_backend_internal_models.Job": {
|
"models.Job": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"benefits": {
|
"benefits": {
|
||||||
"$ref": "#/definitions/github_com_rede5_gohorsejobs_backend_internal_models.JSONMap"
|
"$ref": "#/definitions/models.JSONMap"
|
||||||
},
|
},
|
||||||
"cityId": {
|
"cityId": {
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
|
|
@ -2646,7 +2937,7 @@ const docTemplate = `{
|
||||||
"description": "Requirements \u0026 Benefits (JSONB arrays)",
|
"description": "Requirements \u0026 Benefits (JSONB arrays)",
|
||||||
"allOf": [
|
"allOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/github_com_rede5_gohorsejobs_backend_internal_models.JSONMap"
|
"$ref": "#/definitions/models.JSONMap"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
@ -2689,7 +2980,7 @@ const docTemplate = `{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"github_com_rede5_gohorsejobs_backend_internal_services.Conversation": {
|
"services.Conversation": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"candidateId": {
|
"candidateId": {
|
||||||
|
|
@ -2721,7 +3012,7 @@ const docTemplate = `{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"github_com_rede5_gohorsejobs_backend_internal_services.Message": {
|
"services.Message": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"content": {
|
"content": {
|
||||||
|
|
@ -2744,90 +3035,6 @@ const docTemplate = `{
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"internal_handlers.CreateCheckoutRequest": {
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"cancelUrl": {
|
|
||||||
"description": "URL after cancel",
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"jobId": {
|
|
||||||
"type": "integer"
|
|
||||||
},
|
|
||||||
"priceId": {
|
|
||||||
"description": "Stripe Price ID",
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"successUrl": {
|
|
||||||
"description": "URL after success",
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"internal_handlers.CreateCheckoutResponse": {
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"checkoutUrl": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"sessionId": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"internal_handlers.DownloadURLRequest": {
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"key": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"internal_handlers.DownloadURLResponse": {
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"downloadUrl": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"expiresIn": {
|
|
||||||
"description": "seconds",
|
|
||||||
"type": "integer"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"internal_handlers.UploadURLRequest": {
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"contentType": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"filename": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"folder": {
|
|
||||||
"description": "Optional: logos, resumes, documents",
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"internal_handlers.UploadURLResponse": {
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"expiresIn": {
|
|
||||||
"description": "seconds",
|
|
||||||
"type": "integer"
|
|
||||||
},
|
|
||||||
"key": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"publicUrl": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"uploadUrl": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"securityDefinitions": {
|
"securityDefinitions": {
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@
|
||||||
"summary": "List Applications",
|
"summary": "List Applications",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "integer",
|
"type": "string",
|
||||||
"description": "Filter applications by job ID",
|
"description": "Filter applications by job ID",
|
||||||
"name": "jobId",
|
"name": "jobId",
|
||||||
"in": "query",
|
"in": "query",
|
||||||
|
|
@ -71,7 +71,7 @@
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/definitions/github_com_rede5_gohorsejobs_backend_internal_models.Application"
|
"$ref": "#/definitions/models.Application"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -108,7 +108,7 @@
|
||||||
"in": "body",
|
"in": "body",
|
||||||
"required": true,
|
"required": true,
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/github_com_rede5_gohorsejobs_backend_internal_dto.CreateApplicationRequest"
|
"$ref": "#/definitions/dto.CreateApplicationRequest"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
@ -116,7 +116,7 @@
|
||||||
"201": {
|
"201": {
|
||||||
"description": "Created",
|
"description": "Created",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/github_com_rede5_gohorsejobs_backend_internal_models.Application"
|
"$ref": "#/definitions/models.Application"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"400": {
|
"400": {
|
||||||
|
|
@ -134,6 +134,44 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/api/v1/applications/me": {
|
||||||
|
"get": {
|
||||||
|
"description": "List all applications for the logged-in user",
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"Applications"
|
||||||
|
],
|
||||||
|
"summary": "Get My Applications",
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK",
|
||||||
|
"schema": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/definitions/models.ApplicationWithDetails"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"401": {
|
||||||
|
"description": "Unauthorized",
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"500": {
|
||||||
|
"description": "Internal Server Error",
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"/api/v1/applications/{id}": {
|
"/api/v1/applications/{id}": {
|
||||||
"get": {
|
"get": {
|
||||||
"description": "Retrieve a job application by its ID",
|
"description": "Retrieve a job application by its ID",
|
||||||
|
|
@ -149,7 +187,7 @@
|
||||||
"summary": "Get Application",
|
"summary": "Get Application",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "integer",
|
"type": "string",
|
||||||
"description": "Application ID",
|
"description": "Application ID",
|
||||||
"name": "id",
|
"name": "id",
|
||||||
"in": "path",
|
"in": "path",
|
||||||
|
|
@ -160,7 +198,7 @@
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/github_com_rede5_gohorsejobs_backend_internal_models.Application"
|
"$ref": "#/definitions/models.Application"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"400": {
|
"400": {
|
||||||
|
|
@ -232,7 +270,7 @@
|
||||||
"summary": "Update Application Status",
|
"summary": "Update Application Status",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "integer",
|
"type": "string",
|
||||||
"description": "Application ID",
|
"description": "Application ID",
|
||||||
"name": "id",
|
"name": "id",
|
||||||
"in": "path",
|
"in": "path",
|
||||||
|
|
@ -244,7 +282,7 @@
|
||||||
"in": "body",
|
"in": "body",
|
||||||
"required": true,
|
"required": true,
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/github_com_rede5_gohorsejobs_backend_internal_dto.UpdateApplicationStatusRequest"
|
"$ref": "#/definitions/dto.UpdateApplicationStatusRequest"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
@ -252,7 +290,7 @@
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/github_com_rede5_gohorsejobs_backend_internal_models.Application"
|
"$ref": "#/definitions/models.Application"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"400": {
|
"400": {
|
||||||
|
|
@ -333,6 +371,52 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/api/v1/auth/register": {
|
||||||
|
"post": {
|
||||||
|
"description": "Register a new candidate account.",
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"Auth"
|
||||||
|
],
|
||||||
|
"summary": "Register Candidate",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"description": "Registration Details",
|
||||||
|
"name": "register",
|
||||||
|
"in": "body",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/dto.RegisterCandidateRequest"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"201": {
|
||||||
|
"description": "Created",
|
||||||
|
"schema": {
|
||||||
|
"type": "object"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"400": {
|
||||||
|
"description": "Invalid Request",
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"409": {
|
||||||
|
"description": "Conflict",
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"/api/v1/companies": {
|
"/api/v1/companies": {
|
||||||
"get": {
|
"get": {
|
||||||
"description": "Returns a list of all companies.",
|
"description": "Returns a list of all companies.",
|
||||||
|
|
@ -515,7 +599,7 @@
|
||||||
"in": "body",
|
"in": "body",
|
||||||
"required": true,
|
"required": true,
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/github_com_rede5_gohorsejobs_backend_internal_dto.UpdateCompanyRequest"
|
"$ref": "#/definitions/dto.UpdateCompanyRequest"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
@ -571,7 +655,7 @@
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/definitions/github_com_rede5_gohorsejobs_backend_internal_services.Conversation"
|
"$ref": "#/definitions/services.Conversation"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -611,7 +695,7 @@
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/definitions/github_com_rede5_gohorsejobs_backend_internal_services.Message"
|
"$ref": "#/definitions/services.Message"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -659,7 +743,7 @@
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/github_com_rede5_gohorsejobs_backend_internal_services.Message"
|
"$ref": "#/definitions/services.Message"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -692,7 +776,7 @@
|
||||||
"in": "query"
|
"in": "query"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "integer",
|
"type": "string",
|
||||||
"description": "Filter by company ID",
|
"description": "Filter by company ID",
|
||||||
"name": "companyId",
|
"name": "companyId",
|
||||||
"in": "query"
|
"in": "query"
|
||||||
|
|
@ -708,7 +792,7 @@
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/github_com_rede5_gohorsejobs_backend_internal_dto.PaginatedResponse"
|
"$ref": "#/definitions/dto.PaginatedResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"500": {
|
"500": {
|
||||||
|
|
@ -738,7 +822,7 @@
|
||||||
"in": "body",
|
"in": "body",
|
||||||
"required": true,
|
"required": true,
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/github_com_rede5_gohorsejobs_backend_internal_dto.CreateJobRequest"
|
"$ref": "#/definitions/dto.CreateJobRequest"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
@ -746,7 +830,7 @@
|
||||||
"201": {
|
"201": {
|
||||||
"description": "Created",
|
"description": "Created",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/github_com_rede5_gohorsejobs_backend_internal_models.Job"
|
"$ref": "#/definitions/models.Job"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"400": {
|
"400": {
|
||||||
|
|
@ -785,7 +869,7 @@
|
||||||
"summary": "Get job by ID",
|
"summary": "Get job by ID",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "integer",
|
"type": "string",
|
||||||
"description": "Job ID",
|
"description": "Job ID",
|
||||||
"name": "id",
|
"name": "id",
|
||||||
"in": "path",
|
"in": "path",
|
||||||
|
|
@ -796,7 +880,7 @@
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/github_com_rede5_gohorsejobs_backend_internal_models.Job"
|
"$ref": "#/definitions/models.Job"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"400": {
|
"400": {
|
||||||
|
|
@ -827,7 +911,7 @@
|
||||||
"summary": "Update a job",
|
"summary": "Update a job",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "integer",
|
"type": "string",
|
||||||
"description": "Job ID",
|
"description": "Job ID",
|
||||||
"name": "id",
|
"name": "id",
|
||||||
"in": "path",
|
"in": "path",
|
||||||
|
|
@ -839,7 +923,7 @@
|
||||||
"in": "body",
|
"in": "body",
|
||||||
"required": true,
|
"required": true,
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/github_com_rede5_gohorsejobs_backend_internal_dto.UpdateJobRequest"
|
"$ref": "#/definitions/dto.UpdateJobRequest"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
@ -847,7 +931,7 @@
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/github_com_rede5_gohorsejobs_backend_internal_models.Job"
|
"$ref": "#/definitions/models.Job"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"400": {
|
"400": {
|
||||||
|
|
@ -878,7 +962,7 @@
|
||||||
"summary": "Delete a job",
|
"summary": "Delete a job",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "integer",
|
"type": "string",
|
||||||
"description": "Job ID",
|
"description": "Job ID",
|
||||||
"name": "id",
|
"name": "id",
|
||||||
"in": "path",
|
"in": "path",
|
||||||
|
|
@ -1043,7 +1127,7 @@
|
||||||
"in": "body",
|
"in": "body",
|
||||||
"required": true,
|
"required": true,
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/internal_handlers.CreateCheckoutRequest"
|
"$ref": "#/definitions/handlers.CreateCheckoutRequest"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
@ -1051,7 +1135,7 @@
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/internal_handlers.CreateCheckoutResponse"
|
"$ref": "#/definitions/handlers.CreateCheckoutResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"400": {
|
"400": {
|
||||||
|
|
@ -1159,7 +1243,7 @@
|
||||||
"in": "body",
|
"in": "body",
|
||||||
"required": true,
|
"required": true,
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/internal_handlers.DownloadURLRequest"
|
"$ref": "#/definitions/handlers.DownloadURLRequest"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
@ -1167,7 +1251,7 @@
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/internal_handlers.DownloadURLResponse"
|
"$ref": "#/definitions/handlers.DownloadURLResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"400": {
|
"400": {
|
||||||
|
|
@ -1256,7 +1340,7 @@
|
||||||
"in": "body",
|
"in": "body",
|
||||||
"required": true,
|
"required": true,
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/internal_handlers.UploadURLRequest"
|
"$ref": "#/definitions/handlers.UploadURLRequest"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
@ -1264,7 +1348,7 @@
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/internal_handlers.UploadURLResponse"
|
"$ref": "#/definitions/handlers.UploadURLResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"400": {
|
"400": {
|
||||||
|
|
@ -2157,29 +2241,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"definitions": {
|
"definitions": {
|
||||||
"github_com_rede5_gohorsejobs_backend_internal_core_dto.LoginRequest": {
|
"dto.CreateApplicationRequest": {
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"email": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"password": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"github_com_rede5_gohorsejobs_backend_internal_core_dto.SaveFCMTokenRequest": {
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"platform": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"token": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"github_com_rede5_gohorsejobs_backend_internal_dto.CreateApplicationRequest": {
|
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": [
|
"required": [
|
||||||
"jobId"
|
"jobId"
|
||||||
|
|
@ -2218,7 +2280,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"github_com_rede5_gohorsejobs_backend_internal_dto.CreateJobRequest": {
|
"dto.CreateJobRequest": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": [
|
"required": [
|
||||||
"companyId",
|
"companyId",
|
||||||
|
|
@ -2327,16 +2389,16 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"github_com_rede5_gohorsejobs_backend_internal_dto.PaginatedResponse": {
|
"dto.PaginatedResponse": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"data": {},
|
"data": {},
|
||||||
"pagination": {
|
"pagination": {
|
||||||
"$ref": "#/definitions/github_com_rede5_gohorsejobs_backend_internal_dto.Pagination"
|
"$ref": "#/definitions/dto.Pagination"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"github_com_rede5_gohorsejobs_backend_internal_dto.Pagination": {
|
"dto.Pagination": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"limit": {
|
"limit": {
|
||||||
|
|
@ -2350,7 +2412,54 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"github_com_rede5_gohorsejobs_backend_internal_dto.UpdateApplicationStatusRequest": {
|
"dto.RegisterCandidateRequest": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"address": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"birthDate": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"city": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"education": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"email": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"experience": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"objective": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"password": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"phone": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"skills": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"state": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"username": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"zipCode": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"dto.UpdateApplicationStatusRequest": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": [
|
"required": [
|
||||||
"status"
|
"status"
|
||||||
|
|
@ -2371,7 +2480,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"github_com_rede5_gohorsejobs_backend_internal_dto.UpdateCompanyRequest": {
|
"dto.UpdateCompanyRequest": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"active": {
|
"active": {
|
||||||
|
|
@ -2422,7 +2531,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"github_com_rede5_gohorsejobs_backend_internal_dto.UpdateJobRequest": {
|
"dto.UpdateJobRequest": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"benefits": {
|
"benefits": {
|
||||||
|
|
@ -2523,7 +2632,113 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"github_com_rede5_gohorsejobs_backend_internal_models.Application": {
|
"github_com_rede5_gohorsejobs_backend_internal_core_dto.LoginRequest": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"email": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"password": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"github_com_rede5_gohorsejobs_backend_internal_core_dto.SaveFCMTokenRequest": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"platform": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"token": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"handlers.CreateCheckoutRequest": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"cancelUrl": {
|
||||||
|
"description": "URL after cancel",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"jobId": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"priceId": {
|
||||||
|
"description": "Stripe Price ID",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"successUrl": {
|
||||||
|
"description": "URL after success",
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"handlers.CreateCheckoutResponse": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"checkoutUrl": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"sessionId": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"handlers.DownloadURLRequest": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"key": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"handlers.DownloadURLResponse": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"downloadUrl": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"expiresIn": {
|
||||||
|
"description": "seconds",
|
||||||
|
"type": "integer"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"handlers.UploadURLRequest": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"contentType": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"filename": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"folder": {
|
||||||
|
"description": "Optional: logos, resumes, documents",
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"handlers.UploadURLResponse": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"expiresIn": {
|
||||||
|
"description": "seconds",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"key": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"publicUrl": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"uploadUrl": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"models.Application": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"createdAt": {
|
"createdAt": {
|
||||||
|
|
@ -2534,7 +2749,7 @@
|
||||||
"description": "Array of {type, url}",
|
"description": "Array of {type, url}",
|
||||||
"allOf": [
|
"allOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/github_com_rede5_gohorsejobs_backend_internal_models.JSONMap"
|
"$ref": "#/definitions/models.JSONMap"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
@ -2583,15 +2798,91 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"github_com_rede5_gohorsejobs_backend_internal_models.JSONMap": {
|
"models.ApplicationWithDetails": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"applicantName": {
|
||||||
|
"description": "From user or guest name",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"applicantPhone": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"companyId": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"companyName": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"createdAt": {
|
||||||
|
"description": "Metadata",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"documents": {
|
||||||
|
"description": "Array of {type, url}",
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/definitions/models.JSONMap"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"email": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"id": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"jobId": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"jobTitle": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"lineId": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"message": {
|
||||||
|
"description": "Application Content",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"description": "Applicant Info (for guest applications)",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"notes": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"phone": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"resumeUrl": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"status": {
|
||||||
|
"description": "Status \u0026 Notes",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"updatedAt": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"userId": {
|
||||||
|
"description": "NULL for guest applications",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"whatsapp": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"models.JSONMap": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"additionalProperties": true
|
"additionalProperties": true
|
||||||
},
|
},
|
||||||
"github_com_rede5_gohorsejobs_backend_internal_models.Job": {
|
"models.Job": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"benefits": {
|
"benefits": {
|
||||||
"$ref": "#/definitions/github_com_rede5_gohorsejobs_backend_internal_models.JSONMap"
|
"$ref": "#/definitions/models.JSONMap"
|
||||||
},
|
},
|
||||||
"cityId": {
|
"cityId": {
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
|
|
@ -2639,7 +2930,7 @@
|
||||||
"description": "Requirements \u0026 Benefits (JSONB arrays)",
|
"description": "Requirements \u0026 Benefits (JSONB arrays)",
|
||||||
"allOf": [
|
"allOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/github_com_rede5_gohorsejobs_backend_internal_models.JSONMap"
|
"$ref": "#/definitions/models.JSONMap"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
@ -2682,7 +2973,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"github_com_rede5_gohorsejobs_backend_internal_services.Conversation": {
|
"services.Conversation": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"candidateId": {
|
"candidateId": {
|
||||||
|
|
@ -2714,7 +3005,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"github_com_rede5_gohorsejobs_backend_internal_services.Message": {
|
"services.Message": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"content": {
|
"content": {
|
||||||
|
|
@ -2737,90 +3028,6 @@
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"internal_handlers.CreateCheckoutRequest": {
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"cancelUrl": {
|
|
||||||
"description": "URL after cancel",
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"jobId": {
|
|
||||||
"type": "integer"
|
|
||||||
},
|
|
||||||
"priceId": {
|
|
||||||
"description": "Stripe Price ID",
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"successUrl": {
|
|
||||||
"description": "URL after success",
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"internal_handlers.CreateCheckoutResponse": {
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"checkoutUrl": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"sessionId": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"internal_handlers.DownloadURLRequest": {
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"key": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"internal_handlers.DownloadURLResponse": {
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"downloadUrl": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"expiresIn": {
|
|
||||||
"description": "seconds",
|
|
||||||
"type": "integer"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"internal_handlers.UploadURLRequest": {
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"contentType": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"filename": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"folder": {
|
|
||||||
"description": "Optional: logos, resumes, documents",
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"internal_handlers.UploadURLResponse": {
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"expiresIn": {
|
|
||||||
"description": "seconds",
|
|
||||||
"type": "integer"
|
|
||||||
},
|
|
||||||
"key": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"publicUrl": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"uploadUrl": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"securityDefinitions": {
|
"securityDefinitions": {
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,6 @@
|
||||||
basePath: /
|
basePath: /
|
||||||
definitions:
|
definitions:
|
||||||
github_com_rede5_gohorsejobs_backend_internal_core_dto.LoginRequest:
|
dto.CreateApplicationRequest:
|
||||||
properties:
|
|
||||||
email:
|
|
||||||
type: string
|
|
||||||
password:
|
|
||||||
type: string
|
|
||||||
type: object
|
|
||||||
github_com_rede5_gohorsejobs_backend_internal_core_dto.SaveFCMTokenRequest:
|
|
||||||
properties:
|
|
||||||
platform:
|
|
||||||
type: string
|
|
||||||
token:
|
|
||||||
type: string
|
|
||||||
type: object
|
|
||||||
github_com_rede5_gohorsejobs_backend_internal_dto.CreateApplicationRequest:
|
|
||||||
properties:
|
properties:
|
||||||
documents:
|
documents:
|
||||||
additionalProperties: true
|
additionalProperties: true
|
||||||
|
|
@ -40,7 +26,7 @@ definitions:
|
||||||
required:
|
required:
|
||||||
- jobId
|
- jobId
|
||||||
type: object
|
type: object
|
||||||
github_com_rede5_gohorsejobs_backend_internal_dto.CreateJobRequest:
|
dto.CreateJobRequest:
|
||||||
properties:
|
properties:
|
||||||
benefits:
|
benefits:
|
||||||
additionalProperties: true
|
additionalProperties: true
|
||||||
|
|
@ -124,13 +110,13 @@ definitions:
|
||||||
- description
|
- description
|
||||||
- title
|
- title
|
||||||
type: object
|
type: object
|
||||||
github_com_rede5_gohorsejobs_backend_internal_dto.PaginatedResponse:
|
dto.PaginatedResponse:
|
||||||
properties:
|
properties:
|
||||||
data: {}
|
data: {}
|
||||||
pagination:
|
pagination:
|
||||||
$ref: '#/definitions/github_com_rede5_gohorsejobs_backend_internal_dto.Pagination'
|
$ref: '#/definitions/dto.Pagination'
|
||||||
type: object
|
type: object
|
||||||
github_com_rede5_gohorsejobs_backend_internal_dto.Pagination:
|
dto.Pagination:
|
||||||
properties:
|
properties:
|
||||||
limit:
|
limit:
|
||||||
type: integer
|
type: integer
|
||||||
|
|
@ -139,7 +125,38 @@ definitions:
|
||||||
total:
|
total:
|
||||||
type: integer
|
type: integer
|
||||||
type: object
|
type: object
|
||||||
github_com_rede5_gohorsejobs_backend_internal_dto.UpdateApplicationStatusRequest:
|
dto.RegisterCandidateRequest:
|
||||||
|
properties:
|
||||||
|
address:
|
||||||
|
type: string
|
||||||
|
birthDate:
|
||||||
|
type: string
|
||||||
|
city:
|
||||||
|
type: string
|
||||||
|
education:
|
||||||
|
type: string
|
||||||
|
email:
|
||||||
|
type: string
|
||||||
|
experience:
|
||||||
|
type: string
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
objective:
|
||||||
|
type: string
|
||||||
|
password:
|
||||||
|
type: string
|
||||||
|
phone:
|
||||||
|
type: string
|
||||||
|
skills:
|
||||||
|
type: string
|
||||||
|
state:
|
||||||
|
type: string
|
||||||
|
username:
|
||||||
|
type: string
|
||||||
|
zipCode:
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
dto.UpdateApplicationStatusRequest:
|
||||||
properties:
|
properties:
|
||||||
notes:
|
notes:
|
||||||
type: string
|
type: string
|
||||||
|
|
@ -154,7 +171,7 @@ definitions:
|
||||||
required:
|
required:
|
||||||
- status
|
- status
|
||||||
type: object
|
type: object
|
||||||
github_com_rede5_gohorsejobs_backend_internal_dto.UpdateCompanyRequest:
|
dto.UpdateCompanyRequest:
|
||||||
properties:
|
properties:
|
||||||
active:
|
active:
|
||||||
type: boolean
|
type: boolean
|
||||||
|
|
@ -189,7 +206,7 @@ definitions:
|
||||||
website:
|
website:
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
github_com_rede5_gohorsejobs_backend_internal_dto.UpdateJobRequest:
|
dto.UpdateJobRequest:
|
||||||
properties:
|
properties:
|
||||||
benefits:
|
benefits:
|
||||||
additionalProperties: true
|
additionalProperties: true
|
||||||
|
|
@ -267,14 +284,84 @@ definitions:
|
||||||
workingHours:
|
workingHours:
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
github_com_rede5_gohorsejobs_backend_internal_models.Application:
|
github_com_rede5_gohorsejobs_backend_internal_core_dto.LoginRequest:
|
||||||
|
properties:
|
||||||
|
email:
|
||||||
|
type: string
|
||||||
|
password:
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
github_com_rede5_gohorsejobs_backend_internal_core_dto.SaveFCMTokenRequest:
|
||||||
|
properties:
|
||||||
|
platform:
|
||||||
|
type: string
|
||||||
|
token:
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
handlers.CreateCheckoutRequest:
|
||||||
|
properties:
|
||||||
|
cancelUrl:
|
||||||
|
description: URL after cancel
|
||||||
|
type: string
|
||||||
|
jobId:
|
||||||
|
type: integer
|
||||||
|
priceId:
|
||||||
|
description: Stripe Price ID
|
||||||
|
type: string
|
||||||
|
successUrl:
|
||||||
|
description: URL after success
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
handlers.CreateCheckoutResponse:
|
||||||
|
properties:
|
||||||
|
checkoutUrl:
|
||||||
|
type: string
|
||||||
|
sessionId:
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
handlers.DownloadURLRequest:
|
||||||
|
properties:
|
||||||
|
key:
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
handlers.DownloadURLResponse:
|
||||||
|
properties:
|
||||||
|
downloadUrl:
|
||||||
|
type: string
|
||||||
|
expiresIn:
|
||||||
|
description: seconds
|
||||||
|
type: integer
|
||||||
|
type: object
|
||||||
|
handlers.UploadURLRequest:
|
||||||
|
properties:
|
||||||
|
contentType:
|
||||||
|
type: string
|
||||||
|
filename:
|
||||||
|
type: string
|
||||||
|
folder:
|
||||||
|
description: 'Optional: logos, resumes, documents'
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
handlers.UploadURLResponse:
|
||||||
|
properties:
|
||||||
|
expiresIn:
|
||||||
|
description: seconds
|
||||||
|
type: integer
|
||||||
|
key:
|
||||||
|
type: string
|
||||||
|
publicUrl:
|
||||||
|
type: string
|
||||||
|
uploadUrl:
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
models.Application:
|
||||||
properties:
|
properties:
|
||||||
createdAt:
|
createdAt:
|
||||||
description: Metadata
|
description: Metadata
|
||||||
type: string
|
type: string
|
||||||
documents:
|
documents:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: '#/definitions/github_com_rede5_gohorsejobs_backend_internal_models.JSONMap'
|
- $ref: '#/definitions/models.JSONMap'
|
||||||
description: Array of {type, url}
|
description: Array of {type, url}
|
||||||
email:
|
email:
|
||||||
type: string
|
type: string
|
||||||
|
|
@ -307,13 +394,64 @@ definitions:
|
||||||
whatsapp:
|
whatsapp:
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
github_com_rede5_gohorsejobs_backend_internal_models.JSONMap:
|
models.ApplicationWithDetails:
|
||||||
|
properties:
|
||||||
|
applicantName:
|
||||||
|
description: From user or guest name
|
||||||
|
type: string
|
||||||
|
applicantPhone:
|
||||||
|
type: string
|
||||||
|
companyId:
|
||||||
|
type: string
|
||||||
|
companyName:
|
||||||
|
type: string
|
||||||
|
createdAt:
|
||||||
|
description: Metadata
|
||||||
|
type: string
|
||||||
|
documents:
|
||||||
|
allOf:
|
||||||
|
- $ref: '#/definitions/models.JSONMap'
|
||||||
|
description: Array of {type, url}
|
||||||
|
email:
|
||||||
|
type: string
|
||||||
|
id:
|
||||||
|
type: string
|
||||||
|
jobId:
|
||||||
|
type: string
|
||||||
|
jobTitle:
|
||||||
|
type: string
|
||||||
|
lineId:
|
||||||
|
type: string
|
||||||
|
message:
|
||||||
|
description: Application Content
|
||||||
|
type: string
|
||||||
|
name:
|
||||||
|
description: Applicant Info (for guest applications)
|
||||||
|
type: string
|
||||||
|
notes:
|
||||||
|
type: string
|
||||||
|
phone:
|
||||||
|
type: string
|
||||||
|
resumeUrl:
|
||||||
|
type: string
|
||||||
|
status:
|
||||||
|
description: Status & Notes
|
||||||
|
type: string
|
||||||
|
updatedAt:
|
||||||
|
type: string
|
||||||
|
userId:
|
||||||
|
description: NULL for guest applications
|
||||||
|
type: string
|
||||||
|
whatsapp:
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
models.JSONMap:
|
||||||
additionalProperties: true
|
additionalProperties: true
|
||||||
type: object
|
type: object
|
||||||
github_com_rede5_gohorsejobs_backend_internal_models.Job:
|
models.Job:
|
||||||
properties:
|
properties:
|
||||||
benefits:
|
benefits:
|
||||||
$ref: '#/definitions/github_com_rede5_gohorsejobs_backend_internal_models.JSONMap'
|
$ref: '#/definitions/models.JSONMap'
|
||||||
cityId:
|
cityId:
|
||||||
type: integer
|
type: integer
|
||||||
companyId:
|
companyId:
|
||||||
|
|
@ -346,7 +484,7 @@ definitions:
|
||||||
type: integer
|
type: integer
|
||||||
requirements:
|
requirements:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: '#/definitions/github_com_rede5_gohorsejobs_backend_internal_models.JSONMap'
|
- $ref: '#/definitions/models.JSONMap'
|
||||||
description: Requirements & Benefits (JSONB arrays)
|
description: Requirements & Benefits (JSONB arrays)
|
||||||
salaryMax:
|
salaryMax:
|
||||||
type: number
|
type: number
|
||||||
|
|
@ -376,7 +514,7 @@ definitions:
|
||||||
workingHours:
|
workingHours:
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
github_com_rede5_gohorsejobs_backend_internal_services.Conversation:
|
services.Conversation:
|
||||||
properties:
|
properties:
|
||||||
candidateId:
|
candidateId:
|
||||||
type: string
|
type: string
|
||||||
|
|
@ -397,7 +535,7 @@ definitions:
|
||||||
unreadCount:
|
unreadCount:
|
||||||
type: integer
|
type: integer
|
||||||
type: object
|
type: object
|
||||||
github_com_rede5_gohorsejobs_backend_internal_services.Message:
|
services.Message:
|
||||||
properties:
|
properties:
|
||||||
content:
|
content:
|
||||||
type: string
|
type: string
|
||||||
|
|
@ -413,62 +551,6 @@ definitions:
|
||||||
senderId:
|
senderId:
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
internal_handlers.CreateCheckoutRequest:
|
|
||||||
properties:
|
|
||||||
cancelUrl:
|
|
||||||
description: URL after cancel
|
|
||||||
type: string
|
|
||||||
jobId:
|
|
||||||
type: integer
|
|
||||||
priceId:
|
|
||||||
description: Stripe Price ID
|
|
||||||
type: string
|
|
||||||
successUrl:
|
|
||||||
description: URL after success
|
|
||||||
type: string
|
|
||||||
type: object
|
|
||||||
internal_handlers.CreateCheckoutResponse:
|
|
||||||
properties:
|
|
||||||
checkoutUrl:
|
|
||||||
type: string
|
|
||||||
sessionId:
|
|
||||||
type: string
|
|
||||||
type: object
|
|
||||||
internal_handlers.DownloadURLRequest:
|
|
||||||
properties:
|
|
||||||
key:
|
|
||||||
type: string
|
|
||||||
type: object
|
|
||||||
internal_handlers.DownloadURLResponse:
|
|
||||||
properties:
|
|
||||||
downloadUrl:
|
|
||||||
type: string
|
|
||||||
expiresIn:
|
|
||||||
description: seconds
|
|
||||||
type: integer
|
|
||||||
type: object
|
|
||||||
internal_handlers.UploadURLRequest:
|
|
||||||
properties:
|
|
||||||
contentType:
|
|
||||||
type: string
|
|
||||||
filename:
|
|
||||||
type: string
|
|
||||||
folder:
|
|
||||||
description: 'Optional: logos, resumes, documents'
|
|
||||||
type: string
|
|
||||||
type: object
|
|
||||||
internal_handlers.UploadURLResponse:
|
|
||||||
properties:
|
|
||||||
expiresIn:
|
|
||||||
description: seconds
|
|
||||||
type: integer
|
|
||||||
key:
|
|
||||||
type: string
|
|
||||||
publicUrl:
|
|
||||||
type: string
|
|
||||||
uploadUrl:
|
|
||||||
type: string
|
|
||||||
type: object
|
|
||||||
info:
|
info:
|
||||||
contact: {}
|
contact: {}
|
||||||
description: API for GoHorseJobs recruitment platform.
|
description: API for GoHorseJobs recruitment platform.
|
||||||
|
|
@ -509,7 +591,7 @@ paths:
|
||||||
in: query
|
in: query
|
||||||
name: jobId
|
name: jobId
|
||||||
required: true
|
required: true
|
||||||
type: integer
|
type: string
|
||||||
produces:
|
produces:
|
||||||
- application/json
|
- application/json
|
||||||
responses:
|
responses:
|
||||||
|
|
@ -517,7 +599,7 @@ paths:
|
||||||
description: OK
|
description: OK
|
||||||
schema:
|
schema:
|
||||||
items:
|
items:
|
||||||
$ref: '#/definitions/github_com_rede5_gohorsejobs_backend_internal_models.Application'
|
$ref: '#/definitions/models.Application'
|
||||||
type: array
|
type: array
|
||||||
"400":
|
"400":
|
||||||
description: Bad Request
|
description: Bad Request
|
||||||
|
|
@ -540,14 +622,14 @@ paths:
|
||||||
name: application
|
name: application
|
||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/github_com_rede5_gohorsejobs_backend_internal_dto.CreateApplicationRequest'
|
$ref: '#/definitions/dto.CreateApplicationRequest'
|
||||||
produces:
|
produces:
|
||||||
- application/json
|
- application/json
|
||||||
responses:
|
responses:
|
||||||
"201":
|
"201":
|
||||||
description: Created
|
description: Created
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/github_com_rede5_gohorsejobs_backend_internal_models.Application'
|
$ref: '#/definitions/models.Application'
|
||||||
"400":
|
"400":
|
||||||
description: Bad Request
|
description: Bad Request
|
||||||
schema:
|
schema:
|
||||||
|
|
@ -595,14 +677,14 @@ paths:
|
||||||
in: path
|
in: path
|
||||||
name: id
|
name: id
|
||||||
required: true
|
required: true
|
||||||
type: integer
|
type: string
|
||||||
produces:
|
produces:
|
||||||
- application/json
|
- application/json
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: OK
|
description: OK
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/github_com_rede5_gohorsejobs_backend_internal_models.Application'
|
$ref: '#/definitions/models.Application'
|
||||||
"400":
|
"400":
|
||||||
description: Bad Request
|
description: Bad Request
|
||||||
schema:
|
schema:
|
||||||
|
|
@ -624,20 +706,20 @@ paths:
|
||||||
in: path
|
in: path
|
||||||
name: id
|
name: id
|
||||||
required: true
|
required: true
|
||||||
type: integer
|
type: string
|
||||||
- description: Status update
|
- description: Status update
|
||||||
in: body
|
in: body
|
||||||
name: body
|
name: body
|
||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/github_com_rede5_gohorsejobs_backend_internal_dto.UpdateApplicationStatusRequest'
|
$ref: '#/definitions/dto.UpdateApplicationStatusRequest'
|
||||||
produces:
|
produces:
|
||||||
- application/json
|
- application/json
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: OK
|
description: OK
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/github_com_rede5_gohorsejobs_backend_internal_models.Application'
|
$ref: '#/definitions/models.Application'
|
||||||
"400":
|
"400":
|
||||||
description: Bad Request
|
description: Bad Request
|
||||||
schema:
|
schema:
|
||||||
|
|
@ -649,6 +731,31 @@ paths:
|
||||||
summary: Update Application Status
|
summary: Update Application Status
|
||||||
tags:
|
tags:
|
||||||
- Applications
|
- Applications
|
||||||
|
/api/v1/applications/me:
|
||||||
|
get:
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
description: List all applications for the logged-in user
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
schema:
|
||||||
|
items:
|
||||||
|
$ref: '#/definitions/models.ApplicationWithDetails'
|
||||||
|
type: array
|
||||||
|
"401":
|
||||||
|
description: Unauthorized
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
"500":
|
||||||
|
description: Internal Server Error
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
summary: Get My Applications
|
||||||
|
tags:
|
||||||
|
- Applications
|
||||||
/api/v1/auth/login:
|
/api/v1/auth/login:
|
||||||
post:
|
post:
|
||||||
consumes:
|
consumes:
|
||||||
|
|
@ -691,6 +798,36 @@ paths:
|
||||||
summary: User Logout
|
summary: User Logout
|
||||||
tags:
|
tags:
|
||||||
- Auth
|
- Auth
|
||||||
|
/api/v1/auth/register:
|
||||||
|
post:
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
description: Register a new candidate account.
|
||||||
|
parameters:
|
||||||
|
- description: Registration Details
|
||||||
|
in: body
|
||||||
|
name: register
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/dto.RegisterCandidateRequest'
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
responses:
|
||||||
|
"201":
|
||||||
|
description: Created
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
"400":
|
||||||
|
description: Invalid Request
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
"409":
|
||||||
|
description: Conflict
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
summary: Register Candidate
|
||||||
|
tags:
|
||||||
|
- Auth
|
||||||
/api/v1/companies:
|
/api/v1/companies:
|
||||||
get:
|
get:
|
||||||
consumes:
|
consumes:
|
||||||
|
|
@ -805,7 +942,7 @@ paths:
|
||||||
name: body
|
name: body
|
||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/github_com_rede5_gohorsejobs_backend_internal_dto.UpdateCompanyRequest'
|
$ref: '#/definitions/dto.UpdateCompanyRequest'
|
||||||
produces:
|
produces:
|
||||||
- application/json
|
- application/json
|
||||||
responses:
|
responses:
|
||||||
|
|
@ -842,7 +979,7 @@ paths:
|
||||||
description: OK
|
description: OK
|
||||||
schema:
|
schema:
|
||||||
items:
|
items:
|
||||||
$ref: '#/definitions/github_com_rede5_gohorsejobs_backend_internal_services.Conversation'
|
$ref: '#/definitions/services.Conversation'
|
||||||
type: array
|
type: array
|
||||||
security:
|
security:
|
||||||
- BearerAuth: []
|
- BearerAuth: []
|
||||||
|
|
@ -867,7 +1004,7 @@ paths:
|
||||||
description: OK
|
description: OK
|
||||||
schema:
|
schema:
|
||||||
items:
|
items:
|
||||||
$ref: '#/definitions/github_com_rede5_gohorsejobs_backend_internal_services.Message'
|
$ref: '#/definitions/services.Message'
|
||||||
type: array
|
type: array
|
||||||
security:
|
security:
|
||||||
- BearerAuth: []
|
- BearerAuth: []
|
||||||
|
|
@ -898,7 +1035,7 @@ paths:
|
||||||
"200":
|
"200":
|
||||||
description: OK
|
description: OK
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/github_com_rede5_gohorsejobs_backend_internal_services.Message'
|
$ref: '#/definitions/services.Message'
|
||||||
security:
|
security:
|
||||||
- BearerAuth: []
|
- BearerAuth: []
|
||||||
summary: Send Message
|
summary: Send Message
|
||||||
|
|
@ -921,7 +1058,7 @@ paths:
|
||||||
- description: Filter by company ID
|
- description: Filter by company ID
|
||||||
in: query
|
in: query
|
||||||
name: companyId
|
name: companyId
|
||||||
type: integer
|
type: string
|
||||||
- description: Filter by featured status
|
- description: Filter by featured status
|
||||||
in: query
|
in: query
|
||||||
name: featured
|
name: featured
|
||||||
|
|
@ -932,7 +1069,7 @@ paths:
|
||||||
"200":
|
"200":
|
||||||
description: OK
|
description: OK
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/github_com_rede5_gohorsejobs_backend_internal_dto.PaginatedResponse'
|
$ref: '#/definitions/dto.PaginatedResponse'
|
||||||
"500":
|
"500":
|
||||||
description: Internal Server Error
|
description: Internal Server Error
|
||||||
schema:
|
schema:
|
||||||
|
|
@ -950,14 +1087,14 @@ paths:
|
||||||
name: job
|
name: job
|
||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/github_com_rede5_gohorsejobs_backend_internal_dto.CreateJobRequest'
|
$ref: '#/definitions/dto.CreateJobRequest'
|
||||||
produces:
|
produces:
|
||||||
- application/json
|
- application/json
|
||||||
responses:
|
responses:
|
||||||
"201":
|
"201":
|
||||||
description: Created
|
description: Created
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/github_com_rede5_gohorsejobs_backend_internal_models.Job'
|
$ref: '#/definitions/models.Job'
|
||||||
"400":
|
"400":
|
||||||
description: Bad Request
|
description: Bad Request
|
||||||
schema:
|
schema:
|
||||||
|
|
@ -983,7 +1120,7 @@ paths:
|
||||||
in: path
|
in: path
|
||||||
name: id
|
name: id
|
||||||
required: true
|
required: true
|
||||||
type: integer
|
type: string
|
||||||
produces:
|
produces:
|
||||||
- application/json
|
- application/json
|
||||||
responses:
|
responses:
|
||||||
|
|
@ -1009,14 +1146,14 @@ paths:
|
||||||
in: path
|
in: path
|
||||||
name: id
|
name: id
|
||||||
required: true
|
required: true
|
||||||
type: integer
|
type: string
|
||||||
produces:
|
produces:
|
||||||
- application/json
|
- application/json
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: OK
|
description: OK
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/github_com_rede5_gohorsejobs_backend_internal_models.Job'
|
$ref: '#/definitions/models.Job'
|
||||||
"400":
|
"400":
|
||||||
description: Bad Request
|
description: Bad Request
|
||||||
schema:
|
schema:
|
||||||
|
|
@ -1037,20 +1174,20 @@ paths:
|
||||||
in: path
|
in: path
|
||||||
name: id
|
name: id
|
||||||
required: true
|
required: true
|
||||||
type: integer
|
type: string
|
||||||
- description: Updated job data
|
- description: Updated job data
|
||||||
in: body
|
in: body
|
||||||
name: job
|
name: job
|
||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/github_com_rede5_gohorsejobs_backend_internal_dto.UpdateJobRequest'
|
$ref: '#/definitions/dto.UpdateJobRequest'
|
||||||
produces:
|
produces:
|
||||||
- application/json
|
- application/json
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: OK
|
description: OK
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/github_com_rede5_gohorsejobs_backend_internal_models.Job'
|
$ref: '#/definitions/models.Job'
|
||||||
"400":
|
"400":
|
||||||
description: Bad Request
|
description: Bad Request
|
||||||
schema:
|
schema:
|
||||||
|
|
@ -1144,14 +1281,14 @@ paths:
|
||||||
name: request
|
name: request
|
||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/internal_handlers.CreateCheckoutRequest'
|
$ref: '#/definitions/handlers.CreateCheckoutRequest'
|
||||||
produces:
|
produces:
|
||||||
- application/json
|
- application/json
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: OK
|
description: OK
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/internal_handlers.CreateCheckoutResponse'
|
$ref: '#/definitions/handlers.CreateCheckoutResponse'
|
||||||
"400":
|
"400":
|
||||||
description: Bad Request
|
description: Bad Request
|
||||||
schema:
|
schema:
|
||||||
|
|
@ -1219,14 +1356,14 @@ paths:
|
||||||
name: request
|
name: request
|
||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/internal_handlers.DownloadURLRequest'
|
$ref: '#/definitions/handlers.DownloadURLRequest'
|
||||||
produces:
|
produces:
|
||||||
- application/json
|
- application/json
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: OK
|
description: OK
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/internal_handlers.DownloadURLResponse'
|
$ref: '#/definitions/handlers.DownloadURLResponse'
|
||||||
"400":
|
"400":
|
||||||
description: Bad Request
|
description: Bad Request
|
||||||
schema:
|
schema:
|
||||||
|
|
@ -1280,14 +1417,14 @@ paths:
|
||||||
name: request
|
name: request
|
||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/internal_handlers.UploadURLRequest'
|
$ref: '#/definitions/handlers.UploadURLRequest'
|
||||||
produces:
|
produces:
|
||||||
- application/json
|
- application/json
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: OK
|
description: OK
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/internal_handlers.UploadURLResponse'
|
$ref: '#/definitions/handlers.UploadURLResponse'
|
||||||
"400":
|
"400":
|
||||||
description: Bad Request
|
description: Bad Request
|
||||||
schema:
|
schema:
|
||||||
|
|
|
||||||
|
|
@ -134,6 +134,16 @@ func (h *CoreHandlers) Logout(w http.ResponseWriter, r *http.Request) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// RegisterCandidate handles public registration for candidates
|
// RegisterCandidate handles public registration for candidates
|
||||||
|
// @Summary Register Candidate
|
||||||
|
// @Description Register a new candidate account.
|
||||||
|
// @Tags Auth
|
||||||
|
// @Accept json
|
||||||
|
// @Produce json
|
||||||
|
// @Param register body dto.RegisterCandidateRequest true "Registration Details"
|
||||||
|
// @Success 201 {object} object
|
||||||
|
// @Failure 400 {string} string "Invalid Request"
|
||||||
|
// @Failure 409 {string} string "Conflict"
|
||||||
|
// @Router /api/v1/auth/register [post]
|
||||||
func (h *CoreHandlers) RegisterCandidate(w http.ResponseWriter, r *http.Request) {
|
func (h *CoreHandlers) RegisterCandidate(w http.ResponseWriter, r *http.Request) {
|
||||||
var req dto.RegisterCandidateRequest
|
var req dto.RegisterCandidateRequest
|
||||||
if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
|
if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import (
|
||||||
"database/sql"
|
"database/sql"
|
||||||
"fmt"
|
"fmt"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
|
@ -61,6 +62,39 @@ func (s *SeederService) Reset(ctx context.Context) error {
|
||||||
func (s *SeederService) Seed(ctx context.Context, logChan chan string) error {
|
func (s *SeederService) Seed(ctx context.Context, logChan chan string) error {
|
||||||
s.SendEvent(logChan, "🚀 Starting Database Seed...")
|
s.SendEvent(logChan, "🚀 Starting Database Seed...")
|
||||||
|
|
||||||
|
// 0. Auto-Create Superadmin from Env
|
||||||
|
adminEmail := os.Getenv("ADMIN_EMAIL")
|
||||||
|
adminPass := os.Getenv("ADMIN_PASSWORD")
|
||||||
|
|
||||||
|
if adminEmail != "" && adminPass != "" {
|
||||||
|
s.SendEvent(logChan, fmt.Sprintf("🛡️ Found ADMIN_EMAIL env. Creating Superadmin: %s", adminEmail))
|
||||||
|
|
||||||
|
// Hash password
|
||||||
|
hash, err := bcrypt.GenerateFromPassword([]byte(adminPass), bcrypt.DefaultCost)
|
||||||
|
if err == nil {
|
||||||
|
tx, err := s.DB.BeginTx(ctx, nil)
|
||||||
|
if err == nil {
|
||||||
|
adminID := uuid.New().String()
|
||||||
|
_, execErr := tx.ExecContext(ctx, `
|
||||||
|
INSERT INTO users (id, identifier, full_name, password_hash, role, created_at, updated_at)
|
||||||
|
VALUES ($1, $2, 'System Master', $3, 'superadmin', NOW(), NOW())
|
||||||
|
ON CONFLICT (identifier) DO UPDATE
|
||||||
|
SET password_hash = EXCLUDED.password_hash,
|
||||||
|
role = 'superadmin',
|
||||||
|
updated_at = NOW()
|
||||||
|
`, adminID, adminEmail, string(hash))
|
||||||
|
|
||||||
|
if execErr == nil {
|
||||||
|
tx.Commit()
|
||||||
|
s.SendEvent(logChan, "✅ Superadmin created/verified successfully.")
|
||||||
|
} else {
|
||||||
|
tx.Rollback()
|
||||||
|
s.SendEvent(logChan, fmt.Sprintf("❌ Failed to create Superadmin: %v", execErr))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Create Random Source
|
// Create Random Source
|
||||||
rnd := rand.New(rand.NewSource(time.Now().UnixNano()))
|
rnd := rand.New(rand.NewSource(time.Now().UnixNano()))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue