Feat(BE-36,37,38,39): master area, customer, kandang, location, warehouse

This commit is contained in:
Hafizh A. Y
2025-10-02 10:51:15 +07:00
parent dbc1f79a36
commit e8905be856
79 changed files with 3745 additions and 169 deletions
+39
View File
@@ -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
/**