package model import "encoding/json" var ( CheckinOndutyMoneyEnable = "checkin.onduty.money.enable" //上班打卡红包 CheckinOffdutyMoneyEnable = "checkin.offduty.money.enable" //下班打卡红包 CheckinOndutyMoney = "checkin.onduty.money" //上班打卡金额 CheckinOffdutyMoney = "checkin.offduty.money" //下班打卡金额 StaffSalaryExpDiscount = "staff.salary.exp.discount" //试用期薪资折扣 StaffSalarySocialInsurence = "staff.salary.social.insurence" //社保扣除金额 StaffSalaryPerDay = "staff.salary.per.day" //按天计算的工资 ) var ( UserConfigStatusNormal = 1 UserConfigStatusDisable = 2 ) type UserConfig struct { Id int64 Username string Config string Status int 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] }