enterprise/common/model/user_config.go

34 lines
1.1 KiB
Go
Raw Normal View History

2023-08-10 20:38:57 +08:00
package model
import "encoding/json"
var (
2023-09-01 20:01:30 +08:00
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" //社保扣除金额
2024-01-31 22:54:06 +08:00
StaffSalaryPerDay = "staff.salary.per.day" //按天计算的工资
2024-04-07 17:08:39 +08:00
StaffSalaryNotify = "staff.salary.notify" //是否发送工资单
2023-08-10 20:38:57 +08:00
)
2023-08-31 22:20:40 +08:00
var (
UserConfigStatusNormal = 1
UserConfigStatusDisable = 2
)
2023-08-10 20:38:57 +08:00
type UserConfig struct {
Id int64
Username string
Config string
2023-08-31 22:20:40 +08:00
Status int
2023-08-10 20:38:57 +08:00
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]
}