package public

import (
	"context"

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

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