mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 13:31:56 +00:00
Merge branch 'FEAT/BE/marketing' into 'development'
FEAT[BE] : update new concept of marketing See merge request mbugroup/lti-api!307
This commit is contained in:
@@ -212,6 +212,31 @@ const (
|
||||
KandangStatusActive KandangStatus = "ACTIVE"
|
||||
)
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Marketing Type
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
type MarketingType string
|
||||
|
||||
const (
|
||||
MarketingTypeAyam MarketingType = "AYAM"
|
||||
MarketingTypeTelur MarketingType = "TELUR"
|
||||
MarketingTypeTrading MarketingType = "TRADING"
|
||||
MarketingTypeAyamPullet MarketingType = "AYAM_PULLET"
|
||||
)
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Convertion Unit
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
type ConvertionUnit string
|
||||
|
||||
const (
|
||||
ConvertionUnitPeti ConvertionUnit = "PETI"
|
||||
ConvertionUnitKG ConvertionUnit = "KG"
|
||||
ConvertionUnitQty ConvertionUnit = "QTY"
|
||||
)
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// ProjectFlockCategory
|
||||
// -------------------------------------------------------------------
|
||||
@@ -610,6 +635,22 @@ func IsValidPaymentParty(v string) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func IsValidMarketingType(v string) bool {
|
||||
switch MarketingType(v) {
|
||||
case MarketingTypeAyam, MarketingTypeTelur, MarketingTypeTrading, MarketingTypeAyamPullet:
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func IsValidConvertionUnit(v string) bool {
|
||||
switch ConvertionUnit(v) {
|
||||
case ConvertionUnitPeti, ConvertionUnitKG, ConvertionUnitQty:
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// example use
|
||||
|
||||
// Recording helper
|
||||
|
||||
Reference in New Issue
Block a user