68 lines
2.3 KiB
Go
68 lines
2.3 KiB
Go
package dto
|
|
|
|
import "errors"
|
|
|
|
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 string `json:"isle_x"`
|
|
BinY string `json:"bin_y"`
|
|
LevelZ string `json:"level_z"`
|
|
Dimension string `json:"dimension"`
|
|
Weight string `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 string `json:"isle_x"`
|
|
BinY string `json:"bin_y"`
|
|
LevelZ string `json:"level_z"`
|
|
Dimension string `json:"dimension"`
|
|
Weight string `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 string `json:"isle_x"`
|
|
BinY string `json:"bin_y"`
|
|
LevelZ string `json:"level_z"`
|
|
Dimension string `json:"dimension"`
|
|
Weight string `json:"weight"`
|
|
QrCodeAisle string `json:"qr_code_aisle"`
|
|
IsActive bool `json:"is_active"`
|
|
ZoneID string `json:"zone_id"`
|
|
DimUomID string `json:"dim_uom_id"`
|
|
WeightUomID string `json:"weight_uom_id"`
|
|
ClientID string `json:"client_id"`
|
|
}
|