
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
/* eslint-disable */
// biome-ignore-all lint: generated file
// @ts-nocheck 
/*
 * This file exports the `rides` model and its related types.
 *
 * 🟢 You can import this file directly.
 */
import type * as runtime from "@prisma/client/runtime/client"
import type * as $Enums from "../enums.js"
import type * as Prisma from "../internal/prismaNamespace.js"

/**
 * Model rides
 * 
 */
export type ridesModel = runtime.Types.Result.DefaultSelection<Prisma.$ridesPayload>

export type AggregateRides = {
  _count: RidesCountAggregateOutputType | null
  _avg: RidesAvgAggregateOutputType | null
  _sum: RidesSumAggregateOutputType | null
  _min: RidesMinAggregateOutputType | null
  _max: RidesMaxAggregateOutputType | null
}

export type RidesAvgAggregateOutputType = {
  km: runtime.Decimal | null
  cost_per_km: runtime.Decimal | null
  total: runtime.Decimal | null
  synced: number | null
}

export type RidesSumAggregateOutputType = {
  km: runtime.Decimal | null
  cost_per_km: runtime.Decimal | null
  total: runtime.Decimal | null
  synced: number | null
}

export type RidesMinAggregateOutputType = {
  id: string | null
  user_id: string | null
  company: string | null
  km: runtime.Decimal | null
  cost_per_km: runtime.Decimal | null
  total: runtime.Decimal | null
  ride_date: string | null
  synced: number | null
  createdAt: Date | null
  updatedAt: Date | null
}

export type RidesMaxAggregateOutputType = {
  id: string | null
  user_id: string | null
  company: string | null
  km: runtime.Decimal | null
  cost_per_km: runtime.Decimal | null
  total: runtime.Decimal | null
  ride_date: string | null
  synced: number | null
  createdAt: Date | null
  updatedAt: Date | null
}

export type RidesCountAggregateOutputType = {
  id: number
  user_id: number
  company: number
  km: number
  cost_per_km: number
  total: number
  ride_date: number
  synced: number
  createdAt: number
  updatedAt: number
  _all: number
}


export type RidesAvgAggregateInputType = {
  km?: true
  cost_per_km?: true
  total?: true
  synced?: true
}

export type RidesSumAggregateInputType = {
  km?: true
  cost_per_km?: true
  total?: true
  synced?: true
}

export type RidesMinAggregateInputType = {
  id?: true
  user_id?: true
  company?: true
  km?: true
  cost_per_km?: true
  total?: true
  ride_date?: true
  synced?: true
  createdAt?: true
  updatedAt?: true
}

export type RidesMaxAggregateInputType = {
  id?: true
  user_id?: true
  company?: true
  km?: true
  cost_per_km?: true
  total?: true
  ride_date?: true
  synced?: true
  createdAt?: true
  updatedAt?: true
}

export type RidesCountAggregateInputType = {
  id?: true
  user_id?: true
  company?: true
  km?: true
  cost_per_km?: true
  total?: true
  ride_date?: true
  synced?: true
  createdAt?: true
  updatedAt?: true
  _all?: true
}

export type RidesAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Filter which rides to aggregate.
   */
  where?: Prisma.ridesWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of rides to fetch.
   */
  orderBy?: Prisma.ridesOrderByWithRelationInput | Prisma.ridesOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the start position
   */
  cursor?: Prisma.ridesWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Take `±n` rides from the position of the cursor.
   */
  take?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Skip the first `n` rides.
   */
  skip?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Count returned rides
  **/
  _count?: true | RidesCountAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to average
  **/
  _avg?: RidesAvgAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to sum
  **/
  _sum?: RidesSumAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to find the minimum value
  **/
  _min?: RidesMinAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to find the maximum value
  **/
  _max?: RidesMaxAggregateInputType
}

export type GetRidesAggregateType<T extends RidesAggregateArgs> = {
      [P in keyof T & keyof AggregateRides]: P extends '_count' | 'count'
    ? T[P] extends true
      ? number
      : Prisma.GetScalarType<T[P], AggregateRides[P]>
    : Prisma.GetScalarType<T[P], AggregateRides[P]>
}




export type ridesGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.ridesWhereInput
  orderBy?: Prisma.ridesOrderByWithAggregationInput | Prisma.ridesOrderByWithAggregationInput[]
  by: Prisma.RidesScalarFieldEnum[] | Prisma.RidesScalarFieldEnum
  having?: Prisma.ridesScalarWhereWithAggregatesInput
  take?: number
  skip?: number
  _count?: RidesCountAggregateInputType | true
  _avg?: RidesAvgAggregateInputType
  _sum?: RidesSumAggregateInputType
  _min?: RidesMinAggregateInputType
  _max?: RidesMaxAggregateInputType
}

export type RidesGroupByOutputType = {
  id: string
  user_id: string
  company: string
  km: runtime.Decimal
  cost_per_km: runtime.Decimal
  total: runtime.Decimal
  ride_date: string
  synced: number | null
  createdAt: Date | null
  updatedAt: Date | null
  _count: RidesCountAggregateOutputType | null
  _avg: RidesAvgAggregateOutputType | null
  _sum: RidesSumAggregateOutputType | null
  _min: RidesMinAggregateOutputType | null
  _max: RidesMaxAggregateOutputType | null
}

export type GetRidesGroupByPayload<T extends ridesGroupByArgs> = Prisma.PrismaPromise<
  Array<
    Prisma.PickEnumerable<RidesGroupByOutputType, T['by']> &
      {
        [P in ((keyof T) & (keyof RidesGroupByOutputType))]: P extends '_count'
          ? T[P] extends boolean
            ? number
            : Prisma.GetScalarType<T[P], RidesGroupByOutputType[P]>
          : Prisma.GetScalarType<T[P], RidesGroupByOutputType[P]>
      }
    >
  >



export type ridesWhereInput = {
  AND?: Prisma.ridesWhereInput | Prisma.ridesWhereInput[]
  OR?: Prisma.ridesWhereInput[]
  NOT?: Prisma.ridesWhereInput | Prisma.ridesWhereInput[]
  id?: Prisma.StringFilter<"rides"> | string
  user_id?: Prisma.StringFilter<"rides"> | string
  company?: Prisma.StringFilter<"rides"> | string
  km?: Prisma.DecimalFilter<"rides"> | runtime.Decimal | runtime.DecimalJsLike | number | string
  cost_per_km?: Prisma.DecimalFilter<"rides"> | runtime.Decimal | runtime.DecimalJsLike | number | string
  total?: Prisma.DecimalFilter<"rides"> | runtime.Decimal | runtime.DecimalJsLike | number | string
  ride_date?: Prisma.StringFilter<"rides"> | string
  synced?: Prisma.IntNullableFilter<"rides"> | number | null
  createdAt?: Prisma.DateTimeNullableFilter<"rides"> | Date | string | null
  updatedAt?: Prisma.DateTimeNullableFilter<"rides"> | Date | string | null
  users?: Prisma.XOR<Prisma.UsersScalarRelationFilter, Prisma.usersWhereInput>
}

export type ridesOrderByWithRelationInput = {
  id?: Prisma.SortOrder
  user_id?: Prisma.SortOrder
  company?: Prisma.SortOrder
  km?: Prisma.SortOrder
  cost_per_km?: Prisma.SortOrder
  total?: Prisma.SortOrder
  ride_date?: Prisma.SortOrder
  synced?: Prisma.SortOrderInput | Prisma.SortOrder
  createdAt?: Prisma.SortOrderInput | Prisma.SortOrder
  updatedAt?: Prisma.SortOrderInput | Prisma.SortOrder
  users?: Prisma.usersOrderByWithRelationInput
}

export type ridesWhereUniqueInput = Prisma.AtLeast<{
  id?: string
  AND?: Prisma.ridesWhereInput | Prisma.ridesWhereInput[]
  OR?: Prisma.ridesWhereInput[]
  NOT?: Prisma.ridesWhereInput | Prisma.ridesWhereInput[]
  user_id?: Prisma.StringFilter<"rides"> | string
  company?: Prisma.StringFilter<"rides"> | string
  km?: Prisma.DecimalFilter<"rides"> | runtime.Decimal | runtime.DecimalJsLike | number | string
  cost_per_km?: Prisma.DecimalFilter<"rides"> | runtime.Decimal | runtime.DecimalJsLike | number | string
  total?: Prisma.DecimalFilter<"rides"> | runtime.Decimal | runtime.DecimalJsLike | number | string
  ride_date?: Prisma.StringFilter<"rides"> | string
  synced?: Prisma.IntNullableFilter<"rides"> | number | null
  createdAt?: Prisma.DateTimeNullableFilter<"rides"> | Date | string | null
  updatedAt?: Prisma.DateTimeNullableFilter<"rides"> | Date | string | null
  users?: Prisma.XOR<Prisma.UsersScalarRelationFilter, Prisma.usersWhereInput>
}, "id">

export type ridesOrderByWithAggregationInput = {
  id?: Prisma.SortOrder
  user_id?: Prisma.SortOrder
  company?: Prisma.SortOrder
  km?: Prisma.SortOrder
  cost_per_km?: Prisma.SortOrder
  total?: Prisma.SortOrder
  ride_date?: Prisma.SortOrder
  synced?: Prisma.SortOrderInput | Prisma.SortOrder
  createdAt?: Prisma.SortOrderInput | Prisma.SortOrder
  updatedAt?: Prisma.SortOrderInput | Prisma.SortOrder
  _count?: Prisma.ridesCountOrderByAggregateInput
  _avg?: Prisma.ridesAvgOrderByAggregateInput
  _max?: Prisma.ridesMaxOrderByAggregateInput
  _min?: Prisma.ridesMinOrderByAggregateInput
  _sum?: Prisma.ridesSumOrderByAggregateInput
}

export type ridesScalarWhereWithAggregatesInput = {
  AND?: Prisma.ridesScalarWhereWithAggregatesInput | Prisma.ridesScalarWhereWithAggregatesInput[]
  OR?: Prisma.ridesScalarWhereWithAggregatesInput[]
  NOT?: Prisma.ridesScalarWhereWithAggregatesInput | Prisma.ridesScalarWhereWithAggregatesInput[]
  id?: Prisma.StringWithAggregatesFilter<"rides"> | string
  user_id?: Prisma.StringWithAggregatesFilter<"rides"> | string
  company?: Prisma.StringWithAggregatesFilter<"rides"> | string
  km?: Prisma.DecimalWithAggregatesFilter<"rides"> | runtime.Decimal | runtime.DecimalJsLike | number | string
  cost_per_km?: Prisma.DecimalWithAggregatesFilter<"rides"> | runtime.Decimal | runtime.DecimalJsLike | number | string
  total?: Prisma.DecimalWithAggregatesFilter<"rides"> | runtime.Decimal | runtime.DecimalJsLike | number | string
  ride_date?: Prisma.StringWithAggregatesFilter<"rides"> | string
  synced?: Prisma.IntNullableWithAggregatesFilter<"rides"> | number | null
  createdAt?: Prisma.DateTimeNullableWithAggregatesFilter<"rides"> | Date | string | null
  updatedAt?: Prisma.DateTimeNullableWithAggregatesFilter<"rides"> | Date | string | null
}

export type ridesCreateInput = {
  id: string
  company: string
  km: runtime.Decimal | runtime.DecimalJsLike | number | string
  cost_per_km: runtime.Decimal | runtime.DecimalJsLike | number | string
  total: runtime.Decimal | runtime.DecimalJsLike | number | string
  ride_date: string
  synced?: number | null
  createdAt?: Date | string | null
  updatedAt?: Date | string | null
  users: Prisma.usersCreateNestedOneWithoutRidesInput
}

export type ridesUncheckedCreateInput = {
  id: string
  user_id: string
  company: string
  km: runtime.Decimal | runtime.DecimalJsLike | number | string
  cost_per_km: runtime.Decimal | runtime.DecimalJsLike | number | string
  total: runtime.Decimal | runtime.DecimalJsLike | number | string
  ride_date: string
  synced?: number | null
  createdAt?: Date | string | null
  updatedAt?: Date | string | null
}

export type ridesUpdateInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  company?: Prisma.StringFieldUpdateOperationsInput | string
  km?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  cost_per_km?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  total?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  ride_date?: Prisma.StringFieldUpdateOperationsInput | string
  synced?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
  createdAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  updatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  users?: Prisma.usersUpdateOneRequiredWithoutRidesNestedInput
}

export type ridesUncheckedUpdateInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  user_id?: Prisma.StringFieldUpdateOperationsInput | string
  company?: Prisma.StringFieldUpdateOperationsInput | string
  km?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  cost_per_km?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  total?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  ride_date?: Prisma.StringFieldUpdateOperationsInput | string
  synced?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
  createdAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  updatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
}

export type ridesCreateManyInput = {
  id: string
  user_id: string
  company: string
  km: runtime.Decimal | runtime.DecimalJsLike | number | string
  cost_per_km: runtime.Decimal | runtime.DecimalJsLike | number | string
  total: runtime.Decimal | runtime.DecimalJsLike | number | string
  ride_date: string
  synced?: number | null
  createdAt?: Date | string | null
  updatedAt?: Date | string | null
}

export type ridesUpdateManyMutationInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  company?: Prisma.StringFieldUpdateOperationsInput | string
  km?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  cost_per_km?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  total?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  ride_date?: Prisma.StringFieldUpdateOperationsInput | string
  synced?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
  createdAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  updatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
}

export type ridesUncheckedUpdateManyInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  user_id?: Prisma.StringFieldUpdateOperationsInput | string
  company?: Prisma.StringFieldUpdateOperationsInput | string
  km?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  cost_per_km?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  total?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  ride_date?: Prisma.StringFieldUpdateOperationsInput | string
  synced?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
  createdAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  updatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
}

export type RidesListRelationFilter = {
  every?: Prisma.ridesWhereInput
  some?: Prisma.ridesWhereInput
  none?: Prisma.ridesWhereInput
}

export type ridesOrderByRelationAggregateInput = {
  _count?: Prisma.SortOrder
}

export type ridesCountOrderByAggregateInput = {
  id?: Prisma.SortOrder
  user_id?: Prisma.SortOrder
  company?: Prisma.SortOrder
  km?: Prisma.SortOrder
  cost_per_km?: Prisma.SortOrder
  total?: Prisma.SortOrder
  ride_date?: Prisma.SortOrder
  synced?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  updatedAt?: Prisma.SortOrder
}

export type ridesAvgOrderByAggregateInput = {
  km?: Prisma.SortOrder
  cost_per_km?: Prisma.SortOrder
  total?: Prisma.SortOrder
  synced?: Prisma.SortOrder
}

export type ridesMaxOrderByAggregateInput = {
  id?: Prisma.SortOrder
  user_id?: Prisma.SortOrder
  company?: Prisma.SortOrder
  km?: Prisma.SortOrder
  cost_per_km?: Prisma.SortOrder
  total?: Prisma.SortOrder
  ride_date?: Prisma.SortOrder
  synced?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  updatedAt?: Prisma.SortOrder
}

export type ridesMinOrderByAggregateInput = {
  id?: Prisma.SortOrder
  user_id?: Prisma.SortOrder
  company?: Prisma.SortOrder
  km?: Prisma.SortOrder
  cost_per_km?: Prisma.SortOrder
  total?: Prisma.SortOrder
  ride_date?: Prisma.SortOrder
  synced?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  updatedAt?: Prisma.SortOrder
}

export type ridesSumOrderByAggregateInput = {
  km?: Prisma.SortOrder
  cost_per_km?: Prisma.SortOrder
  total?: Prisma.SortOrder
  synced?: Prisma.SortOrder
}

export type ridesCreateNestedManyWithoutUsersInput = {
  create?: Prisma.XOR<Prisma.ridesCreateWithoutUsersInput, Prisma.ridesUncheckedCreateWithoutUsersInput> | Prisma.ridesCreateWithoutUsersInput[] | Prisma.ridesUncheckedCreateWithoutUsersInput[]
  connectOrCreate?: Prisma.ridesCreateOrConnectWithoutUsersInput | Prisma.ridesCreateOrConnectWithoutUsersInput[]
  createMany?: Prisma.ridesCreateManyUsersInputEnvelope
  connect?: Prisma.ridesWhereUniqueInput | Prisma.ridesWhereUniqueInput[]
}

export type ridesUncheckedCreateNestedManyWithoutUsersInput = {
  create?: Prisma.XOR<Prisma.ridesCreateWithoutUsersInput, Prisma.ridesUncheckedCreateWithoutUsersInput> | Prisma.ridesCreateWithoutUsersInput[] | Prisma.ridesUncheckedCreateWithoutUsersInput[]
  connectOrCreate?: Prisma.ridesCreateOrConnectWithoutUsersInput | Prisma.ridesCreateOrConnectWithoutUsersInput[]
  createMany?: Prisma.ridesCreateManyUsersInputEnvelope
  connect?: Prisma.ridesWhereUniqueInput | Prisma.ridesWhereUniqueInput[]
}

export type ridesUpdateManyWithoutUsersNestedInput = {
  create?: Prisma.XOR<Prisma.ridesCreateWithoutUsersInput, Prisma.ridesUncheckedCreateWithoutUsersInput> | Prisma.ridesCreateWithoutUsersInput[] | Prisma.ridesUncheckedCreateWithoutUsersInput[]
  connectOrCreate?: Prisma.ridesCreateOrConnectWithoutUsersInput | Prisma.ridesCreateOrConnectWithoutUsersInput[]
  upsert?: Prisma.ridesUpsertWithWhereUniqueWithoutUsersInput | Prisma.ridesUpsertWithWhereUniqueWithoutUsersInput[]
  createMany?: Prisma.ridesCreateManyUsersInputEnvelope
  set?: Prisma.ridesWhereUniqueInput | Prisma.ridesWhereUniqueInput[]
  disconnect?: Prisma.ridesWhereUniqueInput | Prisma.ridesWhereUniqueInput[]
  delete?: Prisma.ridesWhereUniqueInput | Prisma.ridesWhereUniqueInput[]
  connect?: Prisma.ridesWhereUniqueInput | Prisma.ridesWhereUniqueInput[]
  update?: Prisma.ridesUpdateWithWhereUniqueWithoutUsersInput | Prisma.ridesUpdateWithWhereUniqueWithoutUsersInput[]
  updateMany?: Prisma.ridesUpdateManyWithWhereWithoutUsersInput | Prisma.ridesUpdateManyWithWhereWithoutUsersInput[]
  deleteMany?: Prisma.ridesScalarWhereInput | Prisma.ridesScalarWhereInput[]
}

export type ridesUncheckedUpdateManyWithoutUsersNestedInput = {
  create?: Prisma.XOR<Prisma.ridesCreateWithoutUsersInput, Prisma.ridesUncheckedCreateWithoutUsersInput> | Prisma.ridesCreateWithoutUsersInput[] | Prisma.ridesUncheckedCreateWithoutUsersInput[]
  connectOrCreate?: Prisma.ridesCreateOrConnectWithoutUsersInput | Prisma.ridesCreateOrConnectWithoutUsersInput[]
  upsert?: Prisma.ridesUpsertWithWhereUniqueWithoutUsersInput | Prisma.ridesUpsertWithWhereUniqueWithoutUsersInput[]
  createMany?: Prisma.ridesCreateManyUsersInputEnvelope
  set?: Prisma.ridesWhereUniqueInput | Prisma.ridesWhereUniqueInput[]
  disconnect?: Prisma.ridesWhereUniqueInput | Prisma.ridesWhereUniqueInput[]
  delete?: Prisma.ridesWhereUniqueInput | Prisma.ridesWhereUniqueInput[]
  connect?: Prisma.ridesWhereUniqueInput | Prisma.ridesWhereUniqueInput[]
  update?: Prisma.ridesUpdateWithWhereUniqueWithoutUsersInput | Prisma.ridesUpdateWithWhereUniqueWithoutUsersInput[]
  updateMany?: Prisma.ridesUpdateManyWithWhereWithoutUsersInput | Prisma.ridesUpdateManyWithWhereWithoutUsersInput[]
  deleteMany?: Prisma.ridesScalarWhereInput | Prisma.ridesScalarWhereInput[]
}

export type NullableIntFieldUpdateOperationsInput = {
  set?: number | null
  increment?: number
  decrement?: number
  multiply?: number
  divide?: number
}

export type ridesCreateWithoutUsersInput = {
  id: string
  company: string
  km: runtime.Decimal | runtime.DecimalJsLike | number | string
  cost_per_km: runtime.Decimal | runtime.DecimalJsLike | number | string
  total: runtime.Decimal | runtime.DecimalJsLike | number | string
  ride_date: string
  synced?: number | null
  createdAt?: Date | string | null
  updatedAt?: Date | string | null
}

export type ridesUncheckedCreateWithoutUsersInput = {
  id: string
  company: string
  km: runtime.Decimal | runtime.DecimalJsLike | number | string
  cost_per_km: runtime.Decimal | runtime.DecimalJsLike | number | string
  total: runtime.Decimal | runtime.DecimalJsLike | number | string
  ride_date: string
  synced?: number | null
  createdAt?: Date | string | null
  updatedAt?: Date | string | null
}

export type ridesCreateOrConnectWithoutUsersInput = {
  where: Prisma.ridesWhereUniqueInput
  create: Prisma.XOR<Prisma.ridesCreateWithoutUsersInput, Prisma.ridesUncheckedCreateWithoutUsersInput>
}

export type ridesCreateManyUsersInputEnvelope = {
  data: Prisma.ridesCreateManyUsersInput | Prisma.ridesCreateManyUsersInput[]
  skipDuplicates?: boolean
}

export type ridesUpsertWithWhereUniqueWithoutUsersInput = {
  where: Prisma.ridesWhereUniqueInput
  update: Prisma.XOR<Prisma.ridesUpdateWithoutUsersInput, Prisma.ridesUncheckedUpdateWithoutUsersInput>
  create: Prisma.XOR<Prisma.ridesCreateWithoutUsersInput, Prisma.ridesUncheckedCreateWithoutUsersInput>
}

export type ridesUpdateWithWhereUniqueWithoutUsersInput = {
  where: Prisma.ridesWhereUniqueInput
  data: Prisma.XOR<Prisma.ridesUpdateWithoutUsersInput, Prisma.ridesUncheckedUpdateWithoutUsersInput>
}

export type ridesUpdateManyWithWhereWithoutUsersInput = {
  where: Prisma.ridesScalarWhereInput
  data: Prisma.XOR<Prisma.ridesUpdateManyMutationInput, Prisma.ridesUncheckedUpdateManyWithoutUsersInput>
}

export type ridesScalarWhereInput = {
  AND?: Prisma.ridesScalarWhereInput | Prisma.ridesScalarWhereInput[]
  OR?: Prisma.ridesScalarWhereInput[]
  NOT?: Prisma.ridesScalarWhereInput | Prisma.ridesScalarWhereInput[]
  id?: Prisma.StringFilter<"rides"> | string
  user_id?: Prisma.StringFilter<"rides"> | string
  company?: Prisma.StringFilter<"rides"> | string
  km?: Prisma.DecimalFilter<"rides"> | runtime.Decimal | runtime.DecimalJsLike | number | string
  cost_per_km?: Prisma.DecimalFilter<"rides"> | runtime.Decimal | runtime.DecimalJsLike | number | string
  total?: Prisma.DecimalFilter<"rides"> | runtime.Decimal | runtime.DecimalJsLike | number | string
  ride_date?: Prisma.StringFilter<"rides"> | string
  synced?: Prisma.IntNullableFilter<"rides"> | number | null
  createdAt?: Prisma.DateTimeNullableFilter<"rides"> | Date | string | null
  updatedAt?: Prisma.DateTimeNullableFilter<"rides"> | Date | string | null
}

export type ridesCreateManyUsersInput = {
  id: string
  company: string
  km: runtime.Decimal | runtime.DecimalJsLike | number | string
  cost_per_km: runtime.Decimal | runtime.DecimalJsLike | number | string
  total: runtime.Decimal | runtime.DecimalJsLike | number | string
  ride_date: string
  synced?: number | null
  createdAt?: Date | string | null
  updatedAt?: Date | string | null
}

export type ridesUpdateWithoutUsersInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  company?: Prisma.StringFieldUpdateOperationsInput | string
  km?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  cost_per_km?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  total?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  ride_date?: Prisma.StringFieldUpdateOperationsInput | string
  synced?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
  createdAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  updatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
}

export type ridesUncheckedUpdateWithoutUsersInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  company?: Prisma.StringFieldUpdateOperationsInput | string
  km?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  cost_per_km?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  total?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  ride_date?: Prisma.StringFieldUpdateOperationsInput | string
  synced?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
  createdAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  updatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
}

export type ridesUncheckedUpdateManyWithoutUsersInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  company?: Prisma.StringFieldUpdateOperationsInput | string
  km?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  cost_per_km?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  total?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  ride_date?: Prisma.StringFieldUpdateOperationsInput | string
  synced?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
  createdAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  updatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
}



export type ridesSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  user_id?: boolean
  company?: boolean
  km?: boolean
  cost_per_km?: boolean
  total?: boolean
  ride_date?: boolean
  synced?: boolean
  createdAt?: boolean
  updatedAt?: boolean
  users?: boolean | Prisma.usersDefaultArgs<ExtArgs>
}, ExtArgs["result"]["rides"]>

export type ridesSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  user_id?: boolean
  company?: boolean
  km?: boolean
  cost_per_km?: boolean
  total?: boolean
  ride_date?: boolean
  synced?: boolean
  createdAt?: boolean
  updatedAt?: boolean
  users?: boolean | Prisma.usersDefaultArgs<ExtArgs>
}, ExtArgs["result"]["rides"]>

export type ridesSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  user_id?: boolean
  company?: boolean
  km?: boolean
  cost_per_km?: boolean
  total?: boolean
  ride_date?: boolean
  synced?: boolean
  createdAt?: boolean
  updatedAt?: boolean
  users?: boolean | Prisma.usersDefaultArgs<ExtArgs>
}, ExtArgs["result"]["rides"]>

export type ridesSelectScalar = {
  id?: boolean
  user_id?: boolean
  company?: boolean
  km?: boolean
  cost_per_km?: boolean
  total?: boolean
  ride_date?: boolean
  synced?: boolean
  createdAt?: boolean
  updatedAt?: boolean
}

export type ridesOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "user_id" | "company" | "km" | "cost_per_km" | "total" | "ride_date" | "synced" | "createdAt" | "updatedAt", ExtArgs["result"]["rides"]>
export type ridesInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  users?: boolean | Prisma.usersDefaultArgs<ExtArgs>
}
export type ridesIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  users?: boolean | Prisma.usersDefaultArgs<ExtArgs>
}
export type ridesIncludeUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  users?: boolean | Prisma.usersDefaultArgs<ExtArgs>
}

export type $ridesPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  name: "rides"
  objects: {
    users: Prisma.$usersPayload<ExtArgs>
  }
  scalars: runtime.Types.Extensions.GetPayloadResult<{
    id: string
    user_id: string
    company: string
    km: runtime.Decimal
    cost_per_km: runtime.Decimal
    total: runtime.Decimal
    ride_date: string
    synced: number | null
    createdAt: Date | null
    updatedAt: Date | null
  }, ExtArgs["result"]["rides"]>
  composites: {}
}

export type ridesGetPayload<S extends boolean | null | undefined | ridesDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$ridesPayload, S>

export type ridesCountArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> =
  Omit<ridesFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
    select?: RidesCountAggregateInputType | true
  }

export interface ridesDelegate<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> {
  [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['rides'], meta: { name: 'rides' } }
  /**
   * Find zero or one Rides that matches the filter.
   * @param {ridesFindUniqueArgs} args - Arguments to find a Rides
   * @example
   * // Get one Rides
   * const rides = await prisma.rides.findUnique({
   *   where: {
   *     // ... provide filter here
   *   }
   * })
   */
  findUnique<T extends ridesFindUniqueArgs>(args: Prisma.SelectSubset<T, ridesFindUniqueArgs<ExtArgs>>): Prisma.Prisma__ridesClient<runtime.Types.Result.GetResult<Prisma.$ridesPayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

  /**
   * Find one Rides that matches the filter or throw an error with `error.code='P2025'`
   * if no matches were found.
   * @param {ridesFindUniqueOrThrowArgs} args - Arguments to find a Rides
   * @example
   * // Get one Rides
   * const rides = await prisma.rides.findUniqueOrThrow({
   *   where: {
   *     // ... provide filter here
   *   }
   * })
   */
  findUniqueOrThrow<T extends ridesFindUniqueOrThrowArgs>(args: Prisma.SelectSubset<T, ridesFindUniqueOrThrowArgs<ExtArgs>>): Prisma.Prisma__ridesClient<runtime.Types.Result.GetResult<Prisma.$ridesPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

  /**
   * Find the first Rides that matches the filter.
   * Note, that providing `undefined` is treated as the value not being there.
   * Read more here: https://pris.ly/d/null-undefined
   * @param {ridesFindFirstArgs} args - Arguments to find a Rides
   * @example
   * // Get one Rides
   * const rides = await prisma.rides.findFirst({
   *   where: {
   *     // ... provide filter here
   *   }
   * })
   */
  findFirst<T extends ridesFindFirstArgs>(args?: Prisma.SelectSubset<T, ridesFindFirstArgs<ExtArgs>>): Prisma.Prisma__ridesClient<runtime.Types.Result.GetResult<Prisma.$ridesPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

  /**
   * Find the first Rides that matches the filter or
   * throw `PrismaKnownClientError` with `P2025` code if no matches were found.
   * Note, that providing `undefined` is treated as the value not being there.
   * Read more here: https://pris.ly/d/null-undefined
   * @param {ridesFindFirstOrThrowArgs} args - Arguments to find a Rides
   * @example
   * // Get one Rides
   * const rides = await prisma.rides.findFirstOrThrow({
   *   where: {
   *     // ... provide filter here
   *   }
   * })
   */
  findFirstOrThrow<T extends ridesFindFirstOrThrowArgs>(args?: Prisma.SelectSubset<T, ridesFindFirstOrThrowArgs<ExtArgs>>): Prisma.Prisma__ridesClient<runtime.Types.Result.GetResult<Prisma.$ridesPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

  /**
   * Find zero or more Rides that matches the filter.
   * Note, that providing `undefined` is treated as the value not being there.
   * Read more here: https://pris.ly/d/null-undefined
   * @param {ridesFindManyArgs} args - Arguments to filter and select certain fields only.
   * @example
   * // Get all Rides
   * const rides = await prisma.rides.findMany()
   * 
   * // Get first 10 Rides
   * const rides = await prisma.rides.findMany({ take: 10 })
   * 
   * // Only select the `id`
   * const ridesWithIdOnly = await prisma.rides.findMany({ select: { id: true } })
   * 
   */
  findMany<T extends ridesFindManyArgs>(args?: Prisma.SelectSubset<T, ridesFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$ridesPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>

  /**
   * Create a Rides.
   * @param {ridesCreateArgs} args - Arguments to create a Rides.
   * @example
   * // Create one Rides
   * const Rides = await prisma.rides.create({
   *   data: {
   *     // ... data to create a Rides
   *   }
   * })
   * 
   */
  create<T extends ridesCreateArgs>(args: Prisma.SelectSubset<T, ridesCreateArgs<ExtArgs>>): Prisma.Prisma__ridesClient<runtime.Types.Result.GetResult<Prisma.$ridesPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

  /**
   * Create many Rides.
   * @param {ridesCreateManyArgs} args - Arguments to create many Rides.
   * @example
   * // Create many Rides
   * const rides = await prisma.rides.createMany({
   *   data: [
   *     // ... provide data here
   *   ]
   * })
   *     
   */
  createMany<T extends ridesCreateManyArgs>(args?: Prisma.SelectSubset<T, ridesCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>

  /**
   * Create many Rides and returns the data saved in the database.
   * @param {ridesCreateManyAndReturnArgs} args - Arguments to create many Rides.
   * @example
   * // Create many Rides
   * const rides = await prisma.rides.createManyAndReturn({
   *   data: [
   *     // ... provide data here
   *   ]
   * })
   * 
   * // Create many Rides and only return the `id`
   * const ridesWithIdOnly = await prisma.rides.createManyAndReturn({
   *   select: { id: true },
   *   data: [
   *     // ... provide data here
   *   ]
   * })
   * Note, that providing `undefined` is treated as the value not being there.
   * Read more here: https://pris.ly/d/null-undefined
   * 
   */
  createManyAndReturn<T extends ridesCreateManyAndReturnArgs>(args?: Prisma.SelectSubset<T, ridesCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$ridesPayload<ExtArgs>, T, "createManyAndReturn", GlobalOmitOptions>>

  /**
   * Delete a Rides.
   * @param {ridesDeleteArgs} args - Arguments to delete one Rides.
   * @example
   * // Delete one Rides
   * const Rides = await prisma.rides.delete({
   *   where: {
   *     // ... filter to delete one Rides
   *   }
   * })
   * 
   */
  delete<T extends ridesDeleteArgs>(args: Prisma.SelectSubset<T, ridesDeleteArgs<ExtArgs>>): Prisma.Prisma__ridesClient<runtime.Types.Result.GetResult<Prisma.$ridesPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

  /**
   * Update one Rides.
   * @param {ridesUpdateArgs} args - Arguments to update one Rides.
   * @example
   * // Update one Rides
   * const rides = await prisma.rides.update({
   *   where: {
   *     // ... provide filter here
   *   },
   *   data: {
   *     // ... provide data here
   *   }
   * })
   * 
   */
  update<T extends ridesUpdateArgs>(args: Prisma.SelectSubset<T, ridesUpdateArgs<ExtArgs>>): Prisma.Prisma__ridesClient<runtime.Types.Result.GetResult<Prisma.$ridesPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

  /**
   * Delete zero or more Rides.
   * @param {ridesDeleteManyArgs} args - Arguments to filter Rides to delete.
   * @example
   * // Delete a few Rides
   * const { count } = await prisma.rides.deleteMany({
   *   where: {
   *     // ... provide filter here
   *   }
   * })
   * 
   */
  deleteMany<T extends ridesDeleteManyArgs>(args?: Prisma.SelectSubset<T, ridesDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>

  /**
   * Update zero or more Rides.
   * Note, that providing `undefined` is treated as the value not being there.
   * Read more here: https://pris.ly/d/null-undefined
   * @param {ridesUpdateManyArgs} args - Arguments to update one or more rows.
   * @example
   * // Update many Rides
   * const rides = await prisma.rides.updateMany({
   *   where: {
   *     // ... provide filter here
   *   },
   *   data: {
   *     // ... provide data here
   *   }
   * })
   * 
   */
  updateMany<T extends ridesUpdateManyArgs>(args: Prisma.SelectSubset<T, ridesUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>

  /**
   * Update zero or more Rides and returns the data updated in the database.
   * @param {ridesUpdateManyAndReturnArgs} args - Arguments to update many Rides.
   * @example
   * // Update many Rides
   * const rides = await prisma.rides.updateManyAndReturn({
   *   where: {
   *     // ... provide filter here
   *   },
   *   data: [
   *     // ... provide data here
   *   ]
   * })
   * 
   * // Update zero or more Rides and only return the `id`
   * const ridesWithIdOnly = await prisma.rides.updateManyAndReturn({
   *   select: { id: true },
   *   where: {
   *     // ... provide filter here
   *   },
   *   data: [
   *     // ... provide data here
   *   ]
   * })
   * Note, that providing `undefined` is treated as the value not being there.
   * Read more here: https://pris.ly/d/null-undefined
   * 
   */
  updateManyAndReturn<T extends ridesUpdateManyAndReturnArgs>(args: Prisma.SelectSubset<T, ridesUpdateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$ridesPayload<ExtArgs>, T, "updateManyAndReturn", GlobalOmitOptions>>

  /**
   * Create or update one Rides.
   * @param {ridesUpsertArgs} args - Arguments to update or create a Rides.
   * @example
   * // Update or create a Rides
   * const rides = await prisma.rides.upsert({
   *   create: {
   *     // ... data to create a Rides
   *   },
   *   update: {
   *     // ... in case it already exists, update
   *   },
   *   where: {
   *     // ... the filter for the Rides we want to update
   *   }
   * })
   */
  upsert<T extends ridesUpsertArgs>(args: Prisma.SelectSubset<T, ridesUpsertArgs<ExtArgs>>): Prisma.Prisma__ridesClient<runtime.Types.Result.GetResult<Prisma.$ridesPayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>


  /**
   * Count the number of Rides.
   * Note, that providing `undefined` is treated as the value not being there.
   * Read more here: https://pris.ly/d/null-undefined
   * @param {ridesCountArgs} args - Arguments to filter Rides to count.
   * @example
   * // Count the number of Rides
   * const count = await prisma.rides.count({
   *   where: {
   *     // ... the filter for the Rides we want to count
   *   }
   * })
  **/
  count<T extends ridesCountArgs>(
    args?: Prisma.Subset<T, ridesCountArgs>,
  ): Prisma.PrismaPromise<
    T extends runtime.Types.Utils.Record<'select', any>
      ? T['select'] extends true
        ? number
        : Prisma.GetScalarType<T['select'], RidesCountAggregateOutputType>
      : number
  >

  /**
   * Allows you to perform aggregations operations on a Rides.
   * Note, that providing `undefined` is treated as the value not being there.
   * Read more here: https://pris.ly/d/null-undefined
   * @param {RidesAggregateArgs} args - Select which aggregations you would like to apply and on what fields.
   * @example
   * // Ordered by age ascending
   * // Where email contains prisma.io
   * // Limited to the 10 users
   * const aggregations = await prisma.user.aggregate({
   *   _avg: {
   *     age: true,
   *   },
   *   where: {
   *     email: {
   *       contains: "prisma.io",
   *     },
   *   },
   *   orderBy: {
   *     age: "asc",
   *   },
   *   take: 10,
   * })
  **/
  aggregate<T extends RidesAggregateArgs>(args: Prisma.Subset<T, RidesAggregateArgs>): Prisma.PrismaPromise<GetRidesAggregateType<T>>

  /**
   * Group by Rides.
   * Note, that providing `undefined` is treated as the value not being there.
   * Read more here: https://pris.ly/d/null-undefined
   * @param {ridesGroupByArgs} args - Group by arguments.
   * @example
   * // Group by city, order by createdAt, get count
   * const result = await prisma.user.groupBy({
   *   by: ['city', 'createdAt'],
   *   orderBy: {
   *     createdAt: true
   *   },
   *   _count: {
   *     _all: true
   *   },
   * })
   * 
  **/
  groupBy<
    T extends ridesGroupByArgs,
    HasSelectOrTake extends Prisma.Or<
      Prisma.Extends<'skip', Prisma.Keys<T>>,
      Prisma.Extends<'take', Prisma.Keys<T>>
    >,
    OrderByArg extends Prisma.True extends HasSelectOrTake
      ? { orderBy: ridesGroupByArgs['orderBy'] }
      : { orderBy?: ridesGroupByArgs['orderBy'] },
    OrderFields extends Prisma.ExcludeUnderscoreKeys<Prisma.Keys<Prisma.MaybeTupleToUnion<T['orderBy']>>>,
    ByFields extends Prisma.MaybeTupleToUnion<T['by']>,
    ByValid extends Prisma.Has<ByFields, OrderFields>,
    HavingFields extends Prisma.GetHavingFields<T['having']>,
    HavingValid extends Prisma.Has<ByFields, HavingFields>,
    ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False,
    InputErrors extends ByEmpty extends Prisma.True
    ? `Error: "by" must not be empty.`
    : HavingValid extends Prisma.False
    ? {
        [P in HavingFields]: P extends ByFields
          ? never
          : P extends string
          ? `Error: Field "${P}" used in "having" needs to be provided in "by".`
          : [
              Error,
              'Field ',
              P,
              ` in "having" needs to be provided in "by"`,
            ]
      }[HavingFields]
    : 'take' extends Prisma.Keys<T>
    ? 'orderBy' extends Prisma.Keys<T>
      ? ByValid extends Prisma.True
        ? {}
        : {
            [P in OrderFields]: P extends ByFields
              ? never
              : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
          }[OrderFields]
      : 'Error: If you provide "take", you also need to provide "orderBy"'
    : 'skip' extends Prisma.Keys<T>
    ? 'orderBy' extends Prisma.Keys<T>
      ? ByValid extends Prisma.True
        ? {}
        : {
            [P in OrderFields]: P extends ByFields
              ? never
              : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
          }[OrderFields]
      : 'Error: If you provide "skip", you also need to provide "orderBy"'
    : ByValid extends Prisma.True
    ? {}
    : {
        [P in OrderFields]: P extends ByFields
          ? never
          : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
      }[OrderFields]
  >(args: Prisma.SubsetIntersection<T, ridesGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetRidesGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
/**
 * Fields of the rides model
 */
readonly fields: ridesFieldRefs;
}

/**
 * The delegate class that acts as a "Promise-like" for rides.
 * Why is this prefixed with `Prisma__`?
 * Because we want to prevent naming conflicts as mentioned in
 * https://github.com/prisma/prisma-client-js/issues/707
 */
export interface Prisma__ridesClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
  readonly [Symbol.toStringTag]: "PrismaPromise"
  users<T extends Prisma.usersDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.usersDefaultArgs<ExtArgs>>): Prisma.Prisma__usersClient<runtime.Types.Result.GetResult<Prisma.$usersPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
  /**
   * Attaches callbacks for the resolution and/or rejection of the Promise.
   * @param onfulfilled The callback to execute when the Promise is resolved.
   * @param onrejected The callback to execute when the Promise is rejected.
   * @returns A Promise for the completion of which ever callback is executed.
   */
  then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): runtime.Types.Utils.JsPromise<TResult1 | TResult2>
  /**
   * Attaches a callback for only the rejection of the Promise.
   * @param onrejected The callback to execute when the Promise is rejected.
   * @returns A Promise for the completion of the callback.
   */
  catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): runtime.Types.Utils.JsPromise<T | TResult>
  /**
   * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
   * resolved value cannot be modified from the callback.
   * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
   * @returns A Promise for the completion of the callback.
   */
  finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise<T>
}




/**
 * Fields of the rides model
 */
export interface ridesFieldRefs {
  readonly id: Prisma.FieldRef<"rides", 'String'>
  readonly user_id: Prisma.FieldRef<"rides", 'String'>
  readonly company: Prisma.FieldRef<"rides", 'String'>
  readonly km: Prisma.FieldRef<"rides", 'Decimal'>
  readonly cost_per_km: Prisma.FieldRef<"rides", 'Decimal'>
  readonly total: Prisma.FieldRef<"rides", 'Decimal'>
  readonly ride_date: Prisma.FieldRef<"rides", 'String'>
  readonly synced: Prisma.FieldRef<"rides", 'Int'>
  readonly createdAt: Prisma.FieldRef<"rides", 'DateTime'>
  readonly updatedAt: Prisma.FieldRef<"rides", 'DateTime'>
}
    

// Custom InputTypes
/**
 * rides findUnique
 */
export type ridesFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the rides
   */
  select?: Prisma.ridesSelect<ExtArgs> | null
  /**
   * Omit specific fields from the rides
   */
  omit?: Prisma.ridesOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.ridesInclude<ExtArgs> | null
  /**
   * Filter, which rides to fetch.
   */
  where: Prisma.ridesWhereUniqueInput
}

/**
 * rides findUniqueOrThrow
 */
export type ridesFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the rides
   */
  select?: Prisma.ridesSelect<ExtArgs> | null
  /**
   * Omit specific fields from the rides
   */
  omit?: Prisma.ridesOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.ridesInclude<ExtArgs> | null
  /**
   * Filter, which rides to fetch.
   */
  where: Prisma.ridesWhereUniqueInput
}

/**
 * rides findFirst
 */
export type ridesFindFirstArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the rides
   */
  select?: Prisma.ridesSelect<ExtArgs> | null
  /**
   * Omit specific fields from the rides
   */
  omit?: Prisma.ridesOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.ridesInclude<ExtArgs> | null
  /**
   * Filter, which rides to fetch.
   */
  where?: Prisma.ridesWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of rides to fetch.
   */
  orderBy?: Prisma.ridesOrderByWithRelationInput | Prisma.ridesOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the position for searching for rides.
   */
  cursor?: Prisma.ridesWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Take `±n` rides from the position of the cursor.
   */
  take?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Skip the first `n` rides.
   */
  skip?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
   * 
   * Filter by unique combinations of rides.
   */
  distinct?: Prisma.RidesScalarFieldEnum | Prisma.RidesScalarFieldEnum[]
}

/**
 * rides findFirstOrThrow
 */
export type ridesFindFirstOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the rides
   */
  select?: Prisma.ridesSelect<ExtArgs> | null
  /**
   * Omit specific fields from the rides
   */
  omit?: Prisma.ridesOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.ridesInclude<ExtArgs> | null
  /**
   * Filter, which rides to fetch.
   */
  where?: Prisma.ridesWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of rides to fetch.
   */
  orderBy?: Prisma.ridesOrderByWithRelationInput | Prisma.ridesOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the position for searching for rides.
   */
  cursor?: Prisma.ridesWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Take `±n` rides from the position of the cursor.
   */
  take?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Skip the first `n` rides.
   */
  skip?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
   * 
   * Filter by unique combinations of rides.
   */
  distinct?: Prisma.RidesScalarFieldEnum | Prisma.RidesScalarFieldEnum[]
}

/**
 * rides findMany
 */
export type ridesFindManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the rides
   */
  select?: Prisma.ridesSelect<ExtArgs> | null
  /**
   * Omit specific fields from the rides
   */
  omit?: Prisma.ridesOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.ridesInclude<ExtArgs> | null
  /**
   * Filter, which rides to fetch.
   */
  where?: Prisma.ridesWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of rides to fetch.
   */
  orderBy?: Prisma.ridesOrderByWithRelationInput | Prisma.ridesOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the position for listing rides.
   */
  cursor?: Prisma.ridesWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Take `±n` rides from the position of the cursor.
   */
  take?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Skip the first `n` rides.
   */
  skip?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
   * 
   * Filter by unique combinations of rides.
   */
  distinct?: Prisma.RidesScalarFieldEnum | Prisma.RidesScalarFieldEnum[]
}

/**
 * rides create
 */
export type ridesCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the rides
   */
  select?: Prisma.ridesSelect<ExtArgs> | null
  /**
   * Omit specific fields from the rides
   */
  omit?: Prisma.ridesOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.ridesInclude<ExtArgs> | null
  /**
   * The data needed to create a rides.
   */
  data: Prisma.XOR<Prisma.ridesCreateInput, Prisma.ridesUncheckedCreateInput>
}

/**
 * rides createMany
 */
export type ridesCreateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * The data used to create many rides.
   */
  data: Prisma.ridesCreateManyInput | Prisma.ridesCreateManyInput[]
  skipDuplicates?: boolean
}

/**
 * rides createManyAndReturn
 */
export type ridesCreateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the rides
   */
  select?: Prisma.ridesSelectCreateManyAndReturn<ExtArgs> | null
  /**
   * Omit specific fields from the rides
   */
  omit?: Prisma.ridesOmit<ExtArgs> | null
  /**
   * The data used to create many rides.
   */
  data: Prisma.ridesCreateManyInput | Prisma.ridesCreateManyInput[]
  skipDuplicates?: boolean
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.ridesIncludeCreateManyAndReturn<ExtArgs> | null
}

/**
 * rides update
 */
export type ridesUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the rides
   */
  select?: Prisma.ridesSelect<ExtArgs> | null
  /**
   * Omit specific fields from the rides
   */
  omit?: Prisma.ridesOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.ridesInclude<ExtArgs> | null
  /**
   * The data needed to update a rides.
   */
  data: Prisma.XOR<Prisma.ridesUpdateInput, Prisma.ridesUncheckedUpdateInput>
  /**
   * Choose, which rides to update.
   */
  where: Prisma.ridesWhereUniqueInput
}

/**
 * rides updateMany
 */
export type ridesUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * The data used to update rides.
   */
  data: Prisma.XOR<Prisma.ridesUpdateManyMutationInput, Prisma.ridesUncheckedUpdateManyInput>
  /**
   * Filter which rides to update
   */
  where?: Prisma.ridesWhereInput
  /**
   * Limit how many rides to update.
   */
  limit?: number
}

/**
 * rides updateManyAndReturn
 */
export type ridesUpdateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the rides
   */
  select?: Prisma.ridesSelectUpdateManyAndReturn<ExtArgs> | null
  /**
   * Omit specific fields from the rides
   */
  omit?: Prisma.ridesOmit<ExtArgs> | null
  /**
   * The data used to update rides.
   */
  data: Prisma.XOR<Prisma.ridesUpdateManyMutationInput, Prisma.ridesUncheckedUpdateManyInput>
  /**
   * Filter which rides to update
   */
  where?: Prisma.ridesWhereInput
  /**
   * Limit how many rides to update.
   */
  limit?: number
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.ridesIncludeUpdateManyAndReturn<ExtArgs> | null
}

/**
 * rides upsert
 */
export type ridesUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the rides
   */
  select?: Prisma.ridesSelect<ExtArgs> | null
  /**
   * Omit specific fields from the rides
   */
  omit?: Prisma.ridesOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.ridesInclude<ExtArgs> | null
  /**
   * The filter to search for the rides to update in case it exists.
   */
  where: Prisma.ridesWhereUniqueInput
  /**
   * In case the rides found by the `where` argument doesn't exist, create a new rides with this data.
   */
  create: Prisma.XOR<Prisma.ridesCreateInput, Prisma.ridesUncheckedCreateInput>
  /**
   * In case the rides was found with the provided `where` argument, update it with this data.
   */
  update: Prisma.XOR<Prisma.ridesUpdateInput, Prisma.ridesUncheckedUpdateInput>
}

/**
 * rides delete
 */
export type ridesDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the rides
   */
  select?: Prisma.ridesSelect<ExtArgs> | null
  /**
   * Omit specific fields from the rides
   */
  omit?: Prisma.ridesOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.ridesInclude<ExtArgs> | null
  /**
   * Filter which rides to delete.
   */
  where: Prisma.ridesWhereUniqueInput
}

/**
 * rides deleteMany
 */
export type ridesDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Filter which rides to delete
   */
  where?: Prisma.ridesWhereInput
  /**
   * Limit how many rides to delete.
   */
  limit?: number
}

/**
 * rides without action
 */
export type ridesDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the rides
   */
  select?: Prisma.ridesSelect<ExtArgs> | null
  /**
   * Omit specific fields from the rides
   */
  omit?: Prisma.ridesOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.ridesInclude<ExtArgs> | null
}
