mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-10-14 22:13:43 +08:00
发布v2.8.4版本,更新内容请查看:https://github.com/bufanyun/hotgo/tree/v2.0/docs/guide-zh-CN/addon-version-upgrade.md
This commit is contained in:
22
server/internal/library/sms/config.go
Normal file
22
server/internal/library/sms/config.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package sms
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"hotgo/internal/model"
|
||||
)
|
||||
|
||||
var config *model.SmsConfig
|
||||
|
||||
func SetConfig(c *model.SmsConfig) {
|
||||
config = c
|
||||
}
|
||||
|
||||
func GetConfig() *model.SmsConfig {
|
||||
return config
|
||||
}
|
||||
|
||||
func GetModel(ctx context.Context) *gdb.Model {
|
||||
return g.Model("sys_sms_log").Ctx(ctx)
|
||||
}
|
Reference in New Issue
Block a user