
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
/* eslint-disable */
// biome-ignore-all lint: generated file
// @ts-nocheck 
/*
 * This file exports the `ip_history` 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 ip_history
 * 
 */
export type ip_historyModel = runtime.Types.Result.DefaultSelection<Prisma.$ip_historyPayload>

export type AggregateIp_history = {
  _count: Ip_historyCountAggregateOutputType | null
  _avg: Ip_historyAvgAggregateOutputType | null
  _sum: Ip_historySumAggregateOutputType | null
  _min: Ip_historyMinAggregateOutputType | null
  _max: Ip_historyMaxAggregateOutputType | null
}

export type Ip_historyAvgAggregateOutputType = {
  id: number | null
  account_id: number | null
  delivery_id: number | null
  service_id: number | null
  date: number | null
}

export type Ip_historySumAggregateOutputType = {
  id: number | null
  account_id: number | null
  delivery_id: number | null
  service_id: number | null
  date: bigint | null
}

export type Ip_historyMinAggregateOutputType = {
  id: number | null
  account_id: number | null
  delivery_id: number | null
  service_id: number | null
  ip: string | null
  date: bigint | null
}

export type Ip_historyMaxAggregateOutputType = {
  id: number | null
  account_id: number | null
  delivery_id: number | null
  service_id: number | null
  ip: string | null
  date: bigint | null
}

export type Ip_historyCountAggregateOutputType = {
  id: number
  account_id: number
  delivery_id: number
  service_id: number
  ip: number
  date: number
  _all: number
}


export type Ip_historyAvgAggregateInputType = {
  id?: true
  account_id?: true
  delivery_id?: true
  service_id?: true
  date?: true
}

export type Ip_historySumAggregateInputType = {
  id?: true
  account_id?: true
  delivery_id?: true
  service_id?: true
  date?: true
}

export type Ip_historyMinAggregateInputType = {
  id?: true
  account_id?: true
  delivery_id?: true
  service_id?: true
  ip?: true
  date?: true
}

export type Ip_historyMaxAggregateInputType = {
  id?: true
  account_id?: true
  delivery_id?: true
  service_id?: true
  ip?: true
  date?: true
}

export type Ip_historyCountAggregateInputType = {
  id?: true
  account_id?: true
  delivery_id?: true
  service_id?: true
  ip?: true
  date?: true
  _all?: true
}

export type Ip_historyAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Filter which ip_history to aggregate.
   */
  where?: Prisma.ip_historyWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of ip_histories to fetch.
   */
  orderBy?: Prisma.ip_historyOrderByWithRelationInput | Prisma.ip_historyOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the start position
   */
  cursor?: Prisma.ip_historyWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Take `±n` ip_histories 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` ip_histories.
   */
  skip?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Count returned ip_histories
  **/
  _count?: true | Ip_historyCountAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to average
  **/
  _avg?: Ip_historyAvgAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to sum
  **/
  _sum?: Ip_historySumAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to find the minimum value
  **/
  _min?: Ip_historyMinAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to find the maximum value
  **/
  _max?: Ip_historyMaxAggregateInputType
}

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




export type ip_historyGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.ip_historyWhereInput
  orderBy?: Prisma.ip_historyOrderByWithAggregationInput | Prisma.ip_historyOrderByWithAggregationInput[]
  by: Prisma.Ip_historyScalarFieldEnum[] | Prisma.Ip_historyScalarFieldEnum
  having?: Prisma.ip_historyScalarWhereWithAggregatesInput
  take?: number
  skip?: number
  _count?: Ip_historyCountAggregateInputType | true
  _avg?: Ip_historyAvgAggregateInputType
  _sum?: Ip_historySumAggregateInputType
  _min?: Ip_historyMinAggregateInputType
  _max?: Ip_historyMaxAggregateInputType
}

export type Ip_historyGroupByOutputType = {
  id: number
  account_id: number
  delivery_id: number
  service_id: number
  ip: string
  date: bigint
  _count: Ip_historyCountAggregateOutputType | null
  _avg: Ip_historyAvgAggregateOutputType | null
  _sum: Ip_historySumAggregateOutputType | null
  _min: Ip_historyMinAggregateOutputType | null
  _max: Ip_historyMaxAggregateOutputType | null
}

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



export type ip_historyWhereInput = {
  AND?: Prisma.ip_historyWhereInput | Prisma.ip_historyWhereInput[]
  OR?: Prisma.ip_historyWhereInput[]
  NOT?: Prisma.ip_historyWhereInput | Prisma.ip_historyWhereInput[]
  id?: Prisma.IntFilter<"ip_history"> | number
  account_id?: Prisma.IntFilter<"ip_history"> | number
  delivery_id?: Prisma.IntFilter<"ip_history"> | number
  service_id?: Prisma.IntFilter<"ip_history"> | number
  ip?: Prisma.StringFilter<"ip_history"> | string
  date?: Prisma.BigIntFilter<"ip_history"> | bigint | number
}

export type ip_historyOrderByWithRelationInput = {
  id?: Prisma.SortOrder
  account_id?: Prisma.SortOrder
  delivery_id?: Prisma.SortOrder
  service_id?: Prisma.SortOrder
  ip?: Prisma.SortOrder
  date?: Prisma.SortOrder
  _relevance?: Prisma.ip_historyOrderByRelevanceInput
}

export type ip_historyWhereUniqueInput = Prisma.AtLeast<{
  id?: number
  AND?: Prisma.ip_historyWhereInput | Prisma.ip_historyWhereInput[]
  OR?: Prisma.ip_historyWhereInput[]
  NOT?: Prisma.ip_historyWhereInput | Prisma.ip_historyWhereInput[]
  account_id?: Prisma.IntFilter<"ip_history"> | number
  delivery_id?: Prisma.IntFilter<"ip_history"> | number
  service_id?: Prisma.IntFilter<"ip_history"> | number
  ip?: Prisma.StringFilter<"ip_history"> | string
  date?: Prisma.BigIntFilter<"ip_history"> | bigint | number
}, "id">

export type ip_historyOrderByWithAggregationInput = {
  id?: Prisma.SortOrder
  account_id?: Prisma.SortOrder
  delivery_id?: Prisma.SortOrder
  service_id?: Prisma.SortOrder
  ip?: Prisma.SortOrder
  date?: Prisma.SortOrder
  _count?: Prisma.ip_historyCountOrderByAggregateInput
  _avg?: Prisma.ip_historyAvgOrderByAggregateInput
  _max?: Prisma.ip_historyMaxOrderByAggregateInput
  _min?: Prisma.ip_historyMinOrderByAggregateInput
  _sum?: Prisma.ip_historySumOrderByAggregateInput
}

export type ip_historyScalarWhereWithAggregatesInput = {
  AND?: Prisma.ip_historyScalarWhereWithAggregatesInput | Prisma.ip_historyScalarWhereWithAggregatesInput[]
  OR?: Prisma.ip_historyScalarWhereWithAggregatesInput[]
  NOT?: Prisma.ip_historyScalarWhereWithAggregatesInput | Prisma.ip_historyScalarWhereWithAggregatesInput[]
  id?: Prisma.IntWithAggregatesFilter<"ip_history"> | number
  account_id?: Prisma.IntWithAggregatesFilter<"ip_history"> | number
  delivery_id?: Prisma.IntWithAggregatesFilter<"ip_history"> | number
  service_id?: Prisma.IntWithAggregatesFilter<"ip_history"> | number
  ip?: Prisma.StringWithAggregatesFilter<"ip_history"> | string
  date?: Prisma.BigIntWithAggregatesFilter<"ip_history"> | bigint | number
}

export type ip_historyCreateInput = {
  account_id: number
  delivery_id: number
  service_id: number
  ip: string
  date: bigint | number
}

export type ip_historyUncheckedCreateInput = {
  id?: number
  account_id: number
  delivery_id: number
  service_id: number
  ip: string
  date: bigint | number
}

export type ip_historyUpdateInput = {
  account_id?: Prisma.IntFieldUpdateOperationsInput | number
  delivery_id?: Prisma.IntFieldUpdateOperationsInput | number
  service_id?: Prisma.IntFieldUpdateOperationsInput | number
  ip?: Prisma.StringFieldUpdateOperationsInput | string
  date?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
}

export type ip_historyUncheckedUpdateInput = {
  id?: Prisma.IntFieldUpdateOperationsInput | number
  account_id?: Prisma.IntFieldUpdateOperationsInput | number
  delivery_id?: Prisma.IntFieldUpdateOperationsInput | number
  service_id?: Prisma.IntFieldUpdateOperationsInput | number
  ip?: Prisma.StringFieldUpdateOperationsInput | string
  date?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
}

export type ip_historyCreateManyInput = {
  id?: number
  account_id: number
  delivery_id: number
  service_id: number
  ip: string
  date: bigint | number
}

export type ip_historyUpdateManyMutationInput = {
  account_id?: Prisma.IntFieldUpdateOperationsInput | number
  delivery_id?: Prisma.IntFieldUpdateOperationsInput | number
  service_id?: Prisma.IntFieldUpdateOperationsInput | number
  ip?: Prisma.StringFieldUpdateOperationsInput | string
  date?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
}

export type ip_historyUncheckedUpdateManyInput = {
  id?: Prisma.IntFieldUpdateOperationsInput | number
  account_id?: Prisma.IntFieldUpdateOperationsInput | number
  delivery_id?: Prisma.IntFieldUpdateOperationsInput | number
  service_id?: Prisma.IntFieldUpdateOperationsInput | number
  ip?: Prisma.StringFieldUpdateOperationsInput | string
  date?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
}

export type ip_historyOrderByRelevanceInput = {
  fields: Prisma.ip_historyOrderByRelevanceFieldEnum | Prisma.ip_historyOrderByRelevanceFieldEnum[]
  sort: Prisma.SortOrder
  search: string
}

export type ip_historyCountOrderByAggregateInput = {
  id?: Prisma.SortOrder
  account_id?: Prisma.SortOrder
  delivery_id?: Prisma.SortOrder
  service_id?: Prisma.SortOrder
  ip?: Prisma.SortOrder
  date?: Prisma.SortOrder
}

export type ip_historyAvgOrderByAggregateInput = {
  id?: Prisma.SortOrder
  account_id?: Prisma.SortOrder
  delivery_id?: Prisma.SortOrder
  service_id?: Prisma.SortOrder
  date?: Prisma.SortOrder
}

export type ip_historyMaxOrderByAggregateInput = {
  id?: Prisma.SortOrder
  account_id?: Prisma.SortOrder
  delivery_id?: Prisma.SortOrder
  service_id?: Prisma.SortOrder
  ip?: Prisma.SortOrder
  date?: Prisma.SortOrder
}

export type ip_historyMinOrderByAggregateInput = {
  id?: Prisma.SortOrder
  account_id?: Prisma.SortOrder
  delivery_id?: Prisma.SortOrder
  service_id?: Prisma.SortOrder
  ip?: Prisma.SortOrder
  date?: Prisma.SortOrder
}

export type ip_historySumOrderByAggregateInput = {
  id?: Prisma.SortOrder
  account_id?: Prisma.SortOrder
  delivery_id?: Prisma.SortOrder
  service_id?: Prisma.SortOrder
  date?: Prisma.SortOrder
}



export type ip_historySelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  account_id?: boolean
  delivery_id?: boolean
  service_id?: boolean
  ip?: boolean
  date?: boolean
}, ExtArgs["result"]["ip_history"]>



export type ip_historySelectScalar = {
  id?: boolean
  account_id?: boolean
  delivery_id?: boolean
  service_id?: boolean
  ip?: boolean
  date?: boolean
}

export type ip_historyOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "account_id" | "delivery_id" | "service_id" | "ip" | "date", ExtArgs["result"]["ip_history"]>

export type $ip_historyPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  name: "ip_history"
  objects: {}
  scalars: runtime.Types.Extensions.GetPayloadResult<{
    id: number
    account_id: number
    delivery_id: number
    service_id: number
    ip: string
    date: bigint
  }, ExtArgs["result"]["ip_history"]>
  composites: {}
}

export type ip_historyGetPayload<S extends boolean | null | undefined | ip_historyDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$ip_historyPayload, S>

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

/**
 * The delegate class that acts as a "Promise-like" for ip_history.
 * 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__ip_historyClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
  readonly [Symbol.toStringTag]: "PrismaPromise"
  /**
   * 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 ip_history model
 */
export interface ip_historyFieldRefs {
  readonly id: Prisma.FieldRef<"ip_history", 'Int'>
  readonly account_id: Prisma.FieldRef<"ip_history", 'Int'>
  readonly delivery_id: Prisma.FieldRef<"ip_history", 'Int'>
  readonly service_id: Prisma.FieldRef<"ip_history", 'Int'>
  readonly ip: Prisma.FieldRef<"ip_history", 'String'>
  readonly date: Prisma.FieldRef<"ip_history", 'BigInt'>
}
    

// Custom InputTypes
/**
 * ip_history findUnique
 */
export type ip_historyFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the ip_history
   */
  select?: Prisma.ip_historySelect<ExtArgs> | null
  /**
   * Omit specific fields from the ip_history
   */
  omit?: Prisma.ip_historyOmit<ExtArgs> | null
  /**
   * Filter, which ip_history to fetch.
   */
  where: Prisma.ip_historyWhereUniqueInput
}

/**
 * ip_history findUniqueOrThrow
 */
export type ip_historyFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the ip_history
   */
  select?: Prisma.ip_historySelect<ExtArgs> | null
  /**
   * Omit specific fields from the ip_history
   */
  omit?: Prisma.ip_historyOmit<ExtArgs> | null
  /**
   * Filter, which ip_history to fetch.
   */
  where: Prisma.ip_historyWhereUniqueInput
}

/**
 * ip_history findFirst
 */
export type ip_historyFindFirstArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the ip_history
   */
  select?: Prisma.ip_historySelect<ExtArgs> | null
  /**
   * Omit specific fields from the ip_history
   */
  omit?: Prisma.ip_historyOmit<ExtArgs> | null
  /**
   * Filter, which ip_history to fetch.
   */
  where?: Prisma.ip_historyWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of ip_histories to fetch.
   */
  orderBy?: Prisma.ip_historyOrderByWithRelationInput | Prisma.ip_historyOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the position for searching for ip_histories.
   */
  cursor?: Prisma.ip_historyWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Take `±n` ip_histories 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` ip_histories.
   */
  skip?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
   * 
   * Filter by unique combinations of ip_histories.
   */
  distinct?: Prisma.Ip_historyScalarFieldEnum | Prisma.Ip_historyScalarFieldEnum[]
}

/**
 * ip_history findFirstOrThrow
 */
export type ip_historyFindFirstOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the ip_history
   */
  select?: Prisma.ip_historySelect<ExtArgs> | null
  /**
   * Omit specific fields from the ip_history
   */
  omit?: Prisma.ip_historyOmit<ExtArgs> | null
  /**
   * Filter, which ip_history to fetch.
   */
  where?: Prisma.ip_historyWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of ip_histories to fetch.
   */
  orderBy?: Prisma.ip_historyOrderByWithRelationInput | Prisma.ip_historyOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the position for searching for ip_histories.
   */
  cursor?: Prisma.ip_historyWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Take `±n` ip_histories 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` ip_histories.
   */
  skip?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
   * 
   * Filter by unique combinations of ip_histories.
   */
  distinct?: Prisma.Ip_historyScalarFieldEnum | Prisma.Ip_historyScalarFieldEnum[]
}

/**
 * ip_history findMany
 */
export type ip_historyFindManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the ip_history
   */
  select?: Prisma.ip_historySelect<ExtArgs> | null
  /**
   * Omit specific fields from the ip_history
   */
  omit?: Prisma.ip_historyOmit<ExtArgs> | null
  /**
   * Filter, which ip_histories to fetch.
   */
  where?: Prisma.ip_historyWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of ip_histories to fetch.
   */
  orderBy?: Prisma.ip_historyOrderByWithRelationInput | Prisma.ip_historyOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the position for listing ip_histories.
   */
  cursor?: Prisma.ip_historyWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Take `±n` ip_histories 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` ip_histories.
   */
  skip?: number
  distinct?: Prisma.Ip_historyScalarFieldEnum | Prisma.Ip_historyScalarFieldEnum[]
}

/**
 * ip_history create
 */
export type ip_historyCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the ip_history
   */
  select?: Prisma.ip_historySelect<ExtArgs> | null
  /**
   * Omit specific fields from the ip_history
   */
  omit?: Prisma.ip_historyOmit<ExtArgs> | null
  /**
   * The data needed to create a ip_history.
   */
  data: Prisma.XOR<Prisma.ip_historyCreateInput, Prisma.ip_historyUncheckedCreateInput>
}

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

/**
 * ip_history update
 */
export type ip_historyUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the ip_history
   */
  select?: Prisma.ip_historySelect<ExtArgs> | null
  /**
   * Omit specific fields from the ip_history
   */
  omit?: Prisma.ip_historyOmit<ExtArgs> | null
  /**
   * The data needed to update a ip_history.
   */
  data: Prisma.XOR<Prisma.ip_historyUpdateInput, Prisma.ip_historyUncheckedUpdateInput>
  /**
   * Choose, which ip_history to update.
   */
  where: Prisma.ip_historyWhereUniqueInput
}

/**
 * ip_history updateMany
 */
export type ip_historyUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * The data used to update ip_histories.
   */
  data: Prisma.XOR<Prisma.ip_historyUpdateManyMutationInput, Prisma.ip_historyUncheckedUpdateManyInput>
  /**
   * Filter which ip_histories to update
   */
  where?: Prisma.ip_historyWhereInput
  /**
   * Limit how many ip_histories to update.
   */
  limit?: number
}

/**
 * ip_history upsert
 */
export type ip_historyUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the ip_history
   */
  select?: Prisma.ip_historySelect<ExtArgs> | null
  /**
   * Omit specific fields from the ip_history
   */
  omit?: Prisma.ip_historyOmit<ExtArgs> | null
  /**
   * The filter to search for the ip_history to update in case it exists.
   */
  where: Prisma.ip_historyWhereUniqueInput
  /**
   * In case the ip_history found by the `where` argument doesn't exist, create a new ip_history with this data.
   */
  create: Prisma.XOR<Prisma.ip_historyCreateInput, Prisma.ip_historyUncheckedCreateInput>
  /**
   * In case the ip_history was found with the provided `where` argument, update it with this data.
   */
  update: Prisma.XOR<Prisma.ip_historyUpdateInput, Prisma.ip_historyUncheckedUpdateInput>
}

/**
 * ip_history delete
 */
export type ip_historyDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the ip_history
   */
  select?: Prisma.ip_historySelect<ExtArgs> | null
  /**
   * Omit specific fields from the ip_history
   */
  omit?: Prisma.ip_historyOmit<ExtArgs> | null
  /**
   * Filter which ip_history to delete.
   */
  where: Prisma.ip_historyWhereUniqueInput
}

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

/**
 * ip_history without action
 */
export type ip_historyDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the ip_history
   */
  select?: Prisma.ip_historySelect<ExtArgs> | null
  /**
   * Omit specific fields from the ip_history
   */
  omit?: Prisma.ip_historyOmit<ExtArgs> | null
}
