cic-custodial/internal/store/dispatch.go
2023-02-12 12:50:43 +03:00

25 lines
356 B
Go

package store
import (
"context"
)
type Status string
func (s *PostgresStore) CreateDispatchStatus(ctx context.Context, dispatch DispatchStatus) (uint, error) {
var (
id uint
)
if err := s.db.QueryRow(
ctx,
s.queries.CreateDispatchStatus,
dispatch.OtxId,
dispatch.Status,
).Scan(&id); err != nil {
return id, err
}
return id, nil
}