// Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.31.1 // source: invitation_cooldowns.sql package sqlc import ( "context" "github.com/jackc/pgx/v5/pgtype" ) const latestInvitationDecline = `-- name: LatestInvitationDecline :one SELECT responded_at AS declined_at FROM invitations WHERE organization_id = $1 AND candidate_id = $2 AND state = 'declined' ORDER BY responded_at DESC LIMIT 1 ` type LatestInvitationDeclineParams struct { OrganizationID pgtype.UUID CandidateID pgtype.UUID } // The time of the latest decline of one candidate by one organization, across // every need and every member of the organization. The pause that follows it is // applied by the send, from the policy in force. A candidate without a decline // finds no row. func (q *Queries) LatestInvitationDecline(ctx context.Context, arg LatestInvitationDeclineParams) (pgtype.Timestamptz, error) { row := q.db.QueryRow(ctx, latestInvitationDecline, arg.OrganizationID, arg.CandidateID) var declined_at pgtype.Timestamptz err := row.Scan(&declined_at) return declined_at, err }