mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 13:31:56 +00:00
feat/BE/US-74/pengajuan-flock
This commit is contained in:
@@ -59,6 +59,7 @@ var allFlagTypes = func() map[FlagType]struct{} {
|
||||
return m
|
||||
}()
|
||||
|
||||
|
||||
func AllFlagTypes() map[FlagType]struct{} {
|
||||
return allFlagTypes
|
||||
}
|
||||
@@ -75,6 +76,8 @@ const (
|
||||
WarehouseTypeKandang WarehouseType = "KANDANG"
|
||||
)
|
||||
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// WarehouseType
|
||||
// -------------------------------------------------------------------
|
||||
@@ -97,6 +100,19 @@ const (
|
||||
SupplierCategorySapronak SupplierCategory = "SAPRONAK"
|
||||
)
|
||||
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Kandang Status
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
type KandangStatus string
|
||||
|
||||
const (
|
||||
KandangStatusNonActive KandangStatus = "NON_ACTIVE"
|
||||
KandangStatusPengajuan KandangStatus = "PENGAJUAN"
|
||||
KandangStatusActive KandangStatus = "ACTIVE"
|
||||
)
|
||||
// -------------------------------------------------------------------
|
||||
// Validators
|
||||
// -------------------------------------------------------------------
|
||||
@@ -191,6 +207,14 @@ func IsValidWarehouseType(v string) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func IsValidKandangStatus(v string) bool {
|
||||
switch KandangStatus(v) {
|
||||
case KandangStatusNonActive, KandangStatusPengajuan, KandangStatusActive:
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func IsValidCustomerSupplierType(v string) bool {
|
||||
switch CustomerSupplierType(v) {
|
||||
case CustomerSupplierTypeBisnis, CustomerSupplierTypeIndividual:
|
||||
|
||||
Reference in New Issue
Block a user