
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
/* eslint-disable */
// biome-ignore-all lint: generated file
// @ts-nocheck 
/*
 * This file exports the `companies` 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.js"
import type * as Prisma from "../internal/prismaNamespace.js"

/**
 * Model companies
 * 
 */
export type companiesModel = runtime.Types.Result.DefaultSelection<Prisma.$companiesPayload>

export type AggregateCompanies = {
  _count: CompaniesCountAggregateOutputType | null
  _avg: CompaniesAvgAggregateOutputType | null
  _sum: CompaniesSumAggregateOutputType | null
  _min: CompaniesMinAggregateOutputType | null
  _max: CompaniesMaxAggregateOutputType | null
}

export type CompaniesAvgAggregateOutputType = {
  cost_per_km: runtime.Decimal | null
}

export type CompaniesSumAggregateOutputType = {
  cost_per_km: runtime.Decimal | null
}

export type CompaniesMinAggregateOutputType = {
  id: string | null
  name: string | null
  cost_per_km: runtime.Decimal | null
  notes: string | null
  createdAt: Date | null
  updatedAt: Date | null
}

export type CompaniesMaxAggregateOutputType = {
  id: string | null
  name: string | null
  cost_per_km: runtime.Decimal | null
  notes: string | null
  createdAt: Date | null
  updatedAt: Date | null
}

export type CompaniesCountAggregateOutputType = {
  id: number
  name: number
  cost_per_km: number
  notes: number
  createdAt: number
  updatedAt: number
  _all: number
}


export type CompaniesAvgAggregateInputType = {
  cost_per_km?: true
}

export type CompaniesSumAggregateInputType = {
  cost_per_km?: true
}

export type CompaniesMinAggregateInputType = {
  id?: true
  name?: true
  cost_per_km?: true
  notes?: true
  createdAt?: true
  updatedAt?: true
}

export type CompaniesMaxAggregateInputType = {
  id?: true
  name?: true
  cost_per_km?: true
  notes?: true
  createdAt?: true
  updatedAt?: true
}

export type CompaniesCountAggregateInputType = {
  id?: true
  name?: true
  cost_per_km?: true
  notes?: true
  createdAt?: true
  updatedAt?: true
  _all?: true
}

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

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




export type companiesGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.companiesWhereInput
  orderBy?: Prisma.companiesOrderByWithAggregationInput | Prisma.companiesOrderByWithAggregationInput[]
  by: Prisma.CompaniesScalarFieldEnum[] | Prisma.CompaniesScalarFieldEnum
  having?: Prisma.companiesScalarWhereWithAggregatesInput
  take?: number
  skip?: number
  _count?: CompaniesCountAggregateInputType | true
  _avg?: CompaniesAvgAggregateInputType
  _sum?: CompaniesSumAggregateInputType
  _min?: CompaniesMinAggregateInputType
  _max?: CompaniesMaxAggregateInputType
}

export type CompaniesGroupByOutputType = {
  id: string
  name: string
  cost_per_km: runtime.Decimal
  notes: string | null
  createdAt: Date | null
  updatedAt: Date | null
  _count: CompaniesCountAggregateOutputType | null
  _avg: CompaniesAvgAggregateOutputType | null
  _sum: CompaniesSumAggregateOutputType | null
  _min: CompaniesMinAggregateOutputType | null
  _max: CompaniesMaxAggregateOutputType | null
}

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



export type companiesWhereInput = {
  AND?: Prisma.companiesWhereInput | Prisma.companiesWhereInput[]
  OR?: Prisma.companiesWhereInput[]
  NOT?: Prisma.companiesWhereInput | Prisma.companiesWhereInput[]
  id?: Prisma.StringFilter<"companies"> | string
  name?: Prisma.StringFilter<"companies"> | string
  cost_per_km?: Prisma.DecimalFilter<"companies"> | runtime.Decimal | runtime.DecimalJsLike | number | string
  notes?: Prisma.StringNullableFilter<"companies"> | string | null
  createdAt?: Prisma.DateTimeNullableFilter<"companies"> | Date | string | null
  updatedAt?: Prisma.DateTimeNullableFilter<"companies"> | Date | string | null
}

export type companiesOrderByWithRelationInput = {
  id?: Prisma.SortOrder
  name?: Prisma.SortOrder
  cost_per_km?: Prisma.SortOrder
  notes?: Prisma.SortOrderInput | Prisma.SortOrder
  createdAt?: Prisma.SortOrderInput | Prisma.SortOrder
  updatedAt?: Prisma.SortOrderInput | Prisma.SortOrder
}

export type companiesWhereUniqueInput = Prisma.AtLeast<{
  id?: string
  AND?: Prisma.companiesWhereInput | Prisma.companiesWhereInput[]
  OR?: Prisma.companiesWhereInput[]
  NOT?: Prisma.companiesWhereInput | Prisma.companiesWhereInput[]
  name?: Prisma.StringFilter<"companies"> | string
  cost_per_km?: Prisma.DecimalFilter<"companies"> | runtime.Decimal | runtime.DecimalJsLike | number | string
  notes?: Prisma.StringNullableFilter<"companies"> | string | null
  createdAt?: Prisma.DateTimeNullableFilter<"companies"> | Date | string | null
  updatedAt?: Prisma.DateTimeNullableFilter<"companies"> | Date | string | null
}, "id">

export type companiesOrderByWithAggregationInput = {
  id?: Prisma.SortOrder
  name?: Prisma.SortOrder
  cost_per_km?: Prisma.SortOrder
  notes?: Prisma.SortOrderInput | Prisma.SortOrder
  createdAt?: Prisma.SortOrderInput | Prisma.SortOrder
  updatedAt?: Prisma.SortOrderInput | Prisma.SortOrder
  _count?: Prisma.companiesCountOrderByAggregateInput
  _avg?: Prisma.companiesAvgOrderByAggregateInput
  _max?: Prisma.companiesMaxOrderByAggregateInput
  _min?: Prisma.companiesMinOrderByAggregateInput
  _sum?: Prisma.companiesSumOrderByAggregateInput
}

export type companiesScalarWhereWithAggregatesInput = {
  AND?: Prisma.companiesScalarWhereWithAggregatesInput | Prisma.companiesScalarWhereWithAggregatesInput[]
  OR?: Prisma.companiesScalarWhereWithAggregatesInput[]
  NOT?: Prisma.companiesScalarWhereWithAggregatesInput | Prisma.companiesScalarWhereWithAggregatesInput[]
  id?: Prisma.StringWithAggregatesFilter<"companies"> | string
  name?: Prisma.StringWithAggregatesFilter<"companies"> | string
  cost_per_km?: Prisma.DecimalWithAggregatesFilter<"companies"> | runtime.Decimal | runtime.DecimalJsLike | number | string
  notes?: Prisma.StringNullableWithAggregatesFilter<"companies"> | string | null
  createdAt?: Prisma.DateTimeNullableWithAggregatesFilter<"companies"> | Date | string | null
  updatedAt?: Prisma.DateTimeNullableWithAggregatesFilter<"companies"> | Date | string | null
}

export type companiesCreateInput = {
  id: string
  name: string
  cost_per_km: runtime.Decimal | runtime.DecimalJsLike | number | string
  notes?: string | null
  createdAt?: Date | string | null
  updatedAt?: Date | string | null
}

export type companiesUncheckedCreateInput = {
  id: string
  name: string
  cost_per_km: runtime.Decimal | runtime.DecimalJsLike | number | string
  notes?: string | null
  createdAt?: Date | string | null
  updatedAt?: Date | string | null
}

export type companiesUpdateInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  cost_per_km?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  updatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
}

export type companiesUncheckedUpdateInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  cost_per_km?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  updatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
}

export type companiesCreateManyInput = {
  id: string
  name: string
  cost_per_km: runtime.Decimal | runtime.DecimalJsLike | number | string
  notes?: string | null
  createdAt?: Date | string | null
  updatedAt?: Date | string | null
}

export type companiesUpdateManyMutationInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  cost_per_km?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  updatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
}

export type companiesUncheckedUpdateManyInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  cost_per_km?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  updatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
}

export type companiesCountOrderByAggregateInput = {
  id?: Prisma.SortOrder
  name?: Prisma.SortOrder
  cost_per_km?: Prisma.SortOrder
  notes?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  updatedAt?: Prisma.SortOrder
}

export type companiesAvgOrderByAggregateInput = {
  cost_per_km?: Prisma.SortOrder
}

export type companiesMaxOrderByAggregateInput = {
  id?: Prisma.SortOrder
  name?: Prisma.SortOrder
  cost_per_km?: Prisma.SortOrder
  notes?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  updatedAt?: Prisma.SortOrder
}

export type companiesMinOrderByAggregateInput = {
  id?: Prisma.SortOrder
  name?: Prisma.SortOrder
  cost_per_km?: Prisma.SortOrder
  notes?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  updatedAt?: Prisma.SortOrder
}

export type companiesSumOrderByAggregateInput = {
  cost_per_km?: Prisma.SortOrder
}

export type DecimalFieldUpdateOperationsInput = {
  set?: runtime.Decimal | runtime.DecimalJsLike | number | string
  increment?: runtime.Decimal | runtime.DecimalJsLike | number | string
  decrement?: runtime.Decimal | runtime.DecimalJsLike | number | string
  multiply?: runtime.Decimal | runtime.DecimalJsLike | number | string
  divide?: runtime.Decimal | runtime.DecimalJsLike | number | string
}

export type NullableDateTimeFieldUpdateOperationsInput = {
  set?: Date | string | null
}



export type companiesSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  name?: boolean
  cost_per_km?: boolean
  notes?: boolean
  createdAt?: boolean
  updatedAt?: boolean
}, ExtArgs["result"]["companies"]>

export type companiesSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  name?: boolean
  cost_per_km?: boolean
  notes?: boolean
  createdAt?: boolean
  updatedAt?: boolean
}, ExtArgs["result"]["companies"]>

export type companiesSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  name?: boolean
  cost_per_km?: boolean
  notes?: boolean
  createdAt?: boolean
  updatedAt?: boolean
}, ExtArgs["result"]["companies"]>

export type companiesSelectScalar = {
  id?: boolean
  name?: boolean
  cost_per_km?: boolean
  notes?: boolean
  createdAt?: boolean
  updatedAt?: boolean
}

export type companiesOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "name" | "cost_per_km" | "notes" | "createdAt" | "updatedAt", ExtArgs["result"]["companies"]>

export type $companiesPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  name: "companies"
  objects: {}
  scalars: runtime.Types.Extensions.GetPayloadResult<{
    id: string
    name: string
    cost_per_km: runtime.Decimal
    notes: string | null
    createdAt: Date | null
    updatedAt: Date | null
  }, ExtArgs["result"]["companies"]>
  composites: {}
}

export type companiesGetPayload<S extends boolean | null | undefined | companiesDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$companiesPayload, S>

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

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

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

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

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

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

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

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

  /**
   * Create many Companies and returns the data saved in the database.
   * @param {companiesCreateManyAndReturnArgs} args - Arguments to create many Companies.
   * @example
   * // Create many Companies
   * const companies = await prisma.companies.createManyAndReturn({
   *   data: [
   *     // ... provide data here
   *   ]
   * })
   * 
   * // Create many Companies and only return the `id`
   * const companiesWithIdOnly = await prisma.companies.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 companiesCreateManyAndReturnArgs>(args?: Prisma.SelectSubset<T, companiesCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$companiesPayload<ExtArgs>, T, "createManyAndReturn", GlobalOmitOptions>>

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

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

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

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

  /**
   * Update zero or more Companies and returns the data updated in the database.
   * @param {companiesUpdateManyAndReturnArgs} args - Arguments to update many Companies.
   * @example
   * // Update many Companies
   * const companies = await prisma.companies.updateManyAndReturn({
   *   where: {
   *     // ... provide filter here
   *   },
   *   data: [
   *     // ... provide data here
   *   ]
   * })
   * 
   * // Update zero or more Companies and only return the `id`
   * const companiesWithIdOnly = await prisma.companies.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 companiesUpdateManyAndReturnArgs>(args: Prisma.SelectSubset<T, companiesUpdateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$companiesPayload<ExtArgs>, T, "updateManyAndReturn", GlobalOmitOptions>>

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


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

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

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

/**
 * The delegate class that acts as a "Promise-like" for companies.
 * 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__companiesClient<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 companies model
 */
export interface companiesFieldRefs {
  readonly id: Prisma.FieldRef<"companies", 'String'>
  readonly name: Prisma.FieldRef<"companies", 'String'>
  readonly cost_per_km: Prisma.FieldRef<"companies", 'Decimal'>
  readonly notes: Prisma.FieldRef<"companies", 'String'>
  readonly createdAt: Prisma.FieldRef<"companies", 'DateTime'>
  readonly updatedAt: Prisma.FieldRef<"companies", 'DateTime'>
}
    

// Custom InputTypes
/**
 * companies findUnique
 */
export type companiesFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the companies
   */
  select?: Prisma.companiesSelect<ExtArgs> | null
  /**
   * Omit specific fields from the companies
   */
  omit?: Prisma.companiesOmit<ExtArgs> | null
  /**
   * Filter, which companies to fetch.
   */
  where: Prisma.companiesWhereUniqueInput
}

/**
 * companies findUniqueOrThrow
 */
export type companiesFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the companies
   */
  select?: Prisma.companiesSelect<ExtArgs> | null
  /**
   * Omit specific fields from the companies
   */
  omit?: Prisma.companiesOmit<ExtArgs> | null
  /**
   * Filter, which companies to fetch.
   */
  where: Prisma.companiesWhereUniqueInput
}

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

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

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

/**
 * companies create
 */
export type companiesCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the companies
   */
  select?: Prisma.companiesSelect<ExtArgs> | null
  /**
   * Omit specific fields from the companies
   */
  omit?: Prisma.companiesOmit<ExtArgs> | null
  /**
   * The data needed to create a companies.
   */
  data: Prisma.XOR<Prisma.companiesCreateInput, Prisma.companiesUncheckedCreateInput>
}

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

/**
 * companies createManyAndReturn
 */
export type companiesCreateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the companies
   */
  select?: Prisma.companiesSelectCreateManyAndReturn<ExtArgs> | null
  /**
   * Omit specific fields from the companies
   */
  omit?: Prisma.companiesOmit<ExtArgs> | null
  /**
   * The data used to create many companies.
   */
  data: Prisma.companiesCreateManyInput | Prisma.companiesCreateManyInput[]
  skipDuplicates?: boolean
}

/**
 * companies update
 */
export type companiesUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the companies
   */
  select?: Prisma.companiesSelect<ExtArgs> | null
  /**
   * Omit specific fields from the companies
   */
  omit?: Prisma.companiesOmit<ExtArgs> | null
  /**
   * The data needed to update a companies.
   */
  data: Prisma.XOR<Prisma.companiesUpdateInput, Prisma.companiesUncheckedUpdateInput>
  /**
   * Choose, which companies to update.
   */
  where: Prisma.companiesWhereUniqueInput
}

/**
 * companies updateMany
 */
export type companiesUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * The data used to update companies.
   */
  data: Prisma.XOR<Prisma.companiesUpdateManyMutationInput, Prisma.companiesUncheckedUpdateManyInput>
  /**
   * Filter which companies to update
   */
  where?: Prisma.companiesWhereInput
  /**
   * Limit how many companies to update.
   */
  limit?: number
}

/**
 * companies updateManyAndReturn
 */
export type companiesUpdateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the companies
   */
  select?: Prisma.companiesSelectUpdateManyAndReturn<ExtArgs> | null
  /**
   * Omit specific fields from the companies
   */
  omit?: Prisma.companiesOmit<ExtArgs> | null
  /**
   * The data used to update companies.
   */
  data: Prisma.XOR<Prisma.companiesUpdateManyMutationInput, Prisma.companiesUncheckedUpdateManyInput>
  /**
   * Filter which companies to update
   */
  where?: Prisma.companiesWhereInput
  /**
   * Limit how many companies to update.
   */
  limit?: number
}

/**
 * companies upsert
 */
export type companiesUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the companies
   */
  select?: Prisma.companiesSelect<ExtArgs> | null
  /**
   * Omit specific fields from the companies
   */
  omit?: Prisma.companiesOmit<ExtArgs> | null
  /**
   * The filter to search for the companies to update in case it exists.
   */
  where: Prisma.companiesWhereUniqueInput
  /**
   * In case the companies found by the `where` argument doesn't exist, create a new companies with this data.
   */
  create: Prisma.XOR<Prisma.companiesCreateInput, Prisma.companiesUncheckedCreateInput>
  /**
   * In case the companies was found with the provided `where` argument, update it with this data.
   */
  update: Prisma.XOR<Prisma.companiesUpdateInput, Prisma.companiesUncheckedUpdateInput>
}

/**
 * companies delete
 */
export type companiesDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the companies
   */
  select?: Prisma.companiesSelect<ExtArgs> | null
  /**
   * Omit specific fields from the companies
   */
  omit?: Prisma.companiesOmit<ExtArgs> | null
  /**
   * Filter which companies to delete.
   */
  where: Prisma.companiesWhereUniqueInput
}

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

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