package models

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

var _ HpcAppTemplateModel = (*customHpcAppTemplateModel)(nil)

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

	customHpcAppTemplateModel struct {
		*defaultHpcAppTemplateModel
	}
)

// NewHpcAppTemplateModel returns a model for the database table.
func NewHpcAppTemplateModel(conn sqlx.SqlConn) HpcAppTemplateModel {
	return &customHpcAppTemplateModel{
		defaultHpcAppTemplateModel: newHpcAppTemplateModel(conn),
	}
}

func (m *customHpcAppTemplateModel) withSession(session sqlx.Session) HpcAppTemplateModel {
	return NewHpcAppTemplateModel(sqlx.NewSqlConnFromSession(session))
}
