ussd-data-connect/pkg/data/type.go
Mohammed Sohail 3c212c0612
Some checks failed
release / docker (push) Has been cancelled
feat: add lang_code
2025-01-14 11:08:39 +03:00

31 lines
1.1 KiB
Go

package data
// Subset of urdt/ussd/common specifically for syncing to the central data store i.e Graph.
// TODO: Replace with imported data types from the common package once lib-gdbm dependency is removed.
const (
keyPrefix = 32
ACCOUNT_BLOCKCHAIN_ADDRESS = 1
ACCOUNT_FIRST_NAME = 3
ACCOUNT_LAST_NAME = 4
ACCOUNT_YOB = 5
ACCOUNT_LOCATION = 6
ACCOUNT_GENDER = 7
ACCOUNT_COMMODITIES = 8
ACCOUNT_ACTIVE_VOUCHER = 17
ACCOUNT_LANG_CODE = 19
)
// ValidDataTypeLookup allows us to filter go-vise data types, additionally the value maps to the ussd_data coulmn
var ValidDataTypeLookup = map[uint16]string{
ACCOUNT_BLOCKCHAIN_ADDRESS: "blockchain_address",
ACCOUNT_FIRST_NAME: "first_name",
ACCOUNT_LAST_NAME: "last_name",
ACCOUNT_YOB: "yob",
ACCOUNT_LOCATION: "location_name",
ACCOUNT_GENDER: "gender",
ACCOUNT_COMMODITIES: "commodities",
ACCOUNT_ACTIVE_VOUCHER: "active_voucher",
ACCOUNT_LANG_CODE: "lang_code",
}