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 ReportLogInsert(ctx context.Context, txn db.Ex, m model.ReportLog) (model.ReportLog, error) {
	statement := table.ReportLog.INSERT(table.ReportLog.MutableColumns).
		MODEL(m).
		RETURNING(table.ReportLog.AllColumns)
	return db.ExecuteOneTx[model.ReportLog](ctx, txn, statement)
}
