package backend import pasturePb "gitee.com/xuyiping_admin/go_proto/proto/go/backend/cow" var DrugCategoryMap = map[pasturePb.DrugCategory_Kind]string{ pasturePb.DrugCategory_Antibiotics: "抗生素类", pasturePb.DrugCategory_Antivirals: "抗病毒类", pasturePb.DrugCategory_Antifungals: "抗真菌类", pasturePb.DrugCategory_Antiparasitics: "驱虫类", pasturePb.DrugCategory_Analgesics: "镇痛类", pasturePb.DrugCategory_Antipyretic: "退烧类", pasturePb.DrugCategory_Vitamin: "维生素类", pasturePb.DrugCategory_Brine: "盐水", pasturePb.DrugCategory_Glucose: "葡萄糖", pasturePb.DrugCategory_Hormone: "激素类", pasturePb.DrugCategory_Anti_Stress: "抗应激类", pasturePb.DrugCategory_Disinfect: "消毒类", pasturePb.DrugCategory_Chinese_Herbal: "中药合剂", pasturePb.DrugCategory_Tocolytic: "保胎类", pasturePb.DrugCategory_Immunity: "疫苗类", } var UnitMap = map[pasturePb.Unit_Kind]string{ pasturePb.Unit_Pieces: "个", pasturePb.Unit_Package: "包/袋", pasturePb.Unit_Bottle: "瓶", pasturePb.Unit_Box: "盒", pasturePb.Unit_Boxful: "箱", pasturePb.Unit_Branch: "支", pasturePb.Unit_Barrel: "桶", pasturePb.Unit_Pot: "罐", pasturePb.Unit_ML: "毫升", pasturePb.Unit_L: "升", } var DrugUsageMap = map[pasturePb.DrugUsage_Kind]string{ pasturePb.DrugUsage_Oral_Medications: "口服", pasturePb.DrugUsage_Injectable_Medications: "肌注", pasturePb.DrugUsage_Topical_Medications: "外用", pasturePb.DrugUsage_Drink_Medications: "饮水", } func (s *StoreEntry) DrugUsageMaps() map[pasturePb.DrugUsage_Kind]string { res := make(map[pasturePb.DrugUsage_Kind]string) for _, v := range s.DrugUsageEnumList() { res[pasturePb.DrugUsage_Kind(v.Value)] = v.Label } return res } func (s *StoreEntry) ExposeEstrusTypeMap() map[pasturePb.ExposeEstrusType_Kind]string { res := make(map[pasturePb.ExposeEstrusType_Kind]string) for _, v := range s.ExposeEstrusTypeEnumList() { res[pasturePb.ExposeEstrusType_Kind(v.Value)] = v.Label } return res } func (s *StoreEntry) FrozenSemenTypeMap() map[pasturePb.FrozenSemenType_Kind]string { res := make(map[pasturePb.FrozenSemenType_Kind]string) for _, v := range s.FrozenSemenTypeEnumList() { res[pasturePb.FrozenSemenType_Kind(v.Value)] = v.Label } return res } func (s *StoreEntry) UnitMap() map[pasturePb.Unit_Kind]string { res := make(map[pasturePb.Unit_Kind]string) for _, v := range s.UnitEnumList() { res[pasturePb.Unit_Kind(v.Value)] = v.Label } return res } func (s *StoreEntry) WeekMap() map[pasturePb.Week_Kind]string { res := make(map[pasturePb.Week_Kind]string) for _, v := range s.WeekEnumList() { res[pasturePb.Week_Kind(v.Value)] = v.Label } return res } func (s *StoreEntry) CowTypeMap() map[pasturePb.CowType_Kind]string { res := make(map[pasturePb.CowType_Kind]string) for _, v := range s.CowTypeEnumList() { res[pasturePb.CowType_Kind(v.Value)] = v.Label } return res } func (s *StoreEntry) CowStatusMap() map[pasturePb.CowStatus_Kind]string { res := make(map[pasturePb.CowStatus_Kind]string) for _, v := range s.CowStatusEnumList() { res[pasturePb.CowStatus_Kind(v.Value)] = v.Label } return res } func (s *StoreEntry) CowKindMap() map[pasturePb.CowKind_Kind]string { res := make(map[pasturePb.CowKind_Kind]string) for _, v := range s.CowKindEnumList() { res[pasturePb.CowKind_Kind(v.Value)] = v.Label } return res }