transfer_middleware/genModel/serverClientModel.go

28 lines
738 B
Go
Raw Normal View History

2024-06-07 11:11:04 +08:00
package genModel
import (
"github.com/zeromicro/go-zero/core/stores/cache"
"github.com/zeromicro/go-zero/core/stores/sqlx"
)
var _ ServerClientModel = (*customServerClientModel)(nil)
type (
// ServerClientModel is an interface to be customized, add more methods here,
// and implement the added methods in customServerClientModel.
ServerClientModel interface {
serverClientModel
}
customServerClientModel struct {
*defaultServerClientModel
}
)
// NewServerClientModel returns a model for the database table.
func NewServerClientModel(conn sqlx.SqlConn, c cache.CacheConf, opts ...cache.Option) ServerClientModel {
return &customServerClientModel{
defaultServerClientModel: newServerClientModel(conn, c, opts...),
}
}