增加社区列表接口,任务相关接口修改
This commit is contained in:
29
internal/model/nh_user_model.go
Executable file
29
internal/model/nh_user_model.go
Executable file
@@ -0,0 +1,29 @@
|
||||
package model
|
||||
|
||||
import "github.com/zeromicro/go-zero/core/stores/sqlx"
|
||||
|
||||
var _ NhUserModel = (*customNhUserModel)(nil)
|
||||
|
||||
type (
|
||||
// NhUserModel is an interface to be customized, add more methods here,
|
||||
// and implement the added methods in customNhUserModel.
|
||||
NhUserModel interface {
|
||||
nhUserModel
|
||||
withSession(session sqlx.Session) NhUserModel
|
||||
}
|
||||
|
||||
customNhUserModel struct {
|
||||
*defaultNhUserModel
|
||||
}
|
||||
)
|
||||
|
||||
// NewNhUserModel returns a model for the database table.
|
||||
func NewNhUserModel(conn sqlx.SqlConn) NhUserModel {
|
||||
return &customNhUserModel{
|
||||
defaultNhUserModel: newNhUserModel(conn),
|
||||
}
|
||||
}
|
||||
|
||||
func (m *customNhUserModel) withSession(session sqlx.Session) NhUserModel {
|
||||
return NewNhUserModel(sqlx.NewSqlConnFromSession(session))
|
||||
}
|
||||
Reference in New Issue
Block a user