package models

import "github.com/zeromicro/go-zero/core/stores/sqlx"

var _ HpcInstanceCenterModel = (*customHpcInstanceCenterModel)(nil)

type (
	// HpcInstanceCenterModel is an interface to be customized, add more methods here,
	// and implement the added methods in customHpcInstanceCenterModel.
	HpcInstanceCenterModel interface {
		hpcInstanceCenterModel
		withSession(session sqlx.Session) HpcInstanceCenterModel
	}

	customHpcInstanceCenterModel struct {
		*defaultHpcInstanceCenterModel
	}
)

// NewHpcInstanceCenterModel returns a model for the database table.
func NewHpcInstanceCenterModel(conn sqlx.SqlConn) HpcInstanceCenterModel {
	return &customHpcInstanceCenterModel{
		defaultHpcInstanceCenterModel: newHpcInstanceCenterModel(conn),
	}
}

func (m *customHpcInstanceCenterModel) withSession(session sqlx.Session) HpcInstanceCenterModel {
	return NewHpcInstanceCenterModel(sqlx.NewSqlConnFromSession(session))
}
