From a0cd1f9a256d793fce3dc6c3f990d3de1515b682 Mon Sep 17 00:00:00 2001 From: teguh nugroho Date: Sat, 22 Aug 2026 22:11:25 +0700 Subject: [PATCH] city change --- docs/index.html | 333 ++++++++++++++---------- internal/handlers/dto/city.go | 4 +- internal/handlers/dto/cost_component.go | 2 +- 3 files changed, 204 insertions(+), 135 deletions(-) diff --git a/docs/index.html b/docs/index.html index 498da59..0c0e422 100644 --- a/docs/index.html +++ b/docs/index.html @@ -3,164 +3,233 @@ -Cargo ERP Backend API Docs +Cargo ERP Backend API Documentation
-

Cargo ERP Backend API

-

Master Data, Cost Components, Basic Pricing. Auth ignored for docs.

+

Cargo ERP Backend API Documentation

+

Complete reference for all API endpoints. No authentication required for testing.

-
Local (localhost:8080)
-
VPS (145.79.11.200:8080)
+
Local (localhost:8080)
+
VPS (145.79.11.200:8080)
-
- +
+
+
diff --git a/internal/handlers/dto/city.go b/internal/handlers/dto/city.go index 3d93fc0..2a8fe74 100644 --- a/internal/handlers/dto/city.go +++ b/internal/handlers/dto/city.go @@ -3,7 +3,7 @@ package dto type CreateCityRequest struct { Name string `json:"name" binding:"required,min=2"` ProvinceID string `json:"province_id" binding:"required"` - Port string `json:"port"` + Port string `json:"port" binding:"required"` } type CreateCityResponse struct { @@ -25,7 +25,7 @@ type CityFilterAllRequest struct { type UpdateCityRequest struct { Name string `json:"name" binding:"required,min=2"` ProvinceID string `json:"province_id" binding:"required"` - Port string `json:"port"` + Port string `json:"port" binding:"required"` } type ImportCityResponse struct { diff --git a/internal/handlers/dto/cost_component.go b/internal/handlers/dto/cost_component.go index 88469e6..c7a16e5 100644 --- a/internal/handlers/dto/cost_component.go +++ b/internal/handlers/dto/cost_component.go @@ -4,7 +4,7 @@ type CreateCostComponentRequest struct { Name string `json:"name" binding:"required,min=2"` Code string `json:"code" binding:"required"` Value string `json:"value" binding:"required"` - ComponentType int32 `json:"component_type"` + ComponentType int32 `json:"component_type" binding:""` } type CreateCostComponentResponse struct {