|
1234567891011121314151617181920212223242526272829 |
- package models
-
- import "github.com/zeromicro/go-zero/core/stores/sqlx"
-
- var _ TAdapterInfoModel = (*customTAdapterInfoModel)(nil)
-
- type (
- // TAdapterInfoModel is an interface to be customized, add more methods here,
- // and implement the added methods in customTAdapterInfoModel.
- TAdapterInfoModel interface {
- tAdapterInfoModel
- withSession(session sqlx.Session) TAdapterInfoModel
- }
-
- customTAdapterInfoModel struct {
- *defaultTAdapterInfoModel
- }
- )
-
- // NewTAdapterInfoModel returns a model for the database table.
- func NewTAdapterInfoModel(conn sqlx.SqlConn) TAdapterInfoModel {
- return &customTAdapterInfoModel{
- defaultTAdapterInfoModel: newTAdapterInfoModel(conn),
- }
- }
-
- func (m *customTAdapterInfoModel) withSession(session sqlx.Session) TAdapterInfoModel {
- return NewTAdapterInfoModel(sqlx.NewSqlConnFromSession(session))
- }
|