package models

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

var _ TaskHpcModel = (*customTaskHpcModel)(nil)

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

	customTaskHpcModel struct {
		*defaultTaskHpcModel
	}
)

// NewTaskHpcModel returns a model for the database table.
func NewTaskHpcModel(conn sqlx.SqlConn) TaskHpcModel {
	return &customTaskHpcModel{
		defaultTaskHpcModel: newTaskHpcModel(conn),
	}
}

func (m *customTaskHpcModel) withSession(session sqlx.Session) TaskHpcModel {
	return NewTaskHpcModel(sqlx.NewSqlConnFromSession(session))
}
