增加提取castile到游戏的数据库表,定义API接口等;
This commit is contained in:
29
internal/model/nh_castile_token_model.go
Normal file
29
internal/model/nh_castile_token_model.go
Normal file
@@ -0,0 +1,29 @@
|
||||
package model
|
||||
|
||||
import "github.com/zeromicro/go-zero/core/stores/sqlx"
|
||||
|
||||
var _ NhCastileTokenModel = (*customNhCastileTokenModel)(nil)
|
||||
|
||||
type (
|
||||
// NhCastileTokenModel is an interface to be customized, add more methods here,
|
||||
// and implement the added methods in customNhCastileTokenModel.
|
||||
NhCastileTokenModel interface {
|
||||
nhCastileTokenModel
|
||||
withSession(session sqlx.Session) NhCastileTokenModel
|
||||
}
|
||||
|
||||
customNhCastileTokenModel struct {
|
||||
*defaultNhCastileTokenModel
|
||||
}
|
||||
)
|
||||
|
||||
// NewNhCastileTokenModel returns a model for the database table.
|
||||
func NewNhCastileTokenModel(conn sqlx.SqlConn) NhCastileTokenModel {
|
||||
return &customNhCastileTokenModel{
|
||||
defaultNhCastileTokenModel: newNhCastileTokenModel(conn),
|
||||
}
|
||||
}
|
||||
|
||||
func (m *customNhCastileTokenModel) withSession(session sqlx.Session) NhCastileTokenModel {
|
||||
return NewNhCastileTokenModel(sqlx.NewSqlConnFromSession(session))
|
||||
}
|
||||
Reference in New Issue
Block a user