package publicreport

import (
	"context"
	//"time"

	//"github.com/Gleipnir-Technology/bob"
	//"github.com/Gleipnir-Technology/jet/postgres"
	"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"
)

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