From 759a1421e50ecd793cb478057603b423d764ee89 Mon Sep 17 00:00:00 2001 From: Nekotoxin Date: Mon, 28 Feb 2022 16:25:09 +0800 Subject: [PATCH] feat: add the 'karma' prop to table User (#518) * feature: feat : add the 'karma' prop to table User * feat: add the 'karma' prop to table User --- controllers/account.go | 1 + object/user.go | 1 + 2 files changed, 2 insertions(+) diff --git a/controllers/account.go b/controllers/account.go index 80a7cfde..7c8d5557 100644 --- a/controllers/account.go +++ b/controllers/account.go @@ -169,6 +169,7 @@ func (c *ApiController) Signup() { IsDeleted: false, SignupApplication: application.Name, Properties: map[string]string{}, + Karma: 0, } if application.GetSignupItemRule("Display name") == "First, last" { diff --git a/object/user.go b/object/user.go index f4d25cbf..a488950b 100644 --- a/object/user.go +++ b/object/user.go @@ -55,6 +55,7 @@ type User struct { Birthday string `xorm:"varchar(100)" json:"birthday"` Education string `xorm:"varchar(100)" json:"education"` Score int `json:"score"` + Karma int `json:"karma"` Ranking int `json:"ranking"` IsDefaultAvatar bool `json:"isDefaultAvatar"` IsOnline bool `json:"isOnline"`