package publicreport

import (
	"context"

	"source.gleipnir.technology/Gleipnir/nidus-sync/db"
	"source.gleipnir.technology/Gleipnir/nidus-sync/db/gen/nidus-sync/publicreport/model"
	"source.gleipnir.technology/Gleipnir/nidus-sync/db/gen/nidus-sync/publicreport/table"
	//"github.com/Gleipnir-Technology/jet/postgres"
)

func ImageInsert(ctx context.Context, txn db.Ex, m model.Image) (model.Image, error) {
	statement := table.Image.INSERT(table.Image.MutableColumns).
		MODEL(m).
		RETURNING(table.Image.AllColumns)
	return db.ExecuteOneTx[model.Image](ctx, txn, statement)
}
