This is an automated email from the ASF dual-hosted git repository.
kumfo pushed a commit to branch feat/1.4.0/badge
in repository https://gitbox.apache.org/repos/asf/incubator-answer.git
The following commit(s) were added to refs/heads/feat/1.4.0/badge by this push:
new 95f20c98 feat(badge): update entity
95f20c98 is described below
commit 95f20c9827af4222b50b42e8b57cf1070dac0d3f
Author: kumfo <[email protected]>
AuthorDate: Wed Jul 31 14:28:44 2024 +0800
feat(badge): update entity
---
internal/entity/badge.go | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/internal/entity/badge.go b/internal/entity/badge.go
index 0b296f61..7a375af7 100644
--- a/internal/entity/badge.go
+++ b/internal/entity/badge.go
@@ -24,6 +24,13 @@ import "time"
const (
BadgeStatusAvailable = 1
BadgeStatusDeleted = 10
+
+ BadgeLevelBronze = 1
+ BadgeLevelSilver = 2
+ BadgeLevelGold = 3
+
+ BadgeSingleAward = 1
+ BadgeMultiAward = 2
)
// Badge badge
@@ -32,10 +39,12 @@ type Badge struct {
CreatedAt time.Time `json:"created_at" xorm:"created not null
default CURRENT_TIMESTAMP TIMESTAMP created_at"`
UpdatedAt time.Time `json:"updated_at" xorm:"updated not null
default CURRENT_TIMESTAMP TIMESTAMP updated_at"`
Name string `json:"name" xorm:"not null default ''
VARCHAR(256) name"`
+ Icon string `json:"icon" xorm:"not null default ''
VARCHAR(1024) icon"`
AwardCount int64 `json:"award_count" xorm:"not null default 0
INT(11) award_count"`
Description string `json:"description" xorm:"not null default ''
MEDIUMTEXT description"`
Status int8 `json:"status" xorm:"not null default 1 INT(11)
status"`
BadgeGroupId int64 `json:"badge_group_id" xorm:"not null default 0
BIGINT(20) badge_group_id"`
+ Level int64 `json:"level" xorm:"not null default 1
TINYINT(4) level"`
Single int8 `json:"single" xorm:"not null default 1
TINYINT(4) single"`
Collect string `json:"collect" xorm:"not null default ''
VARCHAR(64) collect"`
Handler string `json:"handler" xorm:"not null default ''
VARCHAR(64) handler"`