78 lines
2.9 KiB
Go
78 lines
2.9 KiB
Go
package dto
|
|
|
|
import (
|
|
"errors"
|
|
|
|
pkgdto "github.com/Caknoooo/go-gin-clean-starter/pkg/dto"
|
|
)
|
|
|
|
const (
|
|
MESSAGE_FAILED_CREATE_AISLE = "failed create aisle"
|
|
MESSAGE_SUCCESS_CREATE_AISLE = "success create aisle"
|
|
MESSAGE_FAILED_GET_AISLE = "failed get aisle"
|
|
MESSAGE_SUCCESS_GET_AISLE = "success get aisle"
|
|
MESSAGE_FAILED_UPDATE_AISLE = "failed update aisle"
|
|
MESSAGE_SUCCESS_UPDATE_AISLE = "success update aisle"
|
|
MESSAGE_FAILED_DELETE_AISLE = "failed delete aisle"
|
|
MESSAGE_SUCCESS_DELETE_AISLE = "success delete aisle"
|
|
MESSAGE_FAILED_GET_DATA_FROM_BODY = "failed get data from body"
|
|
)
|
|
|
|
var (
|
|
ErrCreateAisle = errors.New("failed to create aisle")
|
|
ErrGetAisleById = errors.New("failed to get aisle by id")
|
|
ErrUpdateAisle = errors.New("failed to update aisle")
|
|
ErrDeleteAisle = errors.New("failed to delete aisle")
|
|
)
|
|
|
|
type AisleCreateRequest struct {
|
|
Code string `json:"code" binding:"required"`
|
|
Name string `json:"name" binding:"required"`
|
|
IsleX int `json:"isle_x"`
|
|
BinY int `json:"bin_y"`
|
|
LevelZ int `json:"level_z"`
|
|
DimLength float64 `json:"dim_length"`
|
|
DimWidth float64 `json:"dim_width"`
|
|
DimHeight float64 `json:"dim_height"`
|
|
Weight float64 `json:"weight"`
|
|
QrCodeAisle string `json:"qr_code_aisle"`
|
|
IsActive bool `json:"is_active"`
|
|
ZoneID string `json:"zone_id" binding:"required"`
|
|
DimUomID string `json:"dim_uom_id" binding:"required"`
|
|
WeightUomID string `json:"weight_uom_id" binding:"required"`
|
|
ClientID string `json:"client_id" binding:"required"`
|
|
}
|
|
|
|
type AisleUpdateRequest struct {
|
|
Code string `json:"code"`
|
|
Name string `json:"name"`
|
|
IsleX int `json:"isle_x"`
|
|
BinY int `json:"bin_y"`
|
|
LevelZ int `json:"level_z"`
|
|
DimLength float64 `json:"dim_length"`
|
|
DimWidth float64 `json:"dim_width"`
|
|
DimHeight float64 `json:"dim_height"`
|
|
Weight float64 `json:"weight"`
|
|
QrCodeAisle string `json:"qr_code_aisle"`
|
|
IsActive bool `json:"is_active"`
|
|
}
|
|
|
|
type AisleResponse struct {
|
|
ID string `json:"id"`
|
|
Code string `json:"code"`
|
|
Name string `json:"name"`
|
|
IsleX int `json:"isle_x"`
|
|
BinY int `json:"bin_y"`
|
|
LevelZ int `json:"level_z"`
|
|
DimLength float64 `json:"dim_length"`
|
|
DimWidth float64 `json:"dim_width"`
|
|
DimHeight float64 `json:"dim_height"`
|
|
Weight float64 `json:"weight"`
|
|
QrCodeAisle string `json:"qr_code_aisle"`
|
|
IsActive bool `json:"is_active"`
|
|
Zone pkgdto.IdNameResponse `json:"zone"`
|
|
DimUom pkgdto.IdNameResponse `json:"dim_uom_id"`
|
|
WeightUom pkgdto.IdNameResponse `json:"weight_uom_id"`
|
|
Client pkgdto.IdNameResponse `json:"client_id"`
|
|
}
|