mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 13:31:56 +00:00
Feat(BE-36,37,38,39): master area, customer, kandang, location, warehouse
This commit is contained in:
@@ -9,6 +9,29 @@ const (
|
||||
FlagIsActive FlagType = "IS_ACTIVE"
|
||||
)
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// WarehouseType
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
type WarehouseType string
|
||||
|
||||
const (
|
||||
WarehouseTypeArea WarehouseType = "AREA"
|
||||
WarehouseTypeLokasi WarehouseType = "LOKASI"
|
||||
WarehouseTypeKandang WarehouseType = "KANDANG"
|
||||
)
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// WarehouseType
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
type CustomerSupplierType string
|
||||
|
||||
const (
|
||||
CustomerSupplierTypeBisnis CustomerSupplierType = "BISNIS"
|
||||
CustomerSupplierTypeIndividual CustomerSupplierType = "INDIVIDUAL"
|
||||
)
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Validators
|
||||
// -------------------------------------------------------------------
|
||||
@@ -21,6 +44,22 @@ func IsValidFlagType(v string) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func IsValidWarehouseType(v string) bool {
|
||||
switch WarehouseType(v) {
|
||||
case WarehouseTypeArea, WarehouseTypeLokasi, WarehouseTypeKandang:
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func IsValidCustomerSupplierType(v string) bool {
|
||||
switch CustomerSupplierType(v) {
|
||||
case CustomerSupplierTypeBisnis, CustomerSupplierTypeIndividual:
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// example use
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user