2026-05-07 10:39:17 +00:00
|
|
|
package publicreport
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"context"
|
|
|
|
|
//"time"
|
|
|
|
|
|
|
|
|
|
"github.com/Gleipnir-Technology/nidus-sync/db"
|
|
|
|
|
"github.com/Gleipnir-Technology/nidus-sync/db/gen/nidus-sync/publicreport/model"
|
|
|
|
|
"github.com/Gleipnir-Technology/nidus-sync/db/gen/nidus-sync/publicreport/table"
|
|
|
|
|
//"github.com/go-jet/jet/v2/postgres"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func NuisanceInsert(ctx context.Context, txn db.Ex, m model.Nuisance) (model.Nuisance, error) {
|
|
|
|
|
statement := table.Nuisance.INSERT(table.Nuisance.AllColumns).
|
2026-05-07 16:38:42 +00:00
|
|
|
MODEL(m).
|
|
|
|
|
RETURNING(table.Nuisance.AllColumns)
|
2026-05-07 10:39:17 +00:00
|
|
|
return db.ExecuteOneTx[model.Nuisance](ctx, txn, statement)
|
|
|
|
|
}
|