
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
/* eslint-disable */
// biome-ignore-all lint: generated file
// @ts-nocheck 
/*
 * This file exports the `BatteryAlert` 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"
import type * as Prisma from "../internal/prismaNamespace"

/**
 * Model BatteryAlert
 * 
 */
export type BatteryAlertModel = runtime.Types.Result.DefaultSelection<Prisma.$BatteryAlertPayload>

export type AggregateBatteryAlert = {
  _count: BatteryAlertCountAggregateOutputType | null
  _avg: BatteryAlertAvgAggregateOutputType | null
  _sum: BatteryAlertSumAggregateOutputType | null
  _min: BatteryAlertMinAggregateOutputType | null
  _max: BatteryAlertMaxAggregateOutputType | null
}

export type BatteryAlertAvgAggregateOutputType = {
  threshold: number | null
}

export type BatteryAlertSumAggregateOutputType = {
  threshold: number | null
}

export type BatteryAlertMinAggregateOutputType = {
  id: string | null
  deviceId: string | null
  threshold: number | null
  notifyNumber: string | null
  message: string | null
  enabled: boolean | null
  lastBelow: boolean | null
  lastNotifiedAt: Date | null
  createdAt: Date | null
  updatedAt: Date | null
}

export type BatteryAlertMaxAggregateOutputType = {
  id: string | null
  deviceId: string | null
  threshold: number | null
  notifyNumber: string | null
  message: string | null
  enabled: boolean | null
  lastBelow: boolean | null
  lastNotifiedAt: Date | null
  createdAt: Date | null
  updatedAt: Date | null
}

export type BatteryAlertCountAggregateOutputType = {
  id: number
  deviceId: number
  threshold: number
  notifyNumber: number
  message: number
  enabled: number
  lastBelow: number
  lastNotifiedAt: number
  createdAt: number
  updatedAt: number
  _all: number
}


export type BatteryAlertAvgAggregateInputType = {
  threshold?: true
}

export type BatteryAlertSumAggregateInputType = {
  threshold?: true
}

export type BatteryAlertMinAggregateInputType = {
  id?: true
  deviceId?: true
  threshold?: true
  notifyNumber?: true
  message?: true
  enabled?: true
  lastBelow?: true
  lastNotifiedAt?: true
  createdAt?: true
  updatedAt?: true
}

export type BatteryAlertMaxAggregateInputType = {
  id?: true
  deviceId?: true
  threshold?: true
  notifyNumber?: true
  message?: true
  enabled?: true
  lastBelow?: true
  lastNotifiedAt?: true
  createdAt?: true
  updatedAt?: true
}

export type BatteryAlertCountAggregateInputType = {
  id?: true
  deviceId?: true
  threshold?: true
  notifyNumber?: true
  message?: true
  enabled?: true
  lastBelow?: true
  lastNotifiedAt?: true
  createdAt?: true
  updatedAt?: true
  _all?: true
}

export type BatteryAlertAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Filter which BatteryAlert to aggregate.
   */
  where?: Prisma.BatteryAlertWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of BatteryAlerts to fetch.
   */
  orderBy?: Prisma.BatteryAlertOrderByWithRelationInput | Prisma.BatteryAlertOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the start position
   */
  cursor?: Prisma.BatteryAlertWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Take `±n` BatteryAlerts 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` BatteryAlerts.
   */
  skip?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Count returned BatteryAlerts
  **/
  _count?: true | BatteryAlertCountAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to average
  **/
  _avg?: BatteryAlertAvgAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to sum
  **/
  _sum?: BatteryAlertSumAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to find the minimum value
  **/
  _min?: BatteryAlertMinAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to find the maximum value
  **/
  _max?: BatteryAlertMaxAggregateInputType
}

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




export type BatteryAlertGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.BatteryAlertWhereInput
  orderBy?: Prisma.BatteryAlertOrderByWithAggregationInput | Prisma.BatteryAlertOrderByWithAggregationInput[]
  by: Prisma.BatteryAlertScalarFieldEnum[] | Prisma.BatteryAlertScalarFieldEnum
  having?: Prisma.BatteryAlertScalarWhereWithAggregatesInput
  take?: number
  skip?: number
  _count?: BatteryAlertCountAggregateInputType | true
  _avg?: BatteryAlertAvgAggregateInputType
  _sum?: BatteryAlertSumAggregateInputType
  _min?: BatteryAlertMinAggregateInputType
  _max?: BatteryAlertMaxAggregateInputType
}

export type BatteryAlertGroupByOutputType = {
  id: string
  deviceId: string
  threshold: number
  notifyNumber: string
  message: string | null
  enabled: boolean
  lastBelow: boolean | null
  lastNotifiedAt: Date | null
  createdAt: Date
  updatedAt: Date
  _count: BatteryAlertCountAggregateOutputType | null
  _avg: BatteryAlertAvgAggregateOutputType | null
  _sum: BatteryAlertSumAggregateOutputType | null
  _min: BatteryAlertMinAggregateOutputType | null
  _max: BatteryAlertMaxAggregateOutputType | null
}

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



export type BatteryAlertWhereInput = {
  AND?: Prisma.BatteryAlertWhereInput | Prisma.BatteryAlertWhereInput[]
  OR?: Prisma.BatteryAlertWhereInput[]
  NOT?: Prisma.BatteryAlertWhereInput | Prisma.BatteryAlertWhereInput[]
  id?: Prisma.StringFilter<"BatteryAlert"> | string
  deviceId?: Prisma.StringFilter<"BatteryAlert"> | string
  threshold?: Prisma.IntFilter<"BatteryAlert"> | number
  notifyNumber?: Prisma.StringFilter<"BatteryAlert"> | string
  message?: Prisma.StringNullableFilter<"BatteryAlert"> | string | null
  enabled?: Prisma.BoolFilter<"BatteryAlert"> | boolean
  lastBelow?: Prisma.BoolNullableFilter<"BatteryAlert"> | boolean | null
  lastNotifiedAt?: Prisma.DateTimeNullableFilter<"BatteryAlert"> | Date | string | null
  createdAt?: Prisma.DateTimeFilter<"BatteryAlert"> | Date | string
  updatedAt?: Prisma.DateTimeFilter<"BatteryAlert"> | Date | string
  device?: Prisma.XOR<Prisma.DeviceScalarRelationFilter, Prisma.DeviceWhereInput>
}

export type BatteryAlertOrderByWithRelationInput = {
  id?: Prisma.SortOrder
  deviceId?: Prisma.SortOrder
  threshold?: Prisma.SortOrder
  notifyNumber?: Prisma.SortOrder
  message?: Prisma.SortOrderInput | Prisma.SortOrder
  enabled?: Prisma.SortOrder
  lastBelow?: Prisma.SortOrderInput | Prisma.SortOrder
  lastNotifiedAt?: Prisma.SortOrderInput | Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  updatedAt?: Prisma.SortOrder
  device?: Prisma.DeviceOrderByWithRelationInput
}

export type BatteryAlertWhereUniqueInput = Prisma.AtLeast<{
  id?: string
  deviceId?: string
  AND?: Prisma.BatteryAlertWhereInput | Prisma.BatteryAlertWhereInput[]
  OR?: Prisma.BatteryAlertWhereInput[]
  NOT?: Prisma.BatteryAlertWhereInput | Prisma.BatteryAlertWhereInput[]
  threshold?: Prisma.IntFilter<"BatteryAlert"> | number
  notifyNumber?: Prisma.StringFilter<"BatteryAlert"> | string
  message?: Prisma.StringNullableFilter<"BatteryAlert"> | string | null
  enabled?: Prisma.BoolFilter<"BatteryAlert"> | boolean
  lastBelow?: Prisma.BoolNullableFilter<"BatteryAlert"> | boolean | null
  lastNotifiedAt?: Prisma.DateTimeNullableFilter<"BatteryAlert"> | Date | string | null
  createdAt?: Prisma.DateTimeFilter<"BatteryAlert"> | Date | string
  updatedAt?: Prisma.DateTimeFilter<"BatteryAlert"> | Date | string
  device?: Prisma.XOR<Prisma.DeviceScalarRelationFilter, Prisma.DeviceWhereInput>
}, "id" | "deviceId">

export type BatteryAlertOrderByWithAggregationInput = {
  id?: Prisma.SortOrder
  deviceId?: Prisma.SortOrder
  threshold?: Prisma.SortOrder
  notifyNumber?: Prisma.SortOrder
  message?: Prisma.SortOrderInput | Prisma.SortOrder
  enabled?: Prisma.SortOrder
  lastBelow?: Prisma.SortOrderInput | Prisma.SortOrder
  lastNotifiedAt?: Prisma.SortOrderInput | Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  updatedAt?: Prisma.SortOrder
  _count?: Prisma.BatteryAlertCountOrderByAggregateInput
  _avg?: Prisma.BatteryAlertAvgOrderByAggregateInput
  _max?: Prisma.BatteryAlertMaxOrderByAggregateInput
  _min?: Prisma.BatteryAlertMinOrderByAggregateInput
  _sum?: Prisma.BatteryAlertSumOrderByAggregateInput
}

export type BatteryAlertScalarWhereWithAggregatesInput = {
  AND?: Prisma.BatteryAlertScalarWhereWithAggregatesInput | Prisma.BatteryAlertScalarWhereWithAggregatesInput[]
  OR?: Prisma.BatteryAlertScalarWhereWithAggregatesInput[]
  NOT?: Prisma.BatteryAlertScalarWhereWithAggregatesInput | Prisma.BatteryAlertScalarWhereWithAggregatesInput[]
  id?: Prisma.StringWithAggregatesFilter<"BatteryAlert"> | string
  deviceId?: Prisma.StringWithAggregatesFilter<"BatteryAlert"> | string
  threshold?: Prisma.IntWithAggregatesFilter<"BatteryAlert"> | number
  notifyNumber?: Prisma.StringWithAggregatesFilter<"BatteryAlert"> | string
  message?: Prisma.StringNullableWithAggregatesFilter<"BatteryAlert"> | string | null
  enabled?: Prisma.BoolWithAggregatesFilter<"BatteryAlert"> | boolean
  lastBelow?: Prisma.BoolNullableWithAggregatesFilter<"BatteryAlert"> | boolean | null
  lastNotifiedAt?: Prisma.DateTimeNullableWithAggregatesFilter<"BatteryAlert"> | Date | string | null
  createdAt?: Prisma.DateTimeWithAggregatesFilter<"BatteryAlert"> | Date | string
  updatedAt?: Prisma.DateTimeWithAggregatesFilter<"BatteryAlert"> | Date | string
}

export type BatteryAlertCreateInput = {
  id?: string
  threshold?: number
  notifyNumber: string
  message?: string | null
  enabled?: boolean
  lastBelow?: boolean | null
  lastNotifiedAt?: Date | string | null
  createdAt?: Date | string
  updatedAt?: Date | string
  device: Prisma.DeviceCreateNestedOneWithoutBatteryAlertInput
}

export type BatteryAlertUncheckedCreateInput = {
  id?: string
  deviceId: string
  threshold?: number
  notifyNumber: string
  message?: string | null
  enabled?: boolean
  lastBelow?: boolean | null
  lastNotifiedAt?: Date | string | null
  createdAt?: Date | string
  updatedAt?: Date | string
}

export type BatteryAlertUpdateInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  threshold?: Prisma.IntFieldUpdateOperationsInput | number
  notifyNumber?: Prisma.StringFieldUpdateOperationsInput | string
  message?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  enabled?: Prisma.BoolFieldUpdateOperationsInput | boolean
  lastBelow?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
  lastNotifiedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  device?: Prisma.DeviceUpdateOneRequiredWithoutBatteryAlertNestedInput
}

export type BatteryAlertUncheckedUpdateInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  deviceId?: Prisma.StringFieldUpdateOperationsInput | string
  threshold?: Prisma.IntFieldUpdateOperationsInput | number
  notifyNumber?: Prisma.StringFieldUpdateOperationsInput | string
  message?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  enabled?: Prisma.BoolFieldUpdateOperationsInput | boolean
  lastBelow?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
  lastNotifiedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}

export type BatteryAlertCreateManyInput = {
  id?: string
  deviceId: string
  threshold?: number
  notifyNumber: string
  message?: string | null
  enabled?: boolean
  lastBelow?: boolean | null
  lastNotifiedAt?: Date | string | null
  createdAt?: Date | string
  updatedAt?: Date | string
}

export type BatteryAlertUpdateManyMutationInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  threshold?: Prisma.IntFieldUpdateOperationsInput | number
  notifyNumber?: Prisma.StringFieldUpdateOperationsInput | string
  message?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  enabled?: Prisma.BoolFieldUpdateOperationsInput | boolean
  lastBelow?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
  lastNotifiedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}

export type BatteryAlertUncheckedUpdateManyInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  deviceId?: Prisma.StringFieldUpdateOperationsInput | string
  threshold?: Prisma.IntFieldUpdateOperationsInput | number
  notifyNumber?: Prisma.StringFieldUpdateOperationsInput | string
  message?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  enabled?: Prisma.BoolFieldUpdateOperationsInput | boolean
  lastBelow?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
  lastNotifiedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}

export type BatteryAlertNullableScalarRelationFilter = {
  is?: Prisma.BatteryAlertWhereInput | null
  isNot?: Prisma.BatteryAlertWhereInput | null
}

export type BatteryAlertCountOrderByAggregateInput = {
  id?: Prisma.SortOrder
  deviceId?: Prisma.SortOrder
  threshold?: Prisma.SortOrder
  notifyNumber?: Prisma.SortOrder
  message?: Prisma.SortOrder
  enabled?: Prisma.SortOrder
  lastBelow?: Prisma.SortOrder
  lastNotifiedAt?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  updatedAt?: Prisma.SortOrder
}

export type BatteryAlertAvgOrderByAggregateInput = {
  threshold?: Prisma.SortOrder
}

export type BatteryAlertMaxOrderByAggregateInput = {
  id?: Prisma.SortOrder
  deviceId?: Prisma.SortOrder
  threshold?: Prisma.SortOrder
  notifyNumber?: Prisma.SortOrder
  message?: Prisma.SortOrder
  enabled?: Prisma.SortOrder
  lastBelow?: Prisma.SortOrder
  lastNotifiedAt?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  updatedAt?: Prisma.SortOrder
}

export type BatteryAlertMinOrderByAggregateInput = {
  id?: Prisma.SortOrder
  deviceId?: Prisma.SortOrder
  threshold?: Prisma.SortOrder
  notifyNumber?: Prisma.SortOrder
  message?: Prisma.SortOrder
  enabled?: Prisma.SortOrder
  lastBelow?: Prisma.SortOrder
  lastNotifiedAt?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  updatedAt?: Prisma.SortOrder
}

export type BatteryAlertSumOrderByAggregateInput = {
  threshold?: Prisma.SortOrder
}

export type BatteryAlertCreateNestedOneWithoutDeviceInput = {
  create?: Prisma.XOR<Prisma.BatteryAlertCreateWithoutDeviceInput, Prisma.BatteryAlertUncheckedCreateWithoutDeviceInput>
  connectOrCreate?: Prisma.BatteryAlertCreateOrConnectWithoutDeviceInput
  connect?: Prisma.BatteryAlertWhereUniqueInput
}

export type BatteryAlertUncheckedCreateNestedOneWithoutDeviceInput = {
  create?: Prisma.XOR<Prisma.BatteryAlertCreateWithoutDeviceInput, Prisma.BatteryAlertUncheckedCreateWithoutDeviceInput>
  connectOrCreate?: Prisma.BatteryAlertCreateOrConnectWithoutDeviceInput
  connect?: Prisma.BatteryAlertWhereUniqueInput
}

export type BatteryAlertUpdateOneWithoutDeviceNestedInput = {
  create?: Prisma.XOR<Prisma.BatteryAlertCreateWithoutDeviceInput, Prisma.BatteryAlertUncheckedCreateWithoutDeviceInput>
  connectOrCreate?: Prisma.BatteryAlertCreateOrConnectWithoutDeviceInput
  upsert?: Prisma.BatteryAlertUpsertWithoutDeviceInput
  disconnect?: Prisma.BatteryAlertWhereInput | boolean
  delete?: Prisma.BatteryAlertWhereInput | boolean
  connect?: Prisma.BatteryAlertWhereUniqueInput
  update?: Prisma.XOR<Prisma.XOR<Prisma.BatteryAlertUpdateToOneWithWhereWithoutDeviceInput, Prisma.BatteryAlertUpdateWithoutDeviceInput>, Prisma.BatteryAlertUncheckedUpdateWithoutDeviceInput>
}

export type BatteryAlertUncheckedUpdateOneWithoutDeviceNestedInput = {
  create?: Prisma.XOR<Prisma.BatteryAlertCreateWithoutDeviceInput, Prisma.BatteryAlertUncheckedCreateWithoutDeviceInput>
  connectOrCreate?: Prisma.BatteryAlertCreateOrConnectWithoutDeviceInput
  upsert?: Prisma.BatteryAlertUpsertWithoutDeviceInput
  disconnect?: Prisma.BatteryAlertWhereInput | boolean
  delete?: Prisma.BatteryAlertWhereInput | boolean
  connect?: Prisma.BatteryAlertWhereUniqueInput
  update?: Prisma.XOR<Prisma.XOR<Prisma.BatteryAlertUpdateToOneWithWhereWithoutDeviceInput, Prisma.BatteryAlertUpdateWithoutDeviceInput>, Prisma.BatteryAlertUncheckedUpdateWithoutDeviceInput>
}

export type IntFieldUpdateOperationsInput = {
  set?: number
  increment?: number
  decrement?: number
  multiply?: number
  divide?: number
}

export type NullableBoolFieldUpdateOperationsInput = {
  set?: boolean | null
}

export type BatteryAlertCreateWithoutDeviceInput = {
  id?: string
  threshold?: number
  notifyNumber: string
  message?: string | null
  enabled?: boolean
  lastBelow?: boolean | null
  lastNotifiedAt?: Date | string | null
  createdAt?: Date | string
  updatedAt?: Date | string
}

export type BatteryAlertUncheckedCreateWithoutDeviceInput = {
  id?: string
  threshold?: number
  notifyNumber: string
  message?: string | null
  enabled?: boolean
  lastBelow?: boolean | null
  lastNotifiedAt?: Date | string | null
  createdAt?: Date | string
  updatedAt?: Date | string
}

export type BatteryAlertCreateOrConnectWithoutDeviceInput = {
  where: Prisma.BatteryAlertWhereUniqueInput
  create: Prisma.XOR<Prisma.BatteryAlertCreateWithoutDeviceInput, Prisma.BatteryAlertUncheckedCreateWithoutDeviceInput>
}

export type BatteryAlertUpsertWithoutDeviceInput = {
  update: Prisma.XOR<Prisma.BatteryAlertUpdateWithoutDeviceInput, Prisma.BatteryAlertUncheckedUpdateWithoutDeviceInput>
  create: Prisma.XOR<Prisma.BatteryAlertCreateWithoutDeviceInput, Prisma.BatteryAlertUncheckedCreateWithoutDeviceInput>
  where?: Prisma.BatteryAlertWhereInput
}

export type BatteryAlertUpdateToOneWithWhereWithoutDeviceInput = {
  where?: Prisma.BatteryAlertWhereInput
  data: Prisma.XOR<Prisma.BatteryAlertUpdateWithoutDeviceInput, Prisma.BatteryAlertUncheckedUpdateWithoutDeviceInput>
}

export type BatteryAlertUpdateWithoutDeviceInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  threshold?: Prisma.IntFieldUpdateOperationsInput | number
  notifyNumber?: Prisma.StringFieldUpdateOperationsInput | string
  message?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  enabled?: Prisma.BoolFieldUpdateOperationsInput | boolean
  lastBelow?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
  lastNotifiedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}

export type BatteryAlertUncheckedUpdateWithoutDeviceInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  threshold?: Prisma.IntFieldUpdateOperationsInput | number
  notifyNumber?: Prisma.StringFieldUpdateOperationsInput | string
  message?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  enabled?: Prisma.BoolFieldUpdateOperationsInput | boolean
  lastBelow?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
  lastNotifiedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}



export type BatteryAlertSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  deviceId?: boolean
  threshold?: boolean
  notifyNumber?: boolean
  message?: boolean
  enabled?: boolean
  lastBelow?: boolean
  lastNotifiedAt?: boolean
  createdAt?: boolean
  updatedAt?: boolean
  device?: boolean | Prisma.DeviceDefaultArgs<ExtArgs>
}, ExtArgs["result"]["batteryAlert"]>

export type BatteryAlertSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  deviceId?: boolean
  threshold?: boolean
  notifyNumber?: boolean
  message?: boolean
  enabled?: boolean
  lastBelow?: boolean
  lastNotifiedAt?: boolean
  createdAt?: boolean
  updatedAt?: boolean
  device?: boolean | Prisma.DeviceDefaultArgs<ExtArgs>
}, ExtArgs["result"]["batteryAlert"]>

export type BatteryAlertSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  deviceId?: boolean
  threshold?: boolean
  notifyNumber?: boolean
  message?: boolean
  enabled?: boolean
  lastBelow?: boolean
  lastNotifiedAt?: boolean
  createdAt?: boolean
  updatedAt?: boolean
  device?: boolean | Prisma.DeviceDefaultArgs<ExtArgs>
}, ExtArgs["result"]["batteryAlert"]>

export type BatteryAlertSelectScalar = {
  id?: boolean
  deviceId?: boolean
  threshold?: boolean
  notifyNumber?: boolean
  message?: boolean
  enabled?: boolean
  lastBelow?: boolean
  lastNotifiedAt?: boolean
  createdAt?: boolean
  updatedAt?: boolean
}

export type BatteryAlertOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "deviceId" | "threshold" | "notifyNumber" | "message" | "enabled" | "lastBelow" | "lastNotifiedAt" | "createdAt" | "updatedAt", ExtArgs["result"]["batteryAlert"]>
export type BatteryAlertInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  device?: boolean | Prisma.DeviceDefaultArgs<ExtArgs>
}
export type BatteryAlertIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  device?: boolean | Prisma.DeviceDefaultArgs<ExtArgs>
}
export type BatteryAlertIncludeUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  device?: boolean | Prisma.DeviceDefaultArgs<ExtArgs>
}

export type $BatteryAlertPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  name: "BatteryAlert"
  objects: {
    device: Prisma.$DevicePayload<ExtArgs>
  }
  scalars: runtime.Types.Extensions.GetPayloadResult<{
    id: string
    deviceId: string
    threshold: number
    notifyNumber: string
    message: string | null
    enabled: boolean
    lastBelow: boolean | null
    lastNotifiedAt: Date | null
    createdAt: Date
    updatedAt: Date
  }, ExtArgs["result"]["batteryAlert"]>
  composites: {}
}

export type BatteryAlertGetPayload<S extends boolean | null | undefined | BatteryAlertDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$BatteryAlertPayload, S>

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

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

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

  /**
   * Find the first BatteryAlert 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 {BatteryAlertFindFirstArgs} args - Arguments to find a BatteryAlert
   * @example
   * // Get one BatteryAlert
   * const batteryAlert = await prisma.batteryAlert.findFirst({
   *   where: {
   *     // ... provide filter here
   *   }
   * })
   */
  findFirst<T extends BatteryAlertFindFirstArgs>(args?: Prisma.SelectSubset<T, BatteryAlertFindFirstArgs<ExtArgs>>): Prisma.Prisma__BatteryAlertClient<runtime.Types.Result.GetResult<Prisma.$BatteryAlertPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

  /**
   * Find the first BatteryAlert 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 {BatteryAlertFindFirstOrThrowArgs} args - Arguments to find a BatteryAlert
   * @example
   * // Get one BatteryAlert
   * const batteryAlert = await prisma.batteryAlert.findFirstOrThrow({
   *   where: {
   *     // ... provide filter here
   *   }
   * })
   */
  findFirstOrThrow<T extends BatteryAlertFindFirstOrThrowArgs>(args?: Prisma.SelectSubset<T, BatteryAlertFindFirstOrThrowArgs<ExtArgs>>): Prisma.Prisma__BatteryAlertClient<runtime.Types.Result.GetResult<Prisma.$BatteryAlertPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

  /**
   * Find zero or more BatteryAlerts 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 {BatteryAlertFindManyArgs} args - Arguments to filter and select certain fields only.
   * @example
   * // Get all BatteryAlerts
   * const batteryAlerts = await prisma.batteryAlert.findMany()
   * 
   * // Get first 10 BatteryAlerts
   * const batteryAlerts = await prisma.batteryAlert.findMany({ take: 10 })
   * 
   * // Only select the `id`
   * const batteryAlertWithIdOnly = await prisma.batteryAlert.findMany({ select: { id: true } })
   * 
   */
  findMany<T extends BatteryAlertFindManyArgs>(args?: Prisma.SelectSubset<T, BatteryAlertFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$BatteryAlertPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>

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

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

  /**
   * Create many BatteryAlerts and returns the data saved in the database.
   * @param {BatteryAlertCreateManyAndReturnArgs} args - Arguments to create many BatteryAlerts.
   * @example
   * // Create many BatteryAlerts
   * const batteryAlert = await prisma.batteryAlert.createManyAndReturn({
   *   data: [
   *     // ... provide data here
   *   ]
   * })
   * 
   * // Create many BatteryAlerts and only return the `id`
   * const batteryAlertWithIdOnly = await prisma.batteryAlert.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 BatteryAlertCreateManyAndReturnArgs>(args?: Prisma.SelectSubset<T, BatteryAlertCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$BatteryAlertPayload<ExtArgs>, T, "createManyAndReturn", GlobalOmitOptions>>

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

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

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

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

  /**
   * Update zero or more BatteryAlerts and returns the data updated in the database.
   * @param {BatteryAlertUpdateManyAndReturnArgs} args - Arguments to update many BatteryAlerts.
   * @example
   * // Update many BatteryAlerts
   * const batteryAlert = await prisma.batteryAlert.updateManyAndReturn({
   *   where: {
   *     // ... provide filter here
   *   },
   *   data: [
   *     // ... provide data here
   *   ]
   * })
   * 
   * // Update zero or more BatteryAlerts and only return the `id`
   * const batteryAlertWithIdOnly = await prisma.batteryAlert.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 BatteryAlertUpdateManyAndReturnArgs>(args: Prisma.SelectSubset<T, BatteryAlertUpdateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$BatteryAlertPayload<ExtArgs>, T, "updateManyAndReturn", GlobalOmitOptions>>

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


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

  /**
   * Allows you to perform aggregations operations on a BatteryAlert.
   * Note, that providing `undefined` is treated as the value not being there.
   * Read more here: https://pris.ly/d/null-undefined
   * @param {BatteryAlertAggregateArgs} 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 BatteryAlertAggregateArgs>(args: Prisma.Subset<T, BatteryAlertAggregateArgs>): Prisma.PrismaPromise<GetBatteryAlertAggregateType<T>>

  /**
   * Group by BatteryAlert.
   * Note, that providing `undefined` is treated as the value not being there.
   * Read more here: https://pris.ly/d/null-undefined
   * @param {BatteryAlertGroupByArgs} 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 BatteryAlertGroupByArgs,
    HasSelectOrTake extends Prisma.Or<
      Prisma.Extends<'skip', Prisma.Keys<T>>,
      Prisma.Extends<'take', Prisma.Keys<T>>
    >,
    OrderByArg extends Prisma.True extends HasSelectOrTake
      ? { orderBy: BatteryAlertGroupByArgs['orderBy'] }
      : { orderBy?: BatteryAlertGroupByArgs['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, BatteryAlertGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetBatteryAlertGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
/**
 * Fields of the BatteryAlert model
 */
readonly fields: BatteryAlertFieldRefs;
}

/**
 * The delegate class that acts as a "Promise-like" for BatteryAlert.
 * 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__BatteryAlertClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
  readonly [Symbol.toStringTag]: "PrismaPromise"
  device<T extends Prisma.DeviceDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.DeviceDefaultArgs<ExtArgs>>): Prisma.Prisma__DeviceClient<runtime.Types.Result.GetResult<Prisma.$DevicePayload<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 BatteryAlert model
 */
export interface BatteryAlertFieldRefs {
  readonly id: Prisma.FieldRef<"BatteryAlert", 'String'>
  readonly deviceId: Prisma.FieldRef<"BatteryAlert", 'String'>
  readonly threshold: Prisma.FieldRef<"BatteryAlert", 'Int'>
  readonly notifyNumber: Prisma.FieldRef<"BatteryAlert", 'String'>
  readonly message: Prisma.FieldRef<"BatteryAlert", 'String'>
  readonly enabled: Prisma.FieldRef<"BatteryAlert", 'Boolean'>
  readonly lastBelow: Prisma.FieldRef<"BatteryAlert", 'Boolean'>
  readonly lastNotifiedAt: Prisma.FieldRef<"BatteryAlert", 'DateTime'>
  readonly createdAt: Prisma.FieldRef<"BatteryAlert", 'DateTime'>
  readonly updatedAt: Prisma.FieldRef<"BatteryAlert", 'DateTime'>
}
    

// Custom InputTypes
/**
 * BatteryAlert findUnique
 */
export type BatteryAlertFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the BatteryAlert
   */
  select?: Prisma.BatteryAlertSelect<ExtArgs> | null
  /**
   * Omit specific fields from the BatteryAlert
   */
  omit?: Prisma.BatteryAlertOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.BatteryAlertInclude<ExtArgs> | null
  /**
   * Filter, which BatteryAlert to fetch.
   */
  where: Prisma.BatteryAlertWhereUniqueInput
}

/**
 * BatteryAlert findUniqueOrThrow
 */
export type BatteryAlertFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the BatteryAlert
   */
  select?: Prisma.BatteryAlertSelect<ExtArgs> | null
  /**
   * Omit specific fields from the BatteryAlert
   */
  omit?: Prisma.BatteryAlertOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.BatteryAlertInclude<ExtArgs> | null
  /**
   * Filter, which BatteryAlert to fetch.
   */
  where: Prisma.BatteryAlertWhereUniqueInput
}

/**
 * BatteryAlert findFirst
 */
export type BatteryAlertFindFirstArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the BatteryAlert
   */
  select?: Prisma.BatteryAlertSelect<ExtArgs> | null
  /**
   * Omit specific fields from the BatteryAlert
   */
  omit?: Prisma.BatteryAlertOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.BatteryAlertInclude<ExtArgs> | null
  /**
   * Filter, which BatteryAlert to fetch.
   */
  where?: Prisma.BatteryAlertWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of BatteryAlerts to fetch.
   */
  orderBy?: Prisma.BatteryAlertOrderByWithRelationInput | Prisma.BatteryAlertOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the position for searching for BatteryAlerts.
   */
  cursor?: Prisma.BatteryAlertWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Take `±n` BatteryAlerts 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` BatteryAlerts.
   */
  skip?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
   * 
   * Filter by unique combinations of BatteryAlerts.
   */
  distinct?: Prisma.BatteryAlertScalarFieldEnum | Prisma.BatteryAlertScalarFieldEnum[]
}

/**
 * BatteryAlert findFirstOrThrow
 */
export type BatteryAlertFindFirstOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the BatteryAlert
   */
  select?: Prisma.BatteryAlertSelect<ExtArgs> | null
  /**
   * Omit specific fields from the BatteryAlert
   */
  omit?: Prisma.BatteryAlertOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.BatteryAlertInclude<ExtArgs> | null
  /**
   * Filter, which BatteryAlert to fetch.
   */
  where?: Prisma.BatteryAlertWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of BatteryAlerts to fetch.
   */
  orderBy?: Prisma.BatteryAlertOrderByWithRelationInput | Prisma.BatteryAlertOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the position for searching for BatteryAlerts.
   */
  cursor?: Prisma.BatteryAlertWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Take `±n` BatteryAlerts 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` BatteryAlerts.
   */
  skip?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
   * 
   * Filter by unique combinations of BatteryAlerts.
   */
  distinct?: Prisma.BatteryAlertScalarFieldEnum | Prisma.BatteryAlertScalarFieldEnum[]
}

/**
 * BatteryAlert findMany
 */
export type BatteryAlertFindManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the BatteryAlert
   */
  select?: Prisma.BatteryAlertSelect<ExtArgs> | null
  /**
   * Omit specific fields from the BatteryAlert
   */
  omit?: Prisma.BatteryAlertOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.BatteryAlertInclude<ExtArgs> | null
  /**
   * Filter, which BatteryAlerts to fetch.
   */
  where?: Prisma.BatteryAlertWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of BatteryAlerts to fetch.
   */
  orderBy?: Prisma.BatteryAlertOrderByWithRelationInput | Prisma.BatteryAlertOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the position for listing BatteryAlerts.
   */
  cursor?: Prisma.BatteryAlertWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Take `±n` BatteryAlerts 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` BatteryAlerts.
   */
  skip?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
   * 
   * Filter by unique combinations of BatteryAlerts.
   */
  distinct?: Prisma.BatteryAlertScalarFieldEnum | Prisma.BatteryAlertScalarFieldEnum[]
}

/**
 * BatteryAlert create
 */
export type BatteryAlertCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the BatteryAlert
   */
  select?: Prisma.BatteryAlertSelect<ExtArgs> | null
  /**
   * Omit specific fields from the BatteryAlert
   */
  omit?: Prisma.BatteryAlertOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.BatteryAlertInclude<ExtArgs> | null
  /**
   * The data needed to create a BatteryAlert.
   */
  data: Prisma.XOR<Prisma.BatteryAlertCreateInput, Prisma.BatteryAlertUncheckedCreateInput>
}

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

/**
 * BatteryAlert createManyAndReturn
 */
export type BatteryAlertCreateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the BatteryAlert
   */
  select?: Prisma.BatteryAlertSelectCreateManyAndReturn<ExtArgs> | null
  /**
   * Omit specific fields from the BatteryAlert
   */
  omit?: Prisma.BatteryAlertOmit<ExtArgs> | null
  /**
   * The data used to create many BatteryAlerts.
   */
  data: Prisma.BatteryAlertCreateManyInput | Prisma.BatteryAlertCreateManyInput[]
  skipDuplicates?: boolean
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.BatteryAlertIncludeCreateManyAndReturn<ExtArgs> | null
}

/**
 * BatteryAlert update
 */
export type BatteryAlertUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the BatteryAlert
   */
  select?: Prisma.BatteryAlertSelect<ExtArgs> | null
  /**
   * Omit specific fields from the BatteryAlert
   */
  omit?: Prisma.BatteryAlertOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.BatteryAlertInclude<ExtArgs> | null
  /**
   * The data needed to update a BatteryAlert.
   */
  data: Prisma.XOR<Prisma.BatteryAlertUpdateInput, Prisma.BatteryAlertUncheckedUpdateInput>
  /**
   * Choose, which BatteryAlert to update.
   */
  where: Prisma.BatteryAlertWhereUniqueInput
}

/**
 * BatteryAlert updateMany
 */
export type BatteryAlertUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * The data used to update BatteryAlerts.
   */
  data: Prisma.XOR<Prisma.BatteryAlertUpdateManyMutationInput, Prisma.BatteryAlertUncheckedUpdateManyInput>
  /**
   * Filter which BatteryAlerts to update
   */
  where?: Prisma.BatteryAlertWhereInput
  /**
   * Limit how many BatteryAlerts to update.
   */
  limit?: number
}

/**
 * BatteryAlert updateManyAndReturn
 */
export type BatteryAlertUpdateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the BatteryAlert
   */
  select?: Prisma.BatteryAlertSelectUpdateManyAndReturn<ExtArgs> | null
  /**
   * Omit specific fields from the BatteryAlert
   */
  omit?: Prisma.BatteryAlertOmit<ExtArgs> | null
  /**
   * The data used to update BatteryAlerts.
   */
  data: Prisma.XOR<Prisma.BatteryAlertUpdateManyMutationInput, Prisma.BatteryAlertUncheckedUpdateManyInput>
  /**
   * Filter which BatteryAlerts to update
   */
  where?: Prisma.BatteryAlertWhereInput
  /**
   * Limit how many BatteryAlerts to update.
   */
  limit?: number
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.BatteryAlertIncludeUpdateManyAndReturn<ExtArgs> | null
}

/**
 * BatteryAlert upsert
 */
export type BatteryAlertUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the BatteryAlert
   */
  select?: Prisma.BatteryAlertSelect<ExtArgs> | null
  /**
   * Omit specific fields from the BatteryAlert
   */
  omit?: Prisma.BatteryAlertOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.BatteryAlertInclude<ExtArgs> | null
  /**
   * The filter to search for the BatteryAlert to update in case it exists.
   */
  where: Prisma.BatteryAlertWhereUniqueInput
  /**
   * In case the BatteryAlert found by the `where` argument doesn't exist, create a new BatteryAlert with this data.
   */
  create: Prisma.XOR<Prisma.BatteryAlertCreateInput, Prisma.BatteryAlertUncheckedCreateInput>
  /**
   * In case the BatteryAlert was found with the provided `where` argument, update it with this data.
   */
  update: Prisma.XOR<Prisma.BatteryAlertUpdateInput, Prisma.BatteryAlertUncheckedUpdateInput>
}

/**
 * BatteryAlert delete
 */
export type BatteryAlertDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the BatteryAlert
   */
  select?: Prisma.BatteryAlertSelect<ExtArgs> | null
  /**
   * Omit specific fields from the BatteryAlert
   */
  omit?: Prisma.BatteryAlertOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.BatteryAlertInclude<ExtArgs> | null
  /**
   * Filter which BatteryAlert to delete.
   */
  where: Prisma.BatteryAlertWhereUniqueInput
}

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

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