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

export type AggregateRole = {
  _count: RoleCountAggregateOutputType | null
  _min: RoleMinAggregateOutputType | null
  _max: RoleMaxAggregateOutputType | null
}

export type RoleMinAggregateOutputType = {
  id: string | null
  code: string | null
  name: string | null
  accessAllBranch: boolean | null
  createdAt: Date | null
  modifiedAt: Date | null
}

export type RoleMaxAggregateOutputType = {
  id: string | null
  code: string | null
  name: string | null
  accessAllBranch: boolean | null
  createdAt: Date | null
  modifiedAt: Date | null
}

export type RoleCountAggregateOutputType = {
  id: number
  code: number
  name: number
  accessAllBranch: number
  createdAt: number
  modifiedAt: number
  _all: number
}


export type RoleMinAggregateInputType = {
  id?: true
  code?: true
  name?: true
  accessAllBranch?: true
  createdAt?: true
  modifiedAt?: true
}

export type RoleMaxAggregateInputType = {
  id?: true
  code?: true
  name?: true
  accessAllBranch?: true
  createdAt?: true
  modifiedAt?: true
}

export type RoleCountAggregateInputType = {
  id?: true
  code?: true
  name?: true
  accessAllBranch?: true
  createdAt?: true
  modifiedAt?: true
  _all?: true
}

export type RoleAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Filter which Role to aggregate.
   */
  where?: Prisma.RoleWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of Roles to fetch.
   */
  orderBy?: Prisma.RoleOrderByWithRelationInput | Prisma.RoleOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the start position
   */
  cursor?: Prisma.RoleWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Take `±n` Roles 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` Roles.
   */
  skip?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Count returned Roles
  **/
  _count?: true | RoleCountAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to find the minimum value
  **/
  _min?: RoleMinAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to find the maximum value
  **/
  _max?: RoleMaxAggregateInputType
}

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




export type RoleGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.RoleWhereInput
  orderBy?: Prisma.RoleOrderByWithAggregationInput | Prisma.RoleOrderByWithAggregationInput[]
  by: Prisma.RoleScalarFieldEnum[] | Prisma.RoleScalarFieldEnum
  having?: Prisma.RoleScalarWhereWithAggregatesInput
  take?: number
  skip?: number
  _count?: RoleCountAggregateInputType | true
  _min?: RoleMinAggregateInputType
  _max?: RoleMaxAggregateInputType
}

export type RoleGroupByOutputType = {
  id: string
  code: string
  name: string
  accessAllBranch: boolean
  createdAt: Date
  modifiedAt: Date
  _count: RoleCountAggregateOutputType | null
  _min: RoleMinAggregateOutputType | null
  _max: RoleMaxAggregateOutputType | null
}

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



export type RoleWhereInput = {
  AND?: Prisma.RoleWhereInput | Prisma.RoleWhereInput[]
  OR?: Prisma.RoleWhereInput[]
  NOT?: Prisma.RoleWhereInput | Prisma.RoleWhereInput[]
  id?: Prisma.StringFilter<"Role"> | string
  code?: Prisma.StringFilter<"Role"> | string
  name?: Prisma.StringFilter<"Role"> | string
  accessAllBranch?: Prisma.BoolFilter<"Role"> | boolean
  createdAt?: Prisma.DateTimeFilter<"Role"> | Date | string
  modifiedAt?: Prisma.DateTimeFilter<"Role"> | Date | string
  users?: Prisma.UserListRelationFilter
}

export type RoleOrderByWithRelationInput = {
  id?: Prisma.SortOrder
  code?: Prisma.SortOrder
  name?: Prisma.SortOrder
  accessAllBranch?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  modifiedAt?: Prisma.SortOrder
  users?: Prisma.UserOrderByRelationAggregateInput
}

export type RoleWhereUniqueInput = Prisma.AtLeast<{
  id?: string
  code?: string
  AND?: Prisma.RoleWhereInput | Prisma.RoleWhereInput[]
  OR?: Prisma.RoleWhereInput[]
  NOT?: Prisma.RoleWhereInput | Prisma.RoleWhereInput[]
  name?: Prisma.StringFilter<"Role"> | string
  accessAllBranch?: Prisma.BoolFilter<"Role"> | boolean
  createdAt?: Prisma.DateTimeFilter<"Role"> | Date | string
  modifiedAt?: Prisma.DateTimeFilter<"Role"> | Date | string
  users?: Prisma.UserListRelationFilter
}, "id" | "code">

export type RoleOrderByWithAggregationInput = {
  id?: Prisma.SortOrder
  code?: Prisma.SortOrder
  name?: Prisma.SortOrder
  accessAllBranch?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  modifiedAt?: Prisma.SortOrder
  _count?: Prisma.RoleCountOrderByAggregateInput
  _max?: Prisma.RoleMaxOrderByAggregateInput
  _min?: Prisma.RoleMinOrderByAggregateInput
}

export type RoleScalarWhereWithAggregatesInput = {
  AND?: Prisma.RoleScalarWhereWithAggregatesInput | Prisma.RoleScalarWhereWithAggregatesInput[]
  OR?: Prisma.RoleScalarWhereWithAggregatesInput[]
  NOT?: Prisma.RoleScalarWhereWithAggregatesInput | Prisma.RoleScalarWhereWithAggregatesInput[]
  id?: Prisma.StringWithAggregatesFilter<"Role"> | string
  code?: Prisma.StringWithAggregatesFilter<"Role"> | string
  name?: Prisma.StringWithAggregatesFilter<"Role"> | string
  accessAllBranch?: Prisma.BoolWithAggregatesFilter<"Role"> | boolean
  createdAt?: Prisma.DateTimeWithAggregatesFilter<"Role"> | Date | string
  modifiedAt?: Prisma.DateTimeWithAggregatesFilter<"Role"> | Date | string
}

export type RoleCreateInput = {
  id?: string
  code: string
  name: string
  accessAllBranch?: boolean
  createdAt?: Date | string
  modifiedAt?: Date | string
  users?: Prisma.UserCreateNestedManyWithoutRoleInput
}

export type RoleUncheckedCreateInput = {
  id?: string
  code: string
  name: string
  accessAllBranch?: boolean
  createdAt?: Date | string
  modifiedAt?: Date | string
  users?: Prisma.UserUncheckedCreateNestedManyWithoutRoleInput
}

export type RoleUpdateInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  code?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  accessAllBranch?: Prisma.BoolFieldUpdateOperationsInput | boolean
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  modifiedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  users?: Prisma.UserUpdateManyWithoutRoleNestedInput
}

export type RoleUncheckedUpdateInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  code?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  accessAllBranch?: Prisma.BoolFieldUpdateOperationsInput | boolean
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  modifiedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  users?: Prisma.UserUncheckedUpdateManyWithoutRoleNestedInput
}

export type RoleCreateManyInput = {
  id?: string
  code: string
  name: string
  accessAllBranch?: boolean
  createdAt?: Date | string
  modifiedAt?: Date | string
}

export type RoleUpdateManyMutationInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  code?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  accessAllBranch?: Prisma.BoolFieldUpdateOperationsInput | boolean
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  modifiedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}

export type RoleUncheckedUpdateManyInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  code?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  accessAllBranch?: Prisma.BoolFieldUpdateOperationsInput | boolean
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  modifiedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}

export type RoleScalarRelationFilter = {
  is?: Prisma.RoleWhereInput
  isNot?: Prisma.RoleWhereInput
}

export type RoleCountOrderByAggregateInput = {
  id?: Prisma.SortOrder
  code?: Prisma.SortOrder
  name?: Prisma.SortOrder
  accessAllBranch?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  modifiedAt?: Prisma.SortOrder
}

export type RoleMaxOrderByAggregateInput = {
  id?: Prisma.SortOrder
  code?: Prisma.SortOrder
  name?: Prisma.SortOrder
  accessAllBranch?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  modifiedAt?: Prisma.SortOrder
}

export type RoleMinOrderByAggregateInput = {
  id?: Prisma.SortOrder
  code?: Prisma.SortOrder
  name?: Prisma.SortOrder
  accessAllBranch?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  modifiedAt?: Prisma.SortOrder
}

export type RoleCreateNestedOneWithoutUsersInput = {
  create?: Prisma.XOR<Prisma.RoleCreateWithoutUsersInput, Prisma.RoleUncheckedCreateWithoutUsersInput>
  connectOrCreate?: Prisma.RoleCreateOrConnectWithoutUsersInput
  connect?: Prisma.RoleWhereUniqueInput
}

export type RoleUpdateOneRequiredWithoutUsersNestedInput = {
  create?: Prisma.XOR<Prisma.RoleCreateWithoutUsersInput, Prisma.RoleUncheckedCreateWithoutUsersInput>
  connectOrCreate?: Prisma.RoleCreateOrConnectWithoutUsersInput
  upsert?: Prisma.RoleUpsertWithoutUsersInput
  connect?: Prisma.RoleWhereUniqueInput
  update?: Prisma.XOR<Prisma.XOR<Prisma.RoleUpdateToOneWithWhereWithoutUsersInput, Prisma.RoleUpdateWithoutUsersInput>, Prisma.RoleUncheckedUpdateWithoutUsersInput>
}

export type BoolFieldUpdateOperationsInput = {
  set?: boolean
}

export type RoleCreateWithoutUsersInput = {
  id?: string
  code: string
  name: string
  accessAllBranch?: boolean
  createdAt?: Date | string
  modifiedAt?: Date | string
}

export type RoleUncheckedCreateWithoutUsersInput = {
  id?: string
  code: string
  name: string
  accessAllBranch?: boolean
  createdAt?: Date | string
  modifiedAt?: Date | string
}

export type RoleCreateOrConnectWithoutUsersInput = {
  where: Prisma.RoleWhereUniqueInput
  create: Prisma.XOR<Prisma.RoleCreateWithoutUsersInput, Prisma.RoleUncheckedCreateWithoutUsersInput>
}

export type RoleUpsertWithoutUsersInput = {
  update: Prisma.XOR<Prisma.RoleUpdateWithoutUsersInput, Prisma.RoleUncheckedUpdateWithoutUsersInput>
  create: Prisma.XOR<Prisma.RoleCreateWithoutUsersInput, Prisma.RoleUncheckedCreateWithoutUsersInput>
  where?: Prisma.RoleWhereInput
}

export type RoleUpdateToOneWithWhereWithoutUsersInput = {
  where?: Prisma.RoleWhereInput
  data: Prisma.XOR<Prisma.RoleUpdateWithoutUsersInput, Prisma.RoleUncheckedUpdateWithoutUsersInput>
}

export type RoleUpdateWithoutUsersInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  code?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  accessAllBranch?: Prisma.BoolFieldUpdateOperationsInput | boolean
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  modifiedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}

export type RoleUncheckedUpdateWithoutUsersInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  code?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  accessAllBranch?: Prisma.BoolFieldUpdateOperationsInput | boolean
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  modifiedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}


/**
 * Count Type RoleCountOutputType
 */

export type RoleCountOutputType = {
  users: number
}

export type RoleCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  users?: boolean | RoleCountOutputTypeCountUsersArgs
}

/**
 * RoleCountOutputType without action
 */
export type RoleCountOutputTypeDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the RoleCountOutputType
   */
  select?: Prisma.RoleCountOutputTypeSelect<ExtArgs> | null
}

/**
 * RoleCountOutputType without action
 */
export type RoleCountOutputTypeCountUsersArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.UserWhereInput
}


export type RoleSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  code?: boolean
  name?: boolean
  accessAllBranch?: boolean
  createdAt?: boolean
  modifiedAt?: boolean
  users?: boolean | Prisma.Role$usersArgs<ExtArgs>
  _count?: boolean | Prisma.RoleCountOutputTypeDefaultArgs<ExtArgs>
}, ExtArgs["result"]["role"]>

export type RoleSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  code?: boolean
  name?: boolean
  accessAllBranch?: boolean
  createdAt?: boolean
  modifiedAt?: boolean
}, ExtArgs["result"]["role"]>

export type RoleSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  code?: boolean
  name?: boolean
  accessAllBranch?: boolean
  createdAt?: boolean
  modifiedAt?: boolean
}, ExtArgs["result"]["role"]>

export type RoleSelectScalar = {
  id?: boolean
  code?: boolean
  name?: boolean
  accessAllBranch?: boolean
  createdAt?: boolean
  modifiedAt?: boolean
}

export type RoleOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "code" | "name" | "accessAllBranch" | "createdAt" | "modifiedAt", ExtArgs["result"]["role"]>
export type RoleInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  users?: boolean | Prisma.Role$usersArgs<ExtArgs>
  _count?: boolean | Prisma.RoleCountOutputTypeDefaultArgs<ExtArgs>
}
export type RoleIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {}
export type RoleIncludeUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {}

export type $RolePayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  name: "Role"
  objects: {
    users: Prisma.$UserPayload<ExtArgs>[]
  }
  scalars: runtime.Types.Extensions.GetPayloadResult<{
    id: string
    code: string
    name: string
    accessAllBranch: boolean
    createdAt: Date
    modifiedAt: Date
  }, ExtArgs["result"]["role"]>
  composites: {}
}

export type RoleGetPayload<S extends boolean | null | undefined | RoleDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$RolePayload, S>

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

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

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

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

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

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

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

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

  /**
   * Create many Roles and returns the data saved in the database.
   * @param {RoleCreateManyAndReturnArgs} args - Arguments to create many Roles.
   * @example
   * // Create many Roles
   * const role = await prisma.role.createManyAndReturn({
   *   data: [
   *     // ... provide data here
   *   ]
   * })
   * 
   * // Create many Roles and only return the `id`
   * const roleWithIdOnly = await prisma.role.createManyAndReturn({
   *   select: { id: true },
   *   data: [
   *     // ... provide data here
   *   ]
   * })
   * Note, that providing `undefined` is treated as the value not being there.
   * Read more here: https://pris.ly/d/null-undefined
   * 
   */
  createManyAndReturn<T extends RoleCreateManyAndReturnArgs>(args?: Prisma.SelectSubset<T, RoleCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$RolePayload<ExtArgs>, T, "createManyAndReturn", GlobalOmitOptions>>

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

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

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

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

  /**
   * Update zero or more Roles and returns the data updated in the database.
   * @param {RoleUpdateManyAndReturnArgs} args - Arguments to update many Roles.
   * @example
   * // Update many Roles
   * const role = await prisma.role.updateManyAndReturn({
   *   where: {
   *     // ... provide filter here
   *   },
   *   data: [
   *     // ... provide data here
   *   ]
   * })
   * 
   * // Update zero or more Roles and only return the `id`
   * const roleWithIdOnly = await prisma.role.updateManyAndReturn({
   *   select: { id: true },
   *   where: {
   *     // ... provide filter here
   *   },
   *   data: [
   *     // ... provide data here
   *   ]
   * })
   * Note, that providing `undefined` is treated as the value not being there.
   * Read more here: https://pris.ly/d/null-undefined
   * 
   */
  updateManyAndReturn<T extends RoleUpdateManyAndReturnArgs>(args: Prisma.SelectSubset<T, RoleUpdateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$RolePayload<ExtArgs>, T, "updateManyAndReturn", GlobalOmitOptions>>

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


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

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

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

/**
 * The delegate class that acts as a "Promise-like" for Role.
 * 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__RoleClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
  readonly [Symbol.toStringTag]: "PrismaPromise"
  users<T extends Prisma.Role$usersArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Role$usersArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
  /**
   * 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 Role model
 */
export interface RoleFieldRefs {
  readonly id: Prisma.FieldRef<"Role", 'String'>
  readonly code: Prisma.FieldRef<"Role", 'String'>
  readonly name: Prisma.FieldRef<"Role", 'String'>
  readonly accessAllBranch: Prisma.FieldRef<"Role", 'Boolean'>
  readonly createdAt: Prisma.FieldRef<"Role", 'DateTime'>
  readonly modifiedAt: Prisma.FieldRef<"Role", 'DateTime'>
}
    

// Custom InputTypes
/**
 * Role findUnique
 */
export type RoleFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Role
   */
  select?: Prisma.RoleSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Role
   */
  omit?: Prisma.RoleOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.RoleInclude<ExtArgs> | null
  /**
   * Filter, which Role to fetch.
   */
  where: Prisma.RoleWhereUniqueInput
}

/**
 * Role findUniqueOrThrow
 */
export type RoleFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Role
   */
  select?: Prisma.RoleSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Role
   */
  omit?: Prisma.RoleOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.RoleInclude<ExtArgs> | null
  /**
   * Filter, which Role to fetch.
   */
  where: Prisma.RoleWhereUniqueInput
}

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

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

/**
 * Role findMany
 */
export type RoleFindManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Role
   */
  select?: Prisma.RoleSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Role
   */
  omit?: Prisma.RoleOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.RoleInclude<ExtArgs> | null
  /**
   * Filter, which Roles to fetch.
   */
  where?: Prisma.RoleWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of Roles to fetch.
   */
  orderBy?: Prisma.RoleOrderByWithRelationInput | Prisma.RoleOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the position for listing Roles.
   */
  cursor?: Prisma.RoleWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Take `±n` Roles 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` Roles.
   */
  skip?: number
  distinct?: Prisma.RoleScalarFieldEnum | Prisma.RoleScalarFieldEnum[]
}

/**
 * Role create
 */
export type RoleCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Role
   */
  select?: Prisma.RoleSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Role
   */
  omit?: Prisma.RoleOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.RoleInclude<ExtArgs> | null
  /**
   * The data needed to create a Role.
   */
  data: Prisma.XOR<Prisma.RoleCreateInput, Prisma.RoleUncheckedCreateInput>
}

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

/**
 * Role createManyAndReturn
 */
export type RoleCreateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Role
   */
  select?: Prisma.RoleSelectCreateManyAndReturn<ExtArgs> | null
  /**
   * Omit specific fields from the Role
   */
  omit?: Prisma.RoleOmit<ExtArgs> | null
  /**
   * The data used to create many Roles.
   */
  data: Prisma.RoleCreateManyInput | Prisma.RoleCreateManyInput[]
  skipDuplicates?: boolean
}

/**
 * Role update
 */
export type RoleUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Role
   */
  select?: Prisma.RoleSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Role
   */
  omit?: Prisma.RoleOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.RoleInclude<ExtArgs> | null
  /**
   * The data needed to update a Role.
   */
  data: Prisma.XOR<Prisma.RoleUpdateInput, Prisma.RoleUncheckedUpdateInput>
  /**
   * Choose, which Role to update.
   */
  where: Prisma.RoleWhereUniqueInput
}

/**
 * Role updateMany
 */
export type RoleUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * The data used to update Roles.
   */
  data: Prisma.XOR<Prisma.RoleUpdateManyMutationInput, Prisma.RoleUncheckedUpdateManyInput>
  /**
   * Filter which Roles to update
   */
  where?: Prisma.RoleWhereInput
  /**
   * Limit how many Roles to update.
   */
  limit?: number
}

/**
 * Role updateManyAndReturn
 */
export type RoleUpdateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Role
   */
  select?: Prisma.RoleSelectUpdateManyAndReturn<ExtArgs> | null
  /**
   * Omit specific fields from the Role
   */
  omit?: Prisma.RoleOmit<ExtArgs> | null
  /**
   * The data used to update Roles.
   */
  data: Prisma.XOR<Prisma.RoleUpdateManyMutationInput, Prisma.RoleUncheckedUpdateManyInput>
  /**
   * Filter which Roles to update
   */
  where?: Prisma.RoleWhereInput
  /**
   * Limit how many Roles to update.
   */
  limit?: number
}

/**
 * Role upsert
 */
export type RoleUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Role
   */
  select?: Prisma.RoleSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Role
   */
  omit?: Prisma.RoleOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.RoleInclude<ExtArgs> | null
  /**
   * The filter to search for the Role to update in case it exists.
   */
  where: Prisma.RoleWhereUniqueInput
  /**
   * In case the Role found by the `where` argument doesn't exist, create a new Role with this data.
   */
  create: Prisma.XOR<Prisma.RoleCreateInput, Prisma.RoleUncheckedCreateInput>
  /**
   * In case the Role was found with the provided `where` argument, update it with this data.
   */
  update: Prisma.XOR<Prisma.RoleUpdateInput, Prisma.RoleUncheckedUpdateInput>
}

/**
 * Role delete
 */
export type RoleDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Role
   */
  select?: Prisma.RoleSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Role
   */
  omit?: Prisma.RoleOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.RoleInclude<ExtArgs> | null
  /**
   * Filter which Role to delete.
   */
  where: Prisma.RoleWhereUniqueInput
}

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

/**
 * Role.users
 */
export type Role$usersArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the User
   */
  select?: Prisma.UserSelect<ExtArgs> | null
  /**
   * Omit specific fields from the User
   */
  omit?: Prisma.UserOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.UserInclude<ExtArgs> | null
  where?: Prisma.UserWhereInput
  orderBy?: Prisma.UserOrderByWithRelationInput | Prisma.UserOrderByWithRelationInput[]
  cursor?: Prisma.UserWhereUniqueInput
  take?: number
  skip?: number
  distinct?: Prisma.UserScalarFieldEnum | Prisma.UserScalarFieldEnum[]
}

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