
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
/* eslint-disable */
// @ts-nocheck 
/*
 * This file exports the `Group` 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 Group
 * 
 */
export type GroupModel = runtime.Types.Result.DefaultSelection<Prisma.$GroupPayload>

export type AggregateGroup = {
  _count: GroupCountAggregateOutputType | null
  _avg: GroupAvgAggregateOutputType | null
  _sum: GroupSumAggregateOutputType | null
  _min: GroupMinAggregateOutputType | null
  _max: GroupMaxAggregateOutputType | null
}

export type GroupAvgAggregateOutputType = {
  telegramID: number | null
}

export type GroupSumAggregateOutputType = {
  telegramID: number | null
}

export type GroupMinAggregateOutputType = {
  telegramID: number | null
  name: string | null
  createdAt: Date | null
  updatedAt: Date | null
}

export type GroupMaxAggregateOutputType = {
  telegramID: number | null
  name: string | null
  createdAt: Date | null
  updatedAt: Date | null
}

export type GroupCountAggregateOutputType = {
  telegramID: number
  name: number
  createdAt: number
  updatedAt: number
  _all: number
}


export type GroupAvgAggregateInputType = {
  telegramID?: true
}

export type GroupSumAggregateInputType = {
  telegramID?: true
}

export type GroupMinAggregateInputType = {
  telegramID?: true
  name?: true
  createdAt?: true
  updatedAt?: true
}

export type GroupMaxAggregateInputType = {
  telegramID?: true
  name?: true
  createdAt?: true
  updatedAt?: true
}

export type GroupCountAggregateInputType = {
  telegramID?: true
  name?: true
  createdAt?: true
  updatedAt?: true
  _all?: true
}

export type GroupAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Filter which Group to aggregate.
   */
  where?: Prisma.GroupWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of Groups to fetch.
   */
  orderBy?: Prisma.GroupOrderByWithRelationInput | Prisma.GroupOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the start position
   */
  cursor?: Prisma.GroupWhereUniqueInput
  /**
   * {@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 | GroupCountAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to average
  **/
  _avg?: GroupAvgAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to sum
  **/
  _sum?: GroupSumAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to find the minimum value
  **/
  _min?: GroupMinAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to find the maximum value
  **/
  _max?: GroupMaxAggregateInputType
}

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




export type GroupGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.GroupWhereInput
  orderBy?: Prisma.GroupOrderByWithAggregationInput | Prisma.GroupOrderByWithAggregationInput[]
  by: Prisma.GroupScalarFieldEnum[] | Prisma.GroupScalarFieldEnum
  having?: Prisma.GroupScalarWhereWithAggregatesInput
  take?: number
  skip?: number
  _count?: GroupCountAggregateInputType | true
  _avg?: GroupAvgAggregateInputType
  _sum?: GroupSumAggregateInputType
  _min?: GroupMinAggregateInputType
  _max?: GroupMaxAggregateInputType
}

export type GroupGroupByOutputType = {
  telegramID: number
  name: string
  createdAt: Date
  updatedAt: Date
  _count: GroupCountAggregateOutputType | null
  _avg: GroupAvgAggregateOutputType | null
  _sum: GroupSumAggregateOutputType | null
  _min: GroupMinAggregateOutputType | null
  _max: GroupMaxAggregateOutputType | null
}

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



export type GroupWhereInput = {
  AND?: Prisma.GroupWhereInput | Prisma.GroupWhereInput[]
  OR?: Prisma.GroupWhereInput[]
  NOT?: Prisma.GroupWhereInput | Prisma.GroupWhereInput[]
  telegramID?: Prisma.IntFilter<"Group"> | number
  name?: Prisma.StringFilter<"Group"> | string
  createdAt?: Prisma.DateTimeFilter<"Group"> | Date | string
  updatedAt?: Prisma.DateTimeFilter<"Group"> | Date | string
}

export type GroupOrderByWithRelationInput = {
  telegramID?: Prisma.SortOrder
  name?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  updatedAt?: Prisma.SortOrder
}

export type GroupWhereUniqueInput = Prisma.AtLeast<{
  telegramID?: number
  AND?: Prisma.GroupWhereInput | Prisma.GroupWhereInput[]
  OR?: Prisma.GroupWhereInput[]
  NOT?: Prisma.GroupWhereInput | Prisma.GroupWhereInput[]
  name?: Prisma.StringFilter<"Group"> | string
  createdAt?: Prisma.DateTimeFilter<"Group"> | Date | string
  updatedAt?: Prisma.DateTimeFilter<"Group"> | Date | string
}, "telegramID">

export type GroupOrderByWithAggregationInput = {
  telegramID?: Prisma.SortOrder
  name?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  updatedAt?: Prisma.SortOrder
  _count?: Prisma.GroupCountOrderByAggregateInput
  _avg?: Prisma.GroupAvgOrderByAggregateInput
  _max?: Prisma.GroupMaxOrderByAggregateInput
  _min?: Prisma.GroupMinOrderByAggregateInput
  _sum?: Prisma.GroupSumOrderByAggregateInput
}

export type GroupScalarWhereWithAggregatesInput = {
  AND?: Prisma.GroupScalarWhereWithAggregatesInput | Prisma.GroupScalarWhereWithAggregatesInput[]
  OR?: Prisma.GroupScalarWhereWithAggregatesInput[]
  NOT?: Prisma.GroupScalarWhereWithAggregatesInput | Prisma.GroupScalarWhereWithAggregatesInput[]
  telegramID?: Prisma.IntWithAggregatesFilter<"Group"> | number
  name?: Prisma.StringWithAggregatesFilter<"Group"> | string
  createdAt?: Prisma.DateTimeWithAggregatesFilter<"Group"> | Date | string
  updatedAt?: Prisma.DateTimeWithAggregatesFilter<"Group"> | Date | string
}

export type GroupCreateInput = {
  telegramID: number
  name: string
  createdAt?: Date | string
  updatedAt?: Date | string
}

export type GroupUncheckedCreateInput = {
  telegramID: number
  name: string
  createdAt?: Date | string
  updatedAt?: Date | string
}

export type GroupUpdateInput = {
  name?: Prisma.StringFieldUpdateOperationsInput | string
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}

export type GroupUncheckedUpdateInput = {
  name?: Prisma.StringFieldUpdateOperationsInput | string
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}

export type GroupCreateManyInput = {
  telegramID: number
  name: string
  createdAt?: Date | string
  updatedAt?: Date | string
}

export type GroupUpdateManyMutationInput = {
  name?: Prisma.StringFieldUpdateOperationsInput | string
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}

export type GroupUncheckedUpdateManyInput = {
  name?: Prisma.StringFieldUpdateOperationsInput | string
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}

export type GroupCountOrderByAggregateInput = {
  telegramID?: Prisma.SortOrder
  name?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  updatedAt?: Prisma.SortOrder
}

export type GroupAvgOrderByAggregateInput = {
  telegramID?: Prisma.SortOrder
}

export type GroupMaxOrderByAggregateInput = {
  telegramID?: Prisma.SortOrder
  name?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  updatedAt?: Prisma.SortOrder
}

export type GroupMinOrderByAggregateInput = {
  telegramID?: Prisma.SortOrder
  name?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  updatedAt?: Prisma.SortOrder
}

export type GroupSumOrderByAggregateInput = {
  telegramID?: Prisma.SortOrder
}

export type StringFieldUpdateOperationsInput = {
  set?: string
}

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



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



export type GroupSelectScalar = {
  telegramID?: boolean
  name?: boolean
  createdAt?: boolean
  updatedAt?: boolean
}

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

export type $GroupPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  name: "Group"
  objects: {}
  scalars: runtime.Types.Extensions.GetPayloadResult<{
    telegramID: number
    name: string
    createdAt: Date
    updatedAt: Date
  }, ExtArgs["result"]["group"]>
  composites: {}
}

export type GroupGetPayload<S extends boolean | null | undefined | GroupDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$GroupPayload, S>

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

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

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

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

  /**
   * Find the first Group 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 {GroupFindFirstOrThrowArgs} args - Arguments to find a Group
   * @example
   * // Get one Group
   * const group = await prisma.group.findFirstOrThrow({
   *   where: {
   *     // ... provide filter here
   *   }
   * })
   */
  findFirstOrThrow<T extends GroupFindFirstOrThrowArgs>(args?: Prisma.SelectSubset<T, GroupFindFirstOrThrowArgs<ExtArgs>>): Prisma.Prisma__GroupClient<runtime.Types.Result.GetResult<Prisma.$GroupPayload<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 {GroupFindManyArgs} args - Arguments to filter and select certain fields only.
   * @example
   * // Get all Groups
   * const groups = await prisma.group.findMany()
   * 
   * // Get first 10 Groups
   * const groups = await prisma.group.findMany({ take: 10 })
   * 
   * // Only select the `telegramID`
   * const groupWithTelegramIDOnly = await prisma.group.findMany({ select: { telegramID: true } })
   * 
   */
  findMany<T extends GroupFindManyArgs>(args?: Prisma.SelectSubset<T, GroupFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$GroupPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>

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

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

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

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

  /**
   * Delete zero or more Groups.
   * @param {GroupDeleteManyArgs} args - Arguments to filter Groups to delete.
   * @example
   * // Delete a few Groups
   * const { count } = await prisma.group.deleteMany({
   *   where: {
   *     // ... provide filter here
   *   }
   * })
   * 
   */
  deleteMany<T extends GroupDeleteManyArgs>(args?: Prisma.SelectSubset<T, GroupDeleteManyArgs<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 {GroupUpdateManyArgs} args - Arguments to update one or more rows.
   * @example
   * // Update many Groups
   * const group = await prisma.group.updateMany({
   *   where: {
   *     // ... provide filter here
   *   },
   *   data: {
   *     // ... provide data here
   *   }
   * })
   * 
   */
  updateMany<T extends GroupUpdateManyArgs>(args: Prisma.SelectSubset<T, GroupUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>

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

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

  /**
   * Perform aggregation operations on a Group.
   * @param {GroupAggregateRawArgs} args - Select which aggregations you would like to apply.
   * @example
   * const group = await prisma.group.aggregateRaw({
   *   pipeline: [
   *     { $match: { status: "registered" } },
   *     { $group: { _id: "$country", total: { $sum: 1 } } }
   *   ]
   * })
   */
  aggregateRaw(args?: Prisma.GroupAggregateRawArgs): 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 {GroupCountArgs} args - Arguments to filter Groups to count.
   * @example
   * // Count the number of Groups
   * const count = await prisma.group.count({
   *   where: {
   *     // ... the filter for the Groups we want to count
   *   }
   * })
  **/
  count<T extends GroupCountArgs>(
    args?: Prisma.Subset<T, GroupCountArgs>,
  ): Prisma.PrismaPromise<
    T extends runtime.Types.Utils.Record<'select', any>
      ? T['select'] extends true
        ? number
        : Prisma.GetScalarType<T['select'], GroupCountAggregateOutputType>
      : number
  >

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

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

/**
 * The delegate class that acts as a "Promise-like" for Group.
 * 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__GroupClient<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 Group model
 */
export interface GroupFieldRefs {
  readonly telegramID: Prisma.FieldRef<"Group", 'Int'>
  readonly name: Prisma.FieldRef<"Group", 'String'>
  readonly createdAt: Prisma.FieldRef<"Group", 'DateTime'>
  readonly updatedAt: Prisma.FieldRef<"Group", 'DateTime'>
}
    

// Custom InputTypes
/**
 * Group findUnique
 */
export type GroupFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Group
   */
  select?: Prisma.GroupSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Group
   */
  omit?: Prisma.GroupOmit<ExtArgs> | null
  /**
   * Filter, which Group to fetch.
   */
  where: Prisma.GroupWhereUniqueInput
}

/**
 * Group findUniqueOrThrow
 */
export type GroupFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Group
   */
  select?: Prisma.GroupSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Group
   */
  omit?: Prisma.GroupOmit<ExtArgs> | null
  /**
   * Filter, which Group to fetch.
   */
  where: Prisma.GroupWhereUniqueInput
}

/**
 * Group findFirst
 */
export type GroupFindFirstArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Group
   */
  select?: Prisma.GroupSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Group
   */
  omit?: Prisma.GroupOmit<ExtArgs> | null
  /**
   * Filter, which Group to fetch.
   */
  where?: Prisma.GroupWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of Groups to fetch.
   */
  orderBy?: Prisma.GroupOrderByWithRelationInput | Prisma.GroupOrderByWithRelationInput[]
  /**
   * {@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.GroupWhereUniqueInput
  /**
   * {@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.GroupScalarFieldEnum | Prisma.GroupScalarFieldEnum[]
}

/**
 * Group findFirstOrThrow
 */
export type GroupFindFirstOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Group
   */
  select?: Prisma.GroupSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Group
   */
  omit?: Prisma.GroupOmit<ExtArgs> | null
  /**
   * Filter, which Group to fetch.
   */
  where?: Prisma.GroupWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of Groups to fetch.
   */
  orderBy?: Prisma.GroupOrderByWithRelationInput | Prisma.GroupOrderByWithRelationInput[]
  /**
   * {@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.GroupWhereUniqueInput
  /**
   * {@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.GroupScalarFieldEnum | Prisma.GroupScalarFieldEnum[]
}

/**
 * Group findMany
 */
export type GroupFindManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Group
   */
  select?: Prisma.GroupSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Group
   */
  omit?: Prisma.GroupOmit<ExtArgs> | null
  /**
   * Filter, which Groups to fetch.
   */
  where?: Prisma.GroupWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of Groups to fetch.
   */
  orderBy?: Prisma.GroupOrderByWithRelationInput | Prisma.GroupOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the position for listing Groups.
   */
  cursor?: Prisma.GroupWhereUniqueInput
  /**
   * {@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.GroupScalarFieldEnum | Prisma.GroupScalarFieldEnum[]
}

/**
 * Group create
 */
export type GroupCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Group
   */
  select?: Prisma.GroupSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Group
   */
  omit?: Prisma.GroupOmit<ExtArgs> | null
  /**
   * The data needed to create a Group.
   */
  data: Prisma.XOR<Prisma.GroupCreateInput, Prisma.GroupUncheckedCreateInput>
}

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

/**
 * Group update
 */
export type GroupUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Group
   */
  select?: Prisma.GroupSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Group
   */
  omit?: Prisma.GroupOmit<ExtArgs> | null
  /**
   * The data needed to update a Group.
   */
  data: Prisma.XOR<Prisma.GroupUpdateInput, Prisma.GroupUncheckedUpdateInput>
  /**
   * Choose, which Group to update.
   */
  where: Prisma.GroupWhereUniqueInput
}

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

/**
 * Group upsert
 */
export type GroupUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Group
   */
  select?: Prisma.GroupSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Group
   */
  omit?: Prisma.GroupOmit<ExtArgs> | null
  /**
   * The filter to search for the Group to update in case it exists.
   */
  where: Prisma.GroupWhereUniqueInput
  /**
   * In case the Group found by the `where` argument doesn't exist, create a new Group with this data.
   */
  create: Prisma.XOR<Prisma.GroupCreateInput, Prisma.GroupUncheckedCreateInput>
  /**
   * In case the Group was found with the provided `where` argument, update it with this data.
   */
  update: Prisma.XOR<Prisma.GroupUpdateInput, Prisma.GroupUncheckedUpdateInput>
}

/**
 * Group delete
 */
export type GroupDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Group
   */
  select?: Prisma.GroupSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Group
   */
  omit?: Prisma.GroupOmit<ExtArgs> | null
  /**
   * Filter which Group to delete.
   */
  where: Prisma.GroupWhereUniqueInput
}

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

/**
 * Group findRaw
 */
export type GroupFindRawArgs<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
}

/**
 * Group aggregateRaw
 */
export type GroupAggregateRawArgs<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
}

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