From 01e13e736c034f3a51da5da53cbbda18d22614d1 Mon Sep 17 00:00:00 2001 From: Blizzard Date: Thu, 12 Feb 2026 10:36:12 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=AD=94=E6=B3=95=E5=B8=B8=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- global/enums.go | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 global/enums.go diff --git a/global/enums.go b/global/enums.go new file mode 100644 index 0000000..b116bb8 --- /dev/null +++ b/global/enums.go @@ -0,0 +1,28 @@ +package global + +// 1. 维度定义 (Dimension) - 用于 UI 的大分类 Tab +const ( + BadgeDimPersistence = "PERSISTENCE" // 勤勉系 (坚持) + BadgeDimExpertise = "EXPERTISE" // 专家系 (施肥/修剪/换盆) + BadgeDimJournal = "JOURNAL" // 记录系 (拍照/日记) + BadgeDimDiscovery = "DISCOVERY" // 隐藏/彩蛋系 +) + +// 2. 行为代码 (Action Code) - 对应触发徽章的底层事件 +const ( + ActionWater = "ACT_WATER" // 浇水 + ActionFertilize = "ACT_FERTILIZE" // 施肥 + ActionPrune = "ACT_PRUNE" // 修剪 + ActionRepot = "ACT_REPOT" // 换盆 + ActionPhoto = "ACT_PHOTO" // 拍照 + ActionLogin = "ACT_LOGIN" // 签到 + ActionKillPlant = "ACT_KILL" // 把植物养死了(作为彩蛋徽章) +) + +// 3. 徽章等级 (Tier) +const ( + BadgeTierBronze = 1 // 铜 + BadgeTierSilver = 2 // 银 + BadgeTierGold = 3 // 金 + BadgeTierDiamond = 4 // 钻石 +)