25 lines
548 B
Go
25 lines
548 B
Go
|
package model
|
||
|
|
||
|
import "encoding/json"
|
||
|
|
||
|
var (
|
||
|
CheckinOndutyMoneyEnable = "checkin.onduty.money.enable"
|
||
|
CheckinOffdutyMoneyEnable = "checkin.offduty.money.enable"
|
||
|
CheckinOndutyMoney = "checkin.onduty.money"
|
||
|
CheckinOffdutyMoney = "checkin.offduty.money"
|
||
|
)
|
||
|
|
||
|
type UserConfig struct {
|
||
|
Id int64
|
||
|
Username string
|
||
|
Config string
|
||
|
CreateTime int64
|
||
|
UpdateTime int64
|
||
|
}
|
||
|
|
||
|
func (u *UserConfig) Get(key string) interface{} {
|
||
|
config := make(map[string]interface{})
|
||
|
json.Unmarshal([]byte(u.Config), &config)
|
||
|
return config[key]
|
||
|
}
|