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

export type AggregatePbx_app = {
  _count: Pbx_appCountAggregateOutputType | null
  _avg: Pbx_appAvgAggregateOutputType | null
  _sum: Pbx_appSumAggregateOutputType | null
  _min: Pbx_appMinAggregateOutputType | null
  _max: Pbx_appMaxAggregateOutputType | null
}

export type Pbx_appAvgAggregateOutputType = {
  id: number | null
  pbx_id: number | null
  date_origin: number | null
  date_update: number | null
  update_by: number | null
}

export type Pbx_appSumAggregateOutputType = {
  id: number | null
  pbx_id: number | null
  date_origin: bigint | null
  date_update: bigint | null
  update_by: number | null
}

export type Pbx_appMinAggregateOutputType = {
  id: number | null
  pbx_id: number | null
  username: string | null
  mac: string | null
  app: string | null
  note: string | null
  date_origin: bigint | null
  date_update: bigint | null
  update_by: number | null
}

export type Pbx_appMaxAggregateOutputType = {
  id: number | null
  pbx_id: number | null
  username: string | null
  mac: string | null
  app: string | null
  note: string | null
  date_origin: bigint | null
  date_update: bigint | null
  update_by: number | null
}

export type Pbx_appCountAggregateOutputType = {
  id: number
  pbx_id: number
  username: number
  mac: number
  app: number
  note: number
  date_origin: number
  date_update: number
  update_by: number
  _all: number
}


export type Pbx_appAvgAggregateInputType = {
  id?: true
  pbx_id?: true
  date_origin?: true
  date_update?: true
  update_by?: true
}

export type Pbx_appSumAggregateInputType = {
  id?: true
  pbx_id?: true
  date_origin?: true
  date_update?: true
  update_by?: true
}

export type Pbx_appMinAggregateInputType = {
  id?: true
  pbx_id?: true
  username?: true
  mac?: true
  app?: true
  note?: true
  date_origin?: true
  date_update?: true
  update_by?: true
}

export type Pbx_appMaxAggregateInputType = {
  id?: true
  pbx_id?: true
  username?: true
  mac?: true
  app?: true
  note?: true
  date_origin?: true
  date_update?: true
  update_by?: true
}

export type Pbx_appCountAggregateInputType = {
  id?: true
  pbx_id?: true
  username?: true
  mac?: true
  app?: true
  note?: true
  date_origin?: true
  date_update?: true
  update_by?: true
  _all?: true
}

export type Pbx_appAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Filter which pbx_app to aggregate.
   */
  where?: Prisma.pbx_appWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of pbx_apps to fetch.
   */
  orderBy?: Prisma.pbx_appOrderByWithRelationInput | Prisma.pbx_appOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the start position
   */
  cursor?: Prisma.pbx_appWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Take `±n` pbx_apps 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` pbx_apps.
   */
  skip?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Count returned pbx_apps
  **/
  _count?: true | Pbx_appCountAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to average
  **/
  _avg?: Pbx_appAvgAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to sum
  **/
  _sum?: Pbx_appSumAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to find the minimum value
  **/
  _min?: Pbx_appMinAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to find the maximum value
  **/
  _max?: Pbx_appMaxAggregateInputType
}

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




export type pbx_appGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.pbx_appWhereInput
  orderBy?: Prisma.pbx_appOrderByWithAggregationInput | Prisma.pbx_appOrderByWithAggregationInput[]
  by: Prisma.Pbx_appScalarFieldEnum[] | Prisma.Pbx_appScalarFieldEnum
  having?: Prisma.pbx_appScalarWhereWithAggregatesInput
  take?: number
  skip?: number
  _count?: Pbx_appCountAggregateInputType | true
  _avg?: Pbx_appAvgAggregateInputType
  _sum?: Pbx_appSumAggregateInputType
  _min?: Pbx_appMinAggregateInputType
  _max?: Pbx_appMaxAggregateInputType
}

export type Pbx_appGroupByOutputType = {
  id: number
  pbx_id: number
  username: string
  mac: string
  app: string
  note: string
  date_origin: bigint
  date_update: bigint
  update_by: number | null
  _count: Pbx_appCountAggregateOutputType | null
  _avg: Pbx_appAvgAggregateOutputType | null
  _sum: Pbx_appSumAggregateOutputType | null
  _min: Pbx_appMinAggregateOutputType | null
  _max: Pbx_appMaxAggregateOutputType | null
}

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



export type pbx_appWhereInput = {
  AND?: Prisma.pbx_appWhereInput | Prisma.pbx_appWhereInput[]
  OR?: Prisma.pbx_appWhereInput[]
  NOT?: Prisma.pbx_appWhereInput | Prisma.pbx_appWhereInput[]
  id?: Prisma.IntFilter<"pbx_app"> | number
  pbx_id?: Prisma.IntFilter<"pbx_app"> | number
  username?: Prisma.StringFilter<"pbx_app"> | string
  mac?: Prisma.StringFilter<"pbx_app"> | string
  app?: Prisma.StringFilter<"pbx_app"> | string
  note?: Prisma.StringFilter<"pbx_app"> | string
  date_origin?: Prisma.BigIntFilter<"pbx_app"> | bigint | number
  date_update?: Prisma.BigIntFilter<"pbx_app"> | bigint | number
  update_by?: Prisma.IntNullableFilter<"pbx_app"> | number | null
}

export type pbx_appOrderByWithRelationInput = {
  id?: Prisma.SortOrder
  pbx_id?: Prisma.SortOrder
  username?: Prisma.SortOrder
  mac?: Prisma.SortOrder
  app?: Prisma.SortOrder
  note?: Prisma.SortOrder
  date_origin?: Prisma.SortOrder
  date_update?: Prisma.SortOrder
  update_by?: Prisma.SortOrderInput | Prisma.SortOrder
  _relevance?: Prisma.pbx_appOrderByRelevanceInput
}

export type pbx_appWhereUniqueInput = Prisma.AtLeast<{
  id?: number
  AND?: Prisma.pbx_appWhereInput | Prisma.pbx_appWhereInput[]
  OR?: Prisma.pbx_appWhereInput[]
  NOT?: Prisma.pbx_appWhereInput | Prisma.pbx_appWhereInput[]
  pbx_id?: Prisma.IntFilter<"pbx_app"> | number
  username?: Prisma.StringFilter<"pbx_app"> | string
  mac?: Prisma.StringFilter<"pbx_app"> | string
  app?: Prisma.StringFilter<"pbx_app"> | string
  note?: Prisma.StringFilter<"pbx_app"> | string
  date_origin?: Prisma.BigIntFilter<"pbx_app"> | bigint | number
  date_update?: Prisma.BigIntFilter<"pbx_app"> | bigint | number
  update_by?: Prisma.IntNullableFilter<"pbx_app"> | number | null
}, "id">

export type pbx_appOrderByWithAggregationInput = {
  id?: Prisma.SortOrder
  pbx_id?: Prisma.SortOrder
  username?: Prisma.SortOrder
  mac?: Prisma.SortOrder
  app?: Prisma.SortOrder
  note?: Prisma.SortOrder
  date_origin?: Prisma.SortOrder
  date_update?: Prisma.SortOrder
  update_by?: Prisma.SortOrderInput | Prisma.SortOrder
  _count?: Prisma.pbx_appCountOrderByAggregateInput
  _avg?: Prisma.pbx_appAvgOrderByAggregateInput
  _max?: Prisma.pbx_appMaxOrderByAggregateInput
  _min?: Prisma.pbx_appMinOrderByAggregateInput
  _sum?: Prisma.pbx_appSumOrderByAggregateInput
}

export type pbx_appScalarWhereWithAggregatesInput = {
  AND?: Prisma.pbx_appScalarWhereWithAggregatesInput | Prisma.pbx_appScalarWhereWithAggregatesInput[]
  OR?: Prisma.pbx_appScalarWhereWithAggregatesInput[]
  NOT?: Prisma.pbx_appScalarWhereWithAggregatesInput | Prisma.pbx_appScalarWhereWithAggregatesInput[]
  id?: Prisma.IntWithAggregatesFilter<"pbx_app"> | number
  pbx_id?: Prisma.IntWithAggregatesFilter<"pbx_app"> | number
  username?: Prisma.StringWithAggregatesFilter<"pbx_app"> | string
  mac?: Prisma.StringWithAggregatesFilter<"pbx_app"> | string
  app?: Prisma.StringWithAggregatesFilter<"pbx_app"> | string
  note?: Prisma.StringWithAggregatesFilter<"pbx_app"> | string
  date_origin?: Prisma.BigIntWithAggregatesFilter<"pbx_app"> | bigint | number
  date_update?: Prisma.BigIntWithAggregatesFilter<"pbx_app"> | bigint | number
  update_by?: Prisma.IntNullableWithAggregatesFilter<"pbx_app"> | number | null
}

export type pbx_appCreateInput = {
  pbx_id: number
  username: string
  mac: string
  app?: string
  note: string
  date_origin: bigint | number
  date_update: bigint | number
  update_by?: number | null
}

export type pbx_appUncheckedCreateInput = {
  id?: number
  pbx_id: number
  username: string
  mac: string
  app?: string
  note: string
  date_origin: bigint | number
  date_update: bigint | number
  update_by?: number | null
}

export type pbx_appUpdateInput = {
  pbx_id?: Prisma.IntFieldUpdateOperationsInput | number
  username?: Prisma.StringFieldUpdateOperationsInput | string
  mac?: Prisma.StringFieldUpdateOperationsInput | string
  app?: Prisma.StringFieldUpdateOperationsInput | string
  note?: Prisma.StringFieldUpdateOperationsInput | string
  date_origin?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
  date_update?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
  update_by?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
}

export type pbx_appUncheckedUpdateInput = {
  id?: Prisma.IntFieldUpdateOperationsInput | number
  pbx_id?: Prisma.IntFieldUpdateOperationsInput | number
  username?: Prisma.StringFieldUpdateOperationsInput | string
  mac?: Prisma.StringFieldUpdateOperationsInput | string
  app?: Prisma.StringFieldUpdateOperationsInput | string
  note?: Prisma.StringFieldUpdateOperationsInput | string
  date_origin?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
  date_update?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
  update_by?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
}

export type pbx_appCreateManyInput = {
  id?: number
  pbx_id: number
  username: string
  mac: string
  app?: string
  note: string
  date_origin: bigint | number
  date_update: bigint | number
  update_by?: number | null
}

export type pbx_appUpdateManyMutationInput = {
  pbx_id?: Prisma.IntFieldUpdateOperationsInput | number
  username?: Prisma.StringFieldUpdateOperationsInput | string
  mac?: Prisma.StringFieldUpdateOperationsInput | string
  app?: Prisma.StringFieldUpdateOperationsInput | string
  note?: Prisma.StringFieldUpdateOperationsInput | string
  date_origin?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
  date_update?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
  update_by?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
}

export type pbx_appUncheckedUpdateManyInput = {
  id?: Prisma.IntFieldUpdateOperationsInput | number
  pbx_id?: Prisma.IntFieldUpdateOperationsInput | number
  username?: Prisma.StringFieldUpdateOperationsInput | string
  mac?: Prisma.StringFieldUpdateOperationsInput | string
  app?: Prisma.StringFieldUpdateOperationsInput | string
  note?: Prisma.StringFieldUpdateOperationsInput | string
  date_origin?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
  date_update?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
  update_by?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
}

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

export type pbx_appCountOrderByAggregateInput = {
  id?: Prisma.SortOrder
  pbx_id?: Prisma.SortOrder
  username?: Prisma.SortOrder
  mac?: Prisma.SortOrder
  app?: Prisma.SortOrder
  note?: Prisma.SortOrder
  date_origin?: Prisma.SortOrder
  date_update?: Prisma.SortOrder
  update_by?: Prisma.SortOrder
}

export type pbx_appAvgOrderByAggregateInput = {
  id?: Prisma.SortOrder
  pbx_id?: Prisma.SortOrder
  date_origin?: Prisma.SortOrder
  date_update?: Prisma.SortOrder
  update_by?: Prisma.SortOrder
}

export type pbx_appMaxOrderByAggregateInput = {
  id?: Prisma.SortOrder
  pbx_id?: Prisma.SortOrder
  username?: Prisma.SortOrder
  mac?: Prisma.SortOrder
  app?: Prisma.SortOrder
  note?: Prisma.SortOrder
  date_origin?: Prisma.SortOrder
  date_update?: Prisma.SortOrder
  update_by?: Prisma.SortOrder
}

export type pbx_appMinOrderByAggregateInput = {
  id?: Prisma.SortOrder
  pbx_id?: Prisma.SortOrder
  username?: Prisma.SortOrder
  mac?: Prisma.SortOrder
  app?: Prisma.SortOrder
  note?: Prisma.SortOrder
  date_origin?: Prisma.SortOrder
  date_update?: Prisma.SortOrder
  update_by?: Prisma.SortOrder
}

export type pbx_appSumOrderByAggregateInput = {
  id?: Prisma.SortOrder
  pbx_id?: Prisma.SortOrder
  date_origin?: Prisma.SortOrder
  date_update?: Prisma.SortOrder
  update_by?: Prisma.SortOrder
}



export type pbx_appSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  pbx_id?: boolean
  username?: boolean
  mac?: boolean
  app?: boolean
  note?: boolean
  date_origin?: boolean
  date_update?: boolean
  update_by?: boolean
}, ExtArgs["result"]["pbx_app"]>



export type pbx_appSelectScalar = {
  id?: boolean
  pbx_id?: boolean
  username?: boolean
  mac?: boolean
  app?: boolean
  note?: boolean
  date_origin?: boolean
  date_update?: boolean
  update_by?: boolean
}

export type pbx_appOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "pbx_id" | "username" | "mac" | "app" | "note" | "date_origin" | "date_update" | "update_by", ExtArgs["result"]["pbx_app"]>

export type $pbx_appPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  name: "pbx_app"
  objects: {}
  scalars: runtime.Types.Extensions.GetPayloadResult<{
    id: number
    pbx_id: number
    username: string
    mac: string
    app: string
    note: string
    date_origin: bigint
    date_update: bigint
    update_by: number | null
  }, ExtArgs["result"]["pbx_app"]>
  composites: {}
}

export type pbx_appGetPayload<S extends boolean | null | undefined | pbx_appDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$pbx_appPayload, S>

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

/**
 * The delegate class that acts as a "Promise-like" for pbx_app.
 * 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__pbx_appClient<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 pbx_app model
 */
export interface pbx_appFieldRefs {
  readonly id: Prisma.FieldRef<"pbx_app", 'Int'>
  readonly pbx_id: Prisma.FieldRef<"pbx_app", 'Int'>
  readonly username: Prisma.FieldRef<"pbx_app", 'String'>
  readonly mac: Prisma.FieldRef<"pbx_app", 'String'>
  readonly app: Prisma.FieldRef<"pbx_app", 'String'>
  readonly note: Prisma.FieldRef<"pbx_app", 'String'>
  readonly date_origin: Prisma.FieldRef<"pbx_app", 'BigInt'>
  readonly date_update: Prisma.FieldRef<"pbx_app", 'BigInt'>
  readonly update_by: Prisma.FieldRef<"pbx_app", 'Int'>
}
    

// Custom InputTypes
/**
 * pbx_app findUnique
 */
export type pbx_appFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the pbx_app
   */
  select?: Prisma.pbx_appSelect<ExtArgs> | null
  /**
   * Omit specific fields from the pbx_app
   */
  omit?: Prisma.pbx_appOmit<ExtArgs> | null
  /**
   * Filter, which pbx_app to fetch.
   */
  where: Prisma.pbx_appWhereUniqueInput
}

/**
 * pbx_app findUniqueOrThrow
 */
export type pbx_appFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the pbx_app
   */
  select?: Prisma.pbx_appSelect<ExtArgs> | null
  /**
   * Omit specific fields from the pbx_app
   */
  omit?: Prisma.pbx_appOmit<ExtArgs> | null
  /**
   * Filter, which pbx_app to fetch.
   */
  where: Prisma.pbx_appWhereUniqueInput
}

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

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

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

/**
 * pbx_app create
 */
export type pbx_appCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the pbx_app
   */
  select?: Prisma.pbx_appSelect<ExtArgs> | null
  /**
   * Omit specific fields from the pbx_app
   */
  omit?: Prisma.pbx_appOmit<ExtArgs> | null
  /**
   * The data needed to create a pbx_app.
   */
  data: Prisma.XOR<Prisma.pbx_appCreateInput, Prisma.pbx_appUncheckedCreateInput>
}

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

/**
 * pbx_app update
 */
export type pbx_appUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the pbx_app
   */
  select?: Prisma.pbx_appSelect<ExtArgs> | null
  /**
   * Omit specific fields from the pbx_app
   */
  omit?: Prisma.pbx_appOmit<ExtArgs> | null
  /**
   * The data needed to update a pbx_app.
   */
  data: Prisma.XOR<Prisma.pbx_appUpdateInput, Prisma.pbx_appUncheckedUpdateInput>
  /**
   * Choose, which pbx_app to update.
   */
  where: Prisma.pbx_appWhereUniqueInput
}

/**
 * pbx_app updateMany
 */
export type pbx_appUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * The data used to update pbx_apps.
   */
  data: Prisma.XOR<Prisma.pbx_appUpdateManyMutationInput, Prisma.pbx_appUncheckedUpdateManyInput>
  /**
   * Filter which pbx_apps to update
   */
  where?: Prisma.pbx_appWhereInput
  /**
   * Limit how many pbx_apps to update.
   */
  limit?: number
}

/**
 * pbx_app upsert
 */
export type pbx_appUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the pbx_app
   */
  select?: Prisma.pbx_appSelect<ExtArgs> | null
  /**
   * Omit specific fields from the pbx_app
   */
  omit?: Prisma.pbx_appOmit<ExtArgs> | null
  /**
   * The filter to search for the pbx_app to update in case it exists.
   */
  where: Prisma.pbx_appWhereUniqueInput
  /**
   * In case the pbx_app found by the `where` argument doesn't exist, create a new pbx_app with this data.
   */
  create: Prisma.XOR<Prisma.pbx_appCreateInput, Prisma.pbx_appUncheckedCreateInput>
  /**
   * In case the pbx_app was found with the provided `where` argument, update it with this data.
   */
  update: Prisma.XOR<Prisma.pbx_appUpdateInput, Prisma.pbx_appUncheckedUpdateInput>
}

/**
 * pbx_app delete
 */
export type pbx_appDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the pbx_app
   */
  select?: Prisma.pbx_appSelect<ExtArgs> | null
  /**
   * Omit specific fields from the pbx_app
   */
  omit?: Prisma.pbx_appOmit<ExtArgs> | null
  /**
   * Filter which pbx_app to delete.
   */
  where: Prisma.pbx_appWhereUniqueInput
}

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

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