package model import "github.com/zeromicro/go-zero/core/stores/sqlx" var _ NhTwitterModel = (*customNhTwitterModel)(nil) type ( // NhTwitterModel is an interface to be customized, add more methods here, // and implement the added methods in customNhTwitterModel. NhTwitterModel interface { nhTwitterModel withSession(session sqlx.Session) NhTwitterModel } customNhTwitterModel struct { *defaultNhTwitterModel } ) // NewNhTwitterModel returns a model for the database table. func NewNhTwitterModel(conn sqlx.SqlConn) NhTwitterModel { return &customNhTwitterModel{ defaultNhTwitterModel: newNhTwitterModel(conn), } } func (m *customNhTwitterModel) withSession(session sqlx.Session) NhTwitterModel { return NewNhTwitterModel(sqlx.NewSqlConnFromSession(session)) }