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

/**
 * Model Groups
 * 
 */
export type GroupsModel = runtime.Types.Result.DefaultSelection<Prisma.$GroupsPayload>

export type AggregateGroups = {
  _count: GroupsCountAggregateOutputType | null
  _avg: GroupsAvgAggregateOutputType | null
  _sum: GroupsSumAggregateOutputType | null
  _min: GroupsMinAggregateOutputType | null
  _max: GroupsMaxAggregateOutputType | null
}

export type GroupsAvgAggregateOutputType = {
  telegramID: number | null
  linksDeleted: number | null
}

export type GroupsSumAggregateOutputType = {
  telegramID: bigint | null
  linksDeleted: bigint | null
}

export type GroupsMinAggregateOutputType = {
  telegramID: bigint | null
  name: string | null
  username: string | null
  linksDeleted: bigint | null
  createdAt: Date | null
  updatedAt: Date | null
}

export type GroupsMaxAggregateOutputType = {
  telegramID: bigint | null
  name: string | null
  username: string | null
  linksDeleted: bigint | null
  createdAt: Date | null
  updatedAt: Date | null
}

export type GroupsCountAggregateOutputType = {
  telegramID: number
  name: number
  username: number
  linksDeleted: number
  createdAt: number
  updatedAt: number
  _all: number
}


export type GroupsAvgAggregateInputType = {
  telegramID?: true
  linksDeleted?: true
}

export type GroupsSumAggregateInputType = {
  telegramID?: true
  linksDeleted?: true
}

export type GroupsMinAggregateInputType = {
  telegramID?: true
  name?: true
  username?: true
  linksDeleted?: true
  createdAt?: true
  updatedAt?: true
}

export type GroupsMaxAggregateInputType = {
  telegramID?: true
  name?: true
  username?: true
  linksDeleted?: true
  createdAt?: true
  updatedAt?: true
}

export type GroupsCountAggregateInputType = {
  telegramID?: true
  name?: true
  username?: true
  linksDeleted?: true
  createdAt?: true
  updatedAt?: true
  _all?: true
}

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

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




export type GroupsGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.GroupsWhereInput
  orderBy?: Prisma.GroupsOrderByWithAggregationInput | Prisma.GroupsOrderByWithAggregationInput[]
  by: Prisma.GroupsScalarFieldEnum[] | Prisma.GroupsScalarFieldEnum
  having?: Prisma.GroupsScalarWhereWithAggregatesInput
  take?: number
  skip?: number
  _count?: GroupsCountAggregateInputType | true
  _avg?: GroupsAvgAggregateInputType
  _sum?: GroupsSumAggregateInputType
  _min?: GroupsMinAggregateInputType
  _max?: GroupsMaxAggregateInputType
}

export type GroupsGroupByOutputType = {
  telegramID: bigint
  name: string
  username: string
  linksDeleted: bigint
  createdAt: Date
  updatedAt: Date
  _count: GroupsCountAggregateOutputType | null
  _avg: GroupsAvgAggregateOutputType | null
  _sum: GroupsSumAggregateOutputType | null
  _min: GroupsMinAggregateOutputType | null
  _max: GroupsMaxAggregateOutputType | null
}

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



export type GroupsWhereInput = {
  AND?: Prisma.GroupsWhereInput | Prisma.GroupsWhereInput[]
  OR?: Prisma.GroupsWhereInput[]
  NOT?: Prisma.GroupsWhereInput | Prisma.GroupsWhereInput[]
  telegramID?: Prisma.BigIntFilter<"Groups"> | bigint | number
  name?: Prisma.StringFilter<"Groups"> | string
  username?: Prisma.StringFilter<"Groups"> | string
  linksDeleted?: Prisma.BigIntFilter<"Groups"> | bigint | number
  createdAt?: Prisma.DateTimeFilter<"Groups"> | Date | string
  updatedAt?: Prisma.DateTimeFilter<"Groups"> | Date | string
}

export type GroupsOrderByWithRelationInput = {
  telegramID?: Prisma.SortOrder
  name?: Prisma.SortOrder
  username?: Prisma.SortOrder
  linksDeleted?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  updatedAt?: Prisma.SortOrder
}

export type GroupsWhereUniqueInput = Prisma.AtLeast<{
  telegramID?: bigint | number
  AND?: Prisma.GroupsWhereInput | Prisma.GroupsWhereInput[]
  OR?: Prisma.GroupsWhereInput[]
  NOT?: Prisma.GroupsWhereInput | Prisma.GroupsWhereInput[]
  name?: Prisma.StringFilter<"Groups"> | string
  username?: Prisma.StringFilter<"Groups"> | string
  linksDeleted?: Prisma.BigIntFilter<"Groups"> | bigint | number
  createdAt?: Prisma.DateTimeFilter<"Groups"> | Date | string
  updatedAt?: Prisma.DateTimeFilter<"Groups"> | Date | string
}, "telegramID">

export type GroupsOrderByWithAggregationInput = {
  telegramID?: Prisma.SortOrder
  name?: Prisma.SortOrder
  username?: Prisma.SortOrder
  linksDeleted?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  updatedAt?: Prisma.SortOrder
  _count?: Prisma.GroupsCountOrderByAggregateInput
  _avg?: Prisma.GroupsAvgOrderByAggregateInput
  _max?: Prisma.GroupsMaxOrderByAggregateInput
  _min?: Prisma.GroupsMinOrderByAggregateInput
  _sum?: Prisma.GroupsSumOrderByAggregateInput
}

export type GroupsScalarWhereWithAggregatesInput = {
  AND?: Prisma.GroupsScalarWhereWithAggregatesInput | Prisma.GroupsScalarWhereWithAggregatesInput[]
  OR?: Prisma.GroupsScalarWhereWithAggregatesInput[]
  NOT?: Prisma.GroupsScalarWhereWithAggregatesInput | Prisma.GroupsScalarWhereWithAggregatesInput[]
  telegramID?: Prisma.BigIntWithAggregatesFilter<"Groups"> | bigint | number
  name?: Prisma.StringWithAggregatesFilter<"Groups"> | string
  username?: Prisma.StringWithAggregatesFilter<"Groups"> | string
  linksDeleted?: Prisma.BigIntWithAggregatesFilter<"Groups"> | bigint | number
  createdAt?: Prisma.DateTimeWithAggregatesFilter<"Groups"> | Date | string
  updatedAt?: Prisma.DateTimeWithAggregatesFilter<"Groups"> | Date | string
}

export type GroupsCreateInput = {
  telegramID: bigint | number
  name: string
  username?: string
  linksDeleted?: bigint | number
  createdAt?: Date | string
  updatedAt?: Date | string
}

export type GroupsUncheckedCreateInput = {
  telegramID: bigint | number
  name: string
  username?: string
  linksDeleted?: bigint | number
  createdAt?: Date | string
  updatedAt?: Date | string
}

export type GroupsUpdateInput = {
  name?: Prisma.StringFieldUpdateOperationsInput | string
  username?: Prisma.StringFieldUpdateOperationsInput | string
  linksDeleted?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}

export type GroupsUncheckedUpdateInput = {
  name?: Prisma.StringFieldUpdateOperationsInput | string
  username?: Prisma.StringFieldUpdateOperationsInput | string
  linksDeleted?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}

export type GroupsCreateManyInput = {
  telegramID: bigint | number
  name: string
  username?: string
  linksDeleted?: bigint | number
  createdAt?: Date | string
  updatedAt?: Date | string
}

export type GroupsUpdateManyMutationInput = {
  name?: Prisma.StringFieldUpdateOperationsInput | string
  username?: Prisma.StringFieldUpdateOperationsInput | string
  linksDeleted?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}

export type GroupsUncheckedUpdateManyInput = {
  name?: Prisma.StringFieldUpdateOperationsInput | string
  username?: Prisma.StringFieldUpdateOperationsInput | string
  linksDeleted?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}

export type GroupsCountOrderByAggregateInput = {
  telegramID?: Prisma.SortOrder
  name?: Prisma.SortOrder
  username?: Prisma.SortOrder
  linksDeleted?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  updatedAt?: Prisma.SortOrder
}

export type GroupsAvgOrderByAggregateInput = {
  telegramID?: Prisma.SortOrder
  linksDeleted?: Prisma.SortOrder
}

export type GroupsMaxOrderByAggregateInput = {
  telegramID?: Prisma.SortOrder
  name?: Prisma.SortOrder
  username?: Prisma.SortOrder
  linksDeleted?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  updatedAt?: Prisma.SortOrder
}

export type GroupsMinOrderByAggregateInput = {
  telegramID?: Prisma.SortOrder
  name?: Prisma.SortOrder
  username?: Prisma.SortOrder
  linksDeleted?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  updatedAt?: Prisma.SortOrder
}

export type GroupsSumOrderByAggregateInput = {
  telegramID?: Prisma.SortOrder
  linksDeleted?: Prisma.SortOrder
}

export type StringFieldUpdateOperationsInput = {
  set?: string
}

export type BigIntFieldUpdateOperationsInput = {
  set?: bigint | number
  increment?: bigint | number
  decrement?: bigint | number
  multiply?: bigint | number
  divide?: bigint | number
}

export type DateTimeFieldUpdateOperationsInput = {
  set?: Date | string
}



export type GroupsSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  telegramID?: boolean
  name?: boolean
  username?: boolean
  linksDeleted?: boolean
  createdAt?: boolean
  updatedAt?: boolean
}, ExtArgs["result"]["groups"]>



export type GroupsSelectScalar = {
  telegramID?: boolean
  name?: boolean
  username?: boolean
  linksDeleted?: boolean
  createdAt?: boolean
  updatedAt?: boolean
}

export type GroupsOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"telegramID" | "name" | "username" | "linksDeleted" | "createdAt" | "updatedAt", ExtArgs["result"]["groups"]>

export type $GroupsPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  name: "Groups"
  objects: {}
  scalars: runtime.Types.Extensions.GetPayloadResult<{
    telegramID: bigint
    name: string
    username: string
    linksDeleted: bigint
    createdAt: Date
    updatedAt: Date
  }, ExtArgs["result"]["groups"]>
  composites: {}
}

export type GroupsGetPayload<S extends boolean | null | undefined | GroupsDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$GroupsPayload, S>

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

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

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

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

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

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

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

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

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

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

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

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

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

  /**
   * Find zero or more Groups that matches the filter.
   * @param {GroupsFindRawArgs} args - Select which filters you would like to apply.
   * @example
   * const groups = await prisma.groups.findRaw({
   *   filter: { age: { $gt: 25 } }
   * })
   */
  findRaw(args?: Prisma.GroupsFindRawArgs): Prisma.PrismaPromise<Prisma.JsonObject>

  /**
   * Perform aggregation operations on a Groups.
   * @param {GroupsAggregateRawArgs} args - Select which aggregations you would like to apply.
   * @example
   * const groups = await prisma.groups.aggregateRaw({
   *   pipeline: [
   *     { $match: { status: "registered" } },
   *     { $group: { _id: "$country", total: { $sum: 1 } } }
   *   ]
   * })
   */
  aggregateRaw(args?: Prisma.GroupsAggregateRawArgs): Prisma.PrismaPromise<Prisma.JsonObject>


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

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

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

/**
 * The delegate class that acts as a "Promise-like" for Groups.
 * 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__GroupsClient<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 Groups model
 */
export interface GroupsFieldRefs {
  readonly telegramID: Prisma.FieldRef<"Groups", 'BigInt'>
  readonly name: Prisma.FieldRef<"Groups", 'String'>
  readonly username: Prisma.FieldRef<"Groups", 'String'>
  readonly linksDeleted: Prisma.FieldRef<"Groups", 'BigInt'>
  readonly createdAt: Prisma.FieldRef<"Groups", 'DateTime'>
  readonly updatedAt: Prisma.FieldRef<"Groups", 'DateTime'>
}
    

// Custom InputTypes
/**
 * Groups findUnique
 */
export type GroupsFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Groups
   */
  select?: Prisma.GroupsSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Groups
   */
  omit?: Prisma.GroupsOmit<ExtArgs> | null
  /**
   * Filter, which Groups to fetch.
   */
  where: Prisma.GroupsWhereUniqueInput
}

/**
 * Groups findUniqueOrThrow
 */
export type GroupsFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Groups
   */
  select?: Prisma.GroupsSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Groups
   */
  omit?: Prisma.GroupsOmit<ExtArgs> | null
  /**
   * Filter, which Groups to fetch.
   */
  where: Prisma.GroupsWhereUniqueInput
}

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

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

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

/**
 * Groups create
 */
export type GroupsCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Groups
   */
  select?: Prisma.GroupsSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Groups
   */
  omit?: Prisma.GroupsOmit<ExtArgs> | null
  /**
   * The data needed to create a Groups.
   */
  data: Prisma.XOR<Prisma.GroupsCreateInput, Prisma.GroupsUncheckedCreateInput>
}

/**
 * Groups createMany
 */
export type GroupsCreateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * The data used to create many Groups.
   */
  data: Prisma.GroupsCreateManyInput | Prisma.GroupsCreateManyInput[]
}

/**
 * Groups update
 */
export type GroupsUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Groups
   */
  select?: Prisma.GroupsSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Groups
   */
  omit?: Prisma.GroupsOmit<ExtArgs> | null
  /**
   * The data needed to update a Groups.
   */
  data: Prisma.XOR<Prisma.GroupsUpdateInput, Prisma.GroupsUncheckedUpdateInput>
  /**
   * Choose, which Groups to update.
   */
  where: Prisma.GroupsWhereUniqueInput
}

/**
 * Groups updateMany
 */
export type GroupsUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * The data used to update Groups.
   */
  data: Prisma.XOR<Prisma.GroupsUpdateManyMutationInput, Prisma.GroupsUncheckedUpdateManyInput>
  /**
   * Filter which Groups to update
   */
  where?: Prisma.GroupsWhereInput
  /**
   * Limit how many Groups to update.
   */
  limit?: number
}

/**
 * Groups upsert
 */
export type GroupsUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Groups
   */
  select?: Prisma.GroupsSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Groups
   */
  omit?: Prisma.GroupsOmit<ExtArgs> | null
  /**
   * The filter to search for the Groups to update in case it exists.
   */
  where: Prisma.GroupsWhereUniqueInput
  /**
   * In case the Groups found by the `where` argument doesn't exist, create a new Groups with this data.
   */
  create: Prisma.XOR<Prisma.GroupsCreateInput, Prisma.GroupsUncheckedCreateInput>
  /**
   * In case the Groups was found with the provided `where` argument, update it with this data.
   */
  update: Prisma.XOR<Prisma.GroupsUpdateInput, Prisma.GroupsUncheckedUpdateInput>
}

/**
 * Groups delete
 */
export type GroupsDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Groups
   */
  select?: Prisma.GroupsSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Groups
   */
  omit?: Prisma.GroupsOmit<ExtArgs> | null
  /**
   * Filter which Groups to delete.
   */
  where: Prisma.GroupsWhereUniqueInput
}

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

/**
 * Groups findRaw
 */
export type GroupsFindRawArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * The query predicate filter. If unspecified, then all documents in the collection will match the predicate. ${@link https://docs.mongodb.com/manual/reference/operator/query MongoDB Docs}.
   */
  filter?: runtime.InputJsonValue
  /**
   * Additional options to pass to the `find` command ${@link https://docs.mongodb.com/manual/reference/command/find/#command-fields MongoDB Docs}.
   */
  options?: runtime.InputJsonValue
}

/**
 * Groups aggregateRaw
 */
export type GroupsAggregateRawArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * An array of aggregation stages to process and transform the document stream via the aggregation pipeline. ${@link https://docs.mongodb.com/manual/reference/operator/aggregation-pipeline MongoDB Docs}.
   */
  pipeline?: runtime.InputJsonValue[]
  /**
   * Additional options to pass to the `aggregate` command ${@link https://docs.mongodb.com/manual/reference/command/aggregate/#command-fields MongoDB Docs}.
   */
  options?: runtime.InputJsonValue
}

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