// Code generated by sqlc. DO NOT EDIT.
// versions:
//   sqlc v1.28.0
// source: suspensionreport.sql

package db

import (
	"context"
	"database/sql"
)

const createSuspensionReport = `-- name: CreateSuspensionReport :one
INSERT INTO suspensionreport (
    packhouse_id,
    exportcompany_id,
    report,
    user_id
 ) VALUES (
    $1, $2, $3, $4
 ) RETURNING id, packhouse_id, exportcompany_id, user_id, report, created_at
`

type CreateSuspensionReportParams struct {
	PackhouseID     sql.NullInt32 `json:"packhouse_id"`
	ExportcompanyID sql.NullInt32 `json:"exportcompany_id"`
	Report          string        `json:"report"`
	UserID          int32         `json:"user_id"`
}

func (q *Queries) CreateSuspensionReport(ctx context.Context, arg CreateSuspensionReportParams) (Suspensionreport, error) {
	row := q.db.QueryRowContext(ctx, createSuspensionReport,
		arg.PackhouseID,
		arg.ExportcompanyID,
		arg.Report,
		arg.UserID,
	)
	var i Suspensionreport
	err := row.Scan(
		&i.ID,
		&i.PackhouseID,
		&i.ExportcompanyID,
		&i.UserID,
		&i.Report,
		&i.CreatedAt,
	)
	return i, err
}
