
/**
 * Client
**/

import * as runtime from './runtime/library.js';
import $Types = runtime.Types // general types
import $Public = runtime.Types.Public
import $Utils = runtime.Types.Utils
import $Extensions = runtime.Types.Extensions
import $Result = runtime.Types.Result

export type PrismaPromise<T> = $Public.PrismaPromise<T>


/**
 * Model Intervento
 * 
 */
export type Intervento = $Result.DefaultSelection<Prisma.$InterventoPayload>
/**
 * Model Registratore
 * 
 */
export type Registratore = $Result.DefaultSelection<Prisma.$RegistratorePayload>
/**
 * Model Cliente
 * 
 */
export type Cliente = $Result.DefaultSelection<Prisma.$ClientePayload>

/**
 * Enums
 */
export namespace $Enums {
  export const Modello: {
  FORM100: 'FORM100',
  FORM200: 'FORM200',
  FORM200PLUS: 'FORM200PLUS',
  FORM500: 'FORM500'
};

export type Modello = (typeof Modello)[keyof typeof Modello]

}

export type Modello = $Enums.Modello

export const Modello: typeof $Enums.Modello

/**
 * ##  Prisma Client ʲˢ
 *
 * Type-safe database client for TypeScript & Node.js
 * @example
 * ```
 * const prisma = new PrismaClient()
 * // Fetch zero or more Interventos
 * const interventos = await prisma.intervento.findMany()
 * ```
 *
 *
 * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client).
 */
export class PrismaClient<
  ClientOptions extends Prisma.PrismaClientOptions = Prisma.PrismaClientOptions,
  const U = 'log' extends keyof ClientOptions ? ClientOptions['log'] extends Array<Prisma.LogLevel | Prisma.LogDefinition> ? Prisma.GetEvents<ClientOptions['log']> : never : never,
  ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs
> {
  [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['other'] }

    /**
   * ##  Prisma Client ʲˢ
   *
   * Type-safe database client for TypeScript & Node.js
   * @example
   * ```
   * const prisma = new PrismaClient()
   * // Fetch zero or more Interventos
   * const interventos = await prisma.intervento.findMany()
   * ```
   *
   *
   * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client).
   */

  constructor(optionsArg ?: Prisma.Subset<ClientOptions, Prisma.PrismaClientOptions>);
  $on<V extends U>(eventType: V, callback: (event: V extends 'query' ? Prisma.QueryEvent : Prisma.LogEvent) => void): PrismaClient;

  /**
   * Connect with the database
   */
  $connect(): $Utils.JsPromise<void>;

  /**
   * Disconnect from the database
   */
  $disconnect(): $Utils.JsPromise<void>;

/**
   * Executes a prepared raw query and returns the number of affected rows.
   * @example
   * ```
   * const result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`
   * ```
   *
   * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
   */
  $executeRaw<T = unknown>(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise<number>;

  /**
   * Executes a raw query and returns the number of affected rows.
   * Susceptible to SQL injections, see documentation.
   * @example
   * ```
   * const result = await prisma.$executeRawUnsafe('UPDATE User SET cool = $1 WHERE email = $2 ;', true, 'user@email.com')
   * ```
   *
   * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
   */
  $executeRawUnsafe<T = unknown>(query: string, ...values: any[]): Prisma.PrismaPromise<number>;

  /**
   * Performs a prepared raw query and returns the `SELECT` data.
   * @example
   * ```
   * const result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`
   * ```
   *
   * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
   */
  $queryRaw<T = unknown>(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise<T>;

  /**
   * Performs a raw query and returns the `SELECT` data.
   * Susceptible to SQL injections, see documentation.
   * @example
   * ```
   * const result = await prisma.$queryRawUnsafe('SELECT * FROM User WHERE id = $1 OR email = $2;', 1, 'user@email.com')
   * ```
   *
   * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
   */
  $queryRawUnsafe<T = unknown>(query: string, ...values: any[]): Prisma.PrismaPromise<T>;


  /**
   * Allows the running of a sequence of read/write operations that are guaranteed to either succeed or fail as a whole.
   * @example
   * ```
   * const [george, bob, alice] = await prisma.$transaction([
   *   prisma.user.create({ data: { name: 'George' } }),
   *   prisma.user.create({ data: { name: 'Bob' } }),
   *   prisma.user.create({ data: { name: 'Alice' } }),
   * ])
   * ```
   * 
   * Read more in our [docs](https://www.prisma.io/docs/concepts/components/prisma-client/transactions).
   */
  $transaction<P extends Prisma.PrismaPromise<any>[]>(arg: [...P], options?: { isolationLevel?: Prisma.TransactionIsolationLevel }): $Utils.JsPromise<runtime.Types.Utils.UnwrapTuple<P>>

  $transaction<R>(fn: (prisma: Omit<PrismaClient, runtime.ITXClientDenyList>) => $Utils.JsPromise<R>, options?: { maxWait?: number, timeout?: number, isolationLevel?: Prisma.TransactionIsolationLevel }): $Utils.JsPromise<R>


  $extends: $Extensions.ExtendsHook<"extends", Prisma.TypeMapCb<ClientOptions>, ExtArgs, $Utils.Call<Prisma.TypeMapCb<ClientOptions>, {
    extArgs: ExtArgs
  }>>

      /**
   * `prisma.intervento`: Exposes CRUD operations for the **Intervento** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more Interventos
    * const interventos = await prisma.intervento.findMany()
    * ```
    */
  get intervento(): Prisma.InterventoDelegate<ExtArgs, ClientOptions>;

  /**
   * `prisma.registratore`: Exposes CRUD operations for the **Registratore** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more Registratores
    * const registratores = await prisma.registratore.findMany()
    * ```
    */
  get registratore(): Prisma.RegistratoreDelegate<ExtArgs, ClientOptions>;

  /**
   * `prisma.cliente`: Exposes CRUD operations for the **Cliente** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more Clientes
    * const clientes = await prisma.cliente.findMany()
    * ```
    */
  get cliente(): Prisma.ClienteDelegate<ExtArgs, ClientOptions>;
}

export namespace Prisma {
  export import DMMF = runtime.DMMF

  export type PrismaPromise<T> = $Public.PrismaPromise<T>

  /**
   * Validator
   */
  export import validator = runtime.Public.validator

  /**
   * Prisma Errors
   */
  export import PrismaClientKnownRequestError = runtime.PrismaClientKnownRequestError
  export import PrismaClientUnknownRequestError = runtime.PrismaClientUnknownRequestError
  export import PrismaClientRustPanicError = runtime.PrismaClientRustPanicError
  export import PrismaClientInitializationError = runtime.PrismaClientInitializationError
  export import PrismaClientValidationError = runtime.PrismaClientValidationError

  /**
   * Re-export of sql-template-tag
   */
  export import sql = runtime.sqltag
  export import empty = runtime.empty
  export import join = runtime.join
  export import raw = runtime.raw
  export import Sql = runtime.Sql



  /**
   * Decimal.js
   */
  export import Decimal = runtime.Decimal

  export type DecimalJsLike = runtime.DecimalJsLike

  /**
   * Metrics
   */
  export type Metrics = runtime.Metrics
  export type Metric<T> = runtime.Metric<T>
  export type MetricHistogram = runtime.MetricHistogram
  export type MetricHistogramBucket = runtime.MetricHistogramBucket

  /**
  * Extensions
  */
  export import Extension = $Extensions.UserArgs
  export import getExtensionContext = runtime.Extensions.getExtensionContext
  export import Args = $Public.Args
  export import Payload = $Public.Payload
  export import Result = $Public.Result
  export import Exact = $Public.Exact

  /**
   * Prisma Client JS version: 6.18.0
   * Query Engine version: 34b5a692b7bd79939a9a2c3ef97d816e749cda2f
   */
  export type PrismaVersion = {
    client: string
  }

  export const prismaVersion: PrismaVersion

  /**
   * Utility Types
   */


  export import Bytes = runtime.Bytes
  export import JsonObject = runtime.JsonObject
  export import JsonArray = runtime.JsonArray
  export import JsonValue = runtime.JsonValue
  export import InputJsonObject = runtime.InputJsonObject
  export import InputJsonArray = runtime.InputJsonArray
  export import InputJsonValue = runtime.InputJsonValue

  /**
   * Types of the values used to represent different kinds of `null` values when working with JSON fields.
   *
   * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
   */
  namespace NullTypes {
    /**
    * Type of `Prisma.DbNull`.
    *
    * You cannot use other instances of this class. Please use the `Prisma.DbNull` value.
    *
    * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
    */
    class DbNull {
      private DbNull: never
      private constructor()
    }

    /**
    * Type of `Prisma.JsonNull`.
    *
    * You cannot use other instances of this class. Please use the `Prisma.JsonNull` value.
    *
    * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
    */
    class JsonNull {
      private JsonNull: never
      private constructor()
    }

    /**
    * Type of `Prisma.AnyNull`.
    *
    * You cannot use other instances of this class. Please use the `Prisma.AnyNull` value.
    *
    * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
    */
    class AnyNull {
      private AnyNull: never
      private constructor()
    }
  }

  /**
   * Helper for filtering JSON entries that have `null` on the database (empty on the db)
   *
   * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
   */
  export const DbNull: NullTypes.DbNull

  /**
   * Helper for filtering JSON entries that have JSON `null` values (not empty on the db)
   *
   * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
   */
  export const JsonNull: NullTypes.JsonNull

  /**
   * Helper for filtering JSON entries that are `Prisma.DbNull` or `Prisma.JsonNull`
   *
   * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
   */
  export const AnyNull: NullTypes.AnyNull

  type SelectAndInclude = {
    select: any
    include: any
  }

  type SelectAndOmit = {
    select: any
    omit: any
  }

  /**
   * Get the type of the value, that the Promise holds.
   */
  export type PromiseType<T extends PromiseLike<any>> = T extends PromiseLike<infer U> ? U : T;

  /**
   * Get the return type of a function which returns a Promise.
   */
  export type PromiseReturnType<T extends (...args: any) => $Utils.JsPromise<any>> = PromiseType<ReturnType<T>>

  /**
   * From T, pick a set of properties whose keys are in the union K
   */
  type Prisma__Pick<T, K extends keyof T> = {
      [P in K]: T[P];
  };


  export type Enumerable<T> = T | Array<T>;

  export type RequiredKeys<T> = {
    [K in keyof T]-?: {} extends Prisma__Pick<T, K> ? never : K
  }[keyof T]

  export type TruthyKeys<T> = keyof {
    [K in keyof T as T[K] extends false | undefined | null ? never : K]: K
  }

  export type TrueKeys<T> = TruthyKeys<Prisma__Pick<T, RequiredKeys<T>>>

  /**
   * Subset
   * @desc From `T` pick properties that exist in `U`. Simple version of Intersection
   */
  export type Subset<T, U> = {
    [key in keyof T]: key extends keyof U ? T[key] : never;
  };

  /**
   * SelectSubset
   * @desc From `T` pick properties that exist in `U`. Simple version of Intersection.
   * Additionally, it validates, if both select and include are present. If the case, it errors.
   */
  export type SelectSubset<T, U> = {
    [key in keyof T]: key extends keyof U ? T[key] : never
  } &
    (T extends SelectAndInclude
      ? 'Please either choose `select` or `include`.'
      : T extends SelectAndOmit
        ? 'Please either choose `select` or `omit`.'
        : {})

  /**
   * Subset + Intersection
   * @desc From `T` pick properties that exist in `U` and intersect `K`
   */
  export type SubsetIntersection<T, U, K> = {
    [key in keyof T]: key extends keyof U ? T[key] : never
  } &
    K

  type Without<T, U> = { [P in Exclude<keyof T, keyof U>]?: never };

  /**
   * XOR is needed to have a real mutually exclusive union type
   * https://stackoverflow.com/questions/42123407/does-typescript-support-mutually-exclusive-types
   */
  type XOR<T, U> =
    T extends object ?
    U extends object ?
      (Without<T, U> & U) | (Without<U, T> & T)
    : U : T


  /**
   * Is T a Record?
   */
  type IsObject<T extends any> = T extends Array<any>
  ? False
  : T extends Date
  ? False
  : T extends Uint8Array
  ? False
  : T extends BigInt
  ? False
  : T extends object
  ? True
  : False


  /**
   * If it's T[], return T
   */
  export type UnEnumerate<T extends unknown> = T extends Array<infer U> ? U : T

  /**
   * From ts-toolbelt
   */

  type __Either<O extends object, K extends Key> = Omit<O, K> &
    {
      // Merge all but K
      [P in K]: Prisma__Pick<O, P & keyof O> // With K possibilities
    }[K]

  type EitherStrict<O extends object, K extends Key> = Strict<__Either<O, K>>

  type EitherLoose<O extends object, K extends Key> = ComputeRaw<__Either<O, K>>

  type _Either<
    O extends object,
    K extends Key,
    strict extends Boolean
  > = {
    1: EitherStrict<O, K>
    0: EitherLoose<O, K>
  }[strict]

  type Either<
    O extends object,
    K extends Key,
    strict extends Boolean = 1
  > = O extends unknown ? _Either<O, K, strict> : never

  export type Union = any

  type PatchUndefined<O extends object, O1 extends object> = {
    [K in keyof O]: O[K] extends undefined ? At<O1, K> : O[K]
  } & {}

  /** Helper Types for "Merge" **/
  export type IntersectOf<U extends Union> = (
    U extends unknown ? (k: U) => void : never
  ) extends (k: infer I) => void
    ? I
    : never

  export type Overwrite<O extends object, O1 extends object> = {
      [K in keyof O]: K extends keyof O1 ? O1[K] : O[K];
  } & {};

  type _Merge<U extends object> = IntersectOf<Overwrite<U, {
      [K in keyof U]-?: At<U, K>;
  }>>;

  type Key = string | number | symbol;
  type AtBasic<O extends object, K extends Key> = K extends keyof O ? O[K] : never;
  type AtStrict<O extends object, K extends Key> = O[K & keyof O];
  type AtLoose<O extends object, K extends Key> = O extends unknown ? AtStrict<O, K> : never;
  export type At<O extends object, K extends Key, strict extends Boolean = 1> = {
      1: AtStrict<O, K>;
      0: AtLoose<O, K>;
  }[strict];

  export type ComputeRaw<A extends any> = A extends Function ? A : {
    [K in keyof A]: A[K];
  } & {};

  export type OptionalFlat<O> = {
    [K in keyof O]?: O[K];
  } & {};

  type _Record<K extends keyof any, T> = {
    [P in K]: T;
  };

  // cause typescript not to expand types and preserve names
  type NoExpand<T> = T extends unknown ? T : never;

  // this type assumes the passed object is entirely optional
  type AtLeast<O extends object, K extends string> = NoExpand<
    O extends unknown
    ? | (K extends keyof O ? { [P in K]: O[P] } & O : O)
      | {[P in keyof O as P extends K ? P : never]-?: O[P]} & O
    : never>;

  type _Strict<U, _U = U> = U extends unknown ? U & OptionalFlat<_Record<Exclude<Keys<_U>, keyof U>, never>> : never;

  export type Strict<U extends object> = ComputeRaw<_Strict<U>>;
  /** End Helper Types for "Merge" **/

  export type Merge<U extends object> = ComputeRaw<_Merge<Strict<U>>>;

  /**
  A [[Boolean]]
  */
  export type Boolean = True | False

  // /**
  // 1
  // */
  export type True = 1

  /**
  0
  */
  export type False = 0

  export type Not<B extends Boolean> = {
    0: 1
    1: 0
  }[B]

  export type Extends<A1 extends any, A2 extends any> = [A1] extends [never]
    ? 0 // anything `never` is false
    : A1 extends A2
    ? 1
    : 0

  export type Has<U extends Union, U1 extends Union> = Not<
    Extends<Exclude<U1, U>, U1>
  >

  export type Or<B1 extends Boolean, B2 extends Boolean> = {
    0: {
      0: 0
      1: 1
    }
    1: {
      0: 1
      1: 1
    }
  }[B1][B2]

  export type Keys<U extends Union> = U extends unknown ? keyof U : never

  type Cast<A, B> = A extends B ? A : B;

  export const type: unique symbol;



  /**
   * Used by group by
   */

  export type GetScalarType<T, O> = O extends object ? {
    [P in keyof T]: P extends keyof O
      ? O[P]
      : never
  } : never

  type FieldPaths<
    T,
    U = Omit<T, '_avg' | '_sum' | '_count' | '_min' | '_max'>
  > = IsObject<T> extends True ? U : T

  type GetHavingFields<T> = {
    [K in keyof T]: Or<
      Or<Extends<'OR', K>, Extends<'AND', K>>,
      Extends<'NOT', K>
    > extends True
      ? // infer is only needed to not hit TS limit
        // based on the brilliant idea of Pierre-Antoine Mills
        // https://github.com/microsoft/TypeScript/issues/30188#issuecomment-478938437
        T[K] extends infer TK
        ? GetHavingFields<UnEnumerate<TK> extends object ? Merge<UnEnumerate<TK>> : never>
        : never
      : {} extends FieldPaths<T[K]>
      ? never
      : K
  }[keyof T]

  /**
   * Convert tuple to union
   */
  type _TupleToUnion<T> = T extends (infer E)[] ? E : never
  type TupleToUnion<K extends readonly any[]> = _TupleToUnion<K>
  type MaybeTupleToUnion<T> = T extends any[] ? TupleToUnion<T> : T

  /**
   * Like `Pick`, but additionally can also accept an array of keys
   */
  type PickEnumerable<T, K extends Enumerable<keyof T> | keyof T> = Prisma__Pick<T, MaybeTupleToUnion<K>>

  /**
   * Exclude all keys with underscores
   */
  type ExcludeUnderscoreKeys<T extends string> = T extends `_${string}` ? never : T


  export type FieldRef<Model, FieldType> = runtime.FieldRef<Model, FieldType>

  type FieldRefInputType<Model, FieldType> = Model extends never ? never : FieldRef<Model, FieldType>


  export const ModelName: {
    Intervento: 'Intervento',
    Registratore: 'Registratore',
    Cliente: 'Cliente'
  };

  export type ModelName = (typeof ModelName)[keyof typeof ModelName]


  export type Datasources = {
    db?: Datasource
  }

  interface TypeMapCb<ClientOptions = {}> extends $Utils.Fn<{extArgs: $Extensions.InternalArgs }, $Utils.Record<string, any>> {
    returns: Prisma.TypeMap<this['params']['extArgs'], ClientOptions extends { omit: infer OmitOptions } ? OmitOptions : {}>
  }

  export type TypeMap<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> = {
    globalOmitOptions: {
      omit: GlobalOmitOptions
    }
    meta: {
      modelProps: "intervento" | "registratore" | "cliente"
      txIsolationLevel: Prisma.TransactionIsolationLevel
    }
    model: {
      Intervento: {
        payload: Prisma.$InterventoPayload<ExtArgs>
        fields: Prisma.InterventoFieldRefs
        operations: {
          findUnique: {
            args: Prisma.InterventoFindUniqueArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$InterventoPayload> | null
          }
          findUniqueOrThrow: {
            args: Prisma.InterventoFindUniqueOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$InterventoPayload>
          }
          findFirst: {
            args: Prisma.InterventoFindFirstArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$InterventoPayload> | null
          }
          findFirstOrThrow: {
            args: Prisma.InterventoFindFirstOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$InterventoPayload>
          }
          findMany: {
            args: Prisma.InterventoFindManyArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$InterventoPayload>[]
          }
          create: {
            args: Prisma.InterventoCreateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$InterventoPayload>
          }
          createMany: {
            args: Prisma.InterventoCreateManyArgs<ExtArgs>
            result: BatchPayload
          }
          createManyAndReturn: {
            args: Prisma.InterventoCreateManyAndReturnArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$InterventoPayload>[]
          }
          delete: {
            args: Prisma.InterventoDeleteArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$InterventoPayload>
          }
          update: {
            args: Prisma.InterventoUpdateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$InterventoPayload>
          }
          deleteMany: {
            args: Prisma.InterventoDeleteManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateMany: {
            args: Prisma.InterventoUpdateManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateManyAndReturn: {
            args: Prisma.InterventoUpdateManyAndReturnArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$InterventoPayload>[]
          }
          upsert: {
            args: Prisma.InterventoUpsertArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$InterventoPayload>
          }
          aggregate: {
            args: Prisma.InterventoAggregateArgs<ExtArgs>
            result: $Utils.Optional<AggregateIntervento>
          }
          groupBy: {
            args: Prisma.InterventoGroupByArgs<ExtArgs>
            result: $Utils.Optional<InterventoGroupByOutputType>[]
          }
          count: {
            args: Prisma.InterventoCountArgs<ExtArgs>
            result: $Utils.Optional<InterventoCountAggregateOutputType> | number
          }
        }
      }
      Registratore: {
        payload: Prisma.$RegistratorePayload<ExtArgs>
        fields: Prisma.RegistratoreFieldRefs
        operations: {
          findUnique: {
            args: Prisma.RegistratoreFindUniqueArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RegistratorePayload> | null
          }
          findUniqueOrThrow: {
            args: Prisma.RegistratoreFindUniqueOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RegistratorePayload>
          }
          findFirst: {
            args: Prisma.RegistratoreFindFirstArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RegistratorePayload> | null
          }
          findFirstOrThrow: {
            args: Prisma.RegistratoreFindFirstOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RegistratorePayload>
          }
          findMany: {
            args: Prisma.RegistratoreFindManyArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RegistratorePayload>[]
          }
          create: {
            args: Prisma.RegistratoreCreateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RegistratorePayload>
          }
          createMany: {
            args: Prisma.RegistratoreCreateManyArgs<ExtArgs>
            result: BatchPayload
          }
          createManyAndReturn: {
            args: Prisma.RegistratoreCreateManyAndReturnArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RegistratorePayload>[]
          }
          delete: {
            args: Prisma.RegistratoreDeleteArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RegistratorePayload>
          }
          update: {
            args: Prisma.RegistratoreUpdateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RegistratorePayload>
          }
          deleteMany: {
            args: Prisma.RegistratoreDeleteManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateMany: {
            args: Prisma.RegistratoreUpdateManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateManyAndReturn: {
            args: Prisma.RegistratoreUpdateManyAndReturnArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RegistratorePayload>[]
          }
          upsert: {
            args: Prisma.RegistratoreUpsertArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RegistratorePayload>
          }
          aggregate: {
            args: Prisma.RegistratoreAggregateArgs<ExtArgs>
            result: $Utils.Optional<AggregateRegistratore>
          }
          groupBy: {
            args: Prisma.RegistratoreGroupByArgs<ExtArgs>
            result: $Utils.Optional<RegistratoreGroupByOutputType>[]
          }
          count: {
            args: Prisma.RegistratoreCountArgs<ExtArgs>
            result: $Utils.Optional<RegistratoreCountAggregateOutputType> | number
          }
        }
      }
      Cliente: {
        payload: Prisma.$ClientePayload<ExtArgs>
        fields: Prisma.ClienteFieldRefs
        operations: {
          findUnique: {
            args: Prisma.ClienteFindUniqueArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ClientePayload> | null
          }
          findUniqueOrThrow: {
            args: Prisma.ClienteFindUniqueOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ClientePayload>
          }
          findFirst: {
            args: Prisma.ClienteFindFirstArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ClientePayload> | null
          }
          findFirstOrThrow: {
            args: Prisma.ClienteFindFirstOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ClientePayload>
          }
          findMany: {
            args: Prisma.ClienteFindManyArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ClientePayload>[]
          }
          create: {
            args: Prisma.ClienteCreateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ClientePayload>
          }
          createMany: {
            args: Prisma.ClienteCreateManyArgs<ExtArgs>
            result: BatchPayload
          }
          createManyAndReturn: {
            args: Prisma.ClienteCreateManyAndReturnArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ClientePayload>[]
          }
          delete: {
            args: Prisma.ClienteDeleteArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ClientePayload>
          }
          update: {
            args: Prisma.ClienteUpdateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ClientePayload>
          }
          deleteMany: {
            args: Prisma.ClienteDeleteManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateMany: {
            args: Prisma.ClienteUpdateManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateManyAndReturn: {
            args: Prisma.ClienteUpdateManyAndReturnArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ClientePayload>[]
          }
          upsert: {
            args: Prisma.ClienteUpsertArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ClientePayload>
          }
          aggregate: {
            args: Prisma.ClienteAggregateArgs<ExtArgs>
            result: $Utils.Optional<AggregateCliente>
          }
          groupBy: {
            args: Prisma.ClienteGroupByArgs<ExtArgs>
            result: $Utils.Optional<ClienteGroupByOutputType>[]
          }
          count: {
            args: Prisma.ClienteCountArgs<ExtArgs>
            result: $Utils.Optional<ClienteCountAggregateOutputType> | number
          }
        }
      }
    }
  } & {
    other: {
      payload: any
      operations: {
        $executeRaw: {
          args: [query: TemplateStringsArray | Prisma.Sql, ...values: any[]],
          result: any
        }
        $executeRawUnsafe: {
          args: [query: string, ...values: any[]],
          result: any
        }
        $queryRaw: {
          args: [query: TemplateStringsArray | Prisma.Sql, ...values: any[]],
          result: any
        }
        $queryRawUnsafe: {
          args: [query: string, ...values: any[]],
          result: any
        }
      }
    }
  }
  export const defineExtension: $Extensions.ExtendsHook<"define", Prisma.TypeMapCb, $Extensions.DefaultArgs>
  export type DefaultPrismaClient = PrismaClient
  export type ErrorFormat = 'pretty' | 'colorless' | 'minimal'
  export interface PrismaClientOptions {
    /**
     * Overwrites the datasource url from your schema.prisma file
     */
    datasources?: Datasources
    /**
     * Overwrites the datasource url from your schema.prisma file
     */
    datasourceUrl?: string
    /**
     * @default "colorless"
     */
    errorFormat?: ErrorFormat
    /**
     * @example
     * ```
     * // Shorthand for `emit: 'stdout'`
     * log: ['query', 'info', 'warn', 'error']
     * 
     * // Emit as events only
     * log: [
     *   { emit: 'event', level: 'query' },
     *   { emit: 'event', level: 'info' },
     *   { emit: 'event', level: 'warn' }
     *   { emit: 'event', level: 'error' }
     * ]
     * 
     * / Emit as events and log to stdout
     * og: [
     *  { emit: 'stdout', level: 'query' },
     *  { emit: 'stdout', level: 'info' },
     *  { emit: 'stdout', level: 'warn' }
     *  { emit: 'stdout', level: 'error' }
     * 
     * ```
     * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/logging#the-log-option).
     */
    log?: (LogLevel | LogDefinition)[]
    /**
     * The default values for transactionOptions
     * maxWait ?= 2000
     * timeout ?= 5000
     */
    transactionOptions?: {
      maxWait?: number
      timeout?: number
      isolationLevel?: Prisma.TransactionIsolationLevel
    }
    /**
     * Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-planetscale`
     */
    adapter?: runtime.SqlDriverAdapterFactory | null
    /**
     * Global configuration for omitting model fields by default.
     * 
     * @example
     * ```
     * const prisma = new PrismaClient({
     *   omit: {
     *     user: {
     *       password: true
     *     }
     *   }
     * })
     * ```
     */
    omit?: Prisma.GlobalOmitConfig
  }
  export type GlobalOmitConfig = {
    intervento?: InterventoOmit
    registratore?: RegistratoreOmit
    cliente?: ClienteOmit
  }

  /* Types for Logging */
  export type LogLevel = 'info' | 'query' | 'warn' | 'error'
  export type LogDefinition = {
    level: LogLevel
    emit: 'stdout' | 'event'
  }

  export type CheckIsLogLevel<T> = T extends LogLevel ? T : never;

  export type GetLogType<T> = CheckIsLogLevel<
    T extends LogDefinition ? T['level'] : T
  >;

  export type GetEvents<T extends any[]> = T extends Array<LogLevel | LogDefinition>
    ? GetLogType<T[number]>
    : never;

  export type QueryEvent = {
    timestamp: Date
    query: string
    params: string
    duration: number
    target: string
  }

  export type LogEvent = {
    timestamp: Date
    message: string
    target: string
  }
  /* End Types for Logging */


  export type PrismaAction =
    | 'findUnique'
    | 'findUniqueOrThrow'
    | 'findMany'
    | 'findFirst'
    | 'findFirstOrThrow'
    | 'create'
    | 'createMany'
    | 'createManyAndReturn'
    | 'update'
    | 'updateMany'
    | 'updateManyAndReturn'
    | 'upsert'
    | 'delete'
    | 'deleteMany'
    | 'executeRaw'
    | 'queryRaw'
    | 'aggregate'
    | 'count'
    | 'runCommandRaw'
    | 'findRaw'
    | 'groupBy'

  // tested in getLogLevel.test.ts
  export function getLogLevel(log: Array<LogLevel | LogDefinition>): LogLevel | undefined;

  /**
   * `PrismaClient` proxy available in interactive transactions.
   */
  export type TransactionClient = Omit<Prisma.DefaultPrismaClient, runtime.ITXClientDenyList>

  export type Datasource = {
    url?: string
  }

  /**
   * Count Types
   */


  /**
   * Count Type RegistratoreCountOutputType
   */

  export type RegistratoreCountOutputType = {
    interventi: number
  }

  export type RegistratoreCountOutputTypeSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    interventi?: boolean | RegistratoreCountOutputTypeCountInterventiArgs
  }

  // Custom InputTypes
  /**
   * RegistratoreCountOutputType without action
   */
  export type RegistratoreCountOutputTypeDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the RegistratoreCountOutputType
     */
    select?: RegistratoreCountOutputTypeSelect<ExtArgs> | null
  }

  /**
   * RegistratoreCountOutputType without action
   */
  export type RegistratoreCountOutputTypeCountInterventiArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: InterventoWhereInput
  }


  /**
   * Count Type ClienteCountOutputType
   */

  export type ClienteCountOutputType = {
    registratori: number
  }

  export type ClienteCountOutputTypeSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    registratori?: boolean | ClienteCountOutputTypeCountRegistratoriArgs
  }

  // Custom InputTypes
  /**
   * ClienteCountOutputType without action
   */
  export type ClienteCountOutputTypeDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the ClienteCountOutputType
     */
    select?: ClienteCountOutputTypeSelect<ExtArgs> | null
  }

  /**
   * ClienteCountOutputType without action
   */
  export type ClienteCountOutputTypeCountRegistratoriArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: RegistratoreWhereInput
  }


  /**
   * Models
   */

  /**
   * Model Intervento
   */

  export type AggregateIntervento = {
    _count: InterventoCountAggregateOutputType | null
    _avg: InterventoAvgAggregateOutputType | null
    _sum: InterventoSumAggregateOutputType | null
    _min: InterventoMinAggregateOutputType | null
    _max: InterventoMaxAggregateOutputType | null
  }

  export type InterventoAvgAggregateOutputType = {
    id: number | null
  }

  export type InterventoSumAggregateOutputType = {
    id: number | null
  }

  export type InterventoMinAggregateOutputType = {
    id: number | null
    id_registratore: string | null
    data: Date | null
    lavoro: string | null
    fattura: boolean | null
  }

  export type InterventoMaxAggregateOutputType = {
    id: number | null
    id_registratore: string | null
    data: Date | null
    lavoro: string | null
    fattura: boolean | null
  }

  export type InterventoCountAggregateOutputType = {
    id: number
    id_registratore: number
    data: number
    lavoro: number
    fattura: number
    _all: number
  }


  export type InterventoAvgAggregateInputType = {
    id?: true
  }

  export type InterventoSumAggregateInputType = {
    id?: true
  }

  export type InterventoMinAggregateInputType = {
    id?: true
    id_registratore?: true
    data?: true
    lavoro?: true
    fattura?: true
  }

  export type InterventoMaxAggregateInputType = {
    id?: true
    id_registratore?: true
    data?: true
    lavoro?: true
    fattura?: true
  }

  export type InterventoCountAggregateInputType = {
    id?: true
    id_registratore?: true
    data?: true
    lavoro?: true
    fattura?: true
    _all?: true
  }

  export type InterventoAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which Intervento to aggregate.
     */
    where?: InterventoWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Interventos to fetch.
     */
    orderBy?: InterventoOrderByWithRelationInput | InterventoOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the start position
     */
    cursor?: InterventoWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Interventos 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` Interventos.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Count returned Interventos
    **/
    _count?: true | InterventoCountAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to average
    **/
    _avg?: InterventoAvgAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to sum
    **/
    _sum?: InterventoSumAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the minimum value
    **/
    _min?: InterventoMinAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the maximum value
    **/
    _max?: InterventoMaxAggregateInputType
  }

  export type GetInterventoAggregateType<T extends InterventoAggregateArgs> = {
        [P in keyof T & keyof AggregateIntervento]: P extends '_count' | 'count'
      ? T[P] extends true
        ? number
        : GetScalarType<T[P], AggregateIntervento[P]>
      : GetScalarType<T[P], AggregateIntervento[P]>
  }




  export type InterventoGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: InterventoWhereInput
    orderBy?: InterventoOrderByWithAggregationInput | InterventoOrderByWithAggregationInput[]
    by: InterventoScalarFieldEnum[] | InterventoScalarFieldEnum
    having?: InterventoScalarWhereWithAggregatesInput
    take?: number
    skip?: number
    _count?: InterventoCountAggregateInputType | true
    _avg?: InterventoAvgAggregateInputType
    _sum?: InterventoSumAggregateInputType
    _min?: InterventoMinAggregateInputType
    _max?: InterventoMaxAggregateInputType
  }

  export type InterventoGroupByOutputType = {
    id: number
    id_registratore: string
    data: Date
    lavoro: string
    fattura: boolean
    _count: InterventoCountAggregateOutputType | null
    _avg: InterventoAvgAggregateOutputType | null
    _sum: InterventoSumAggregateOutputType | null
    _min: InterventoMinAggregateOutputType | null
    _max: InterventoMaxAggregateOutputType | null
  }

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


  export type InterventoSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    id_registratore?: boolean
    data?: boolean
    lavoro?: boolean
    fattura?: boolean
    registratore?: boolean | RegistratoreDefaultArgs<ExtArgs>
  }, ExtArgs["result"]["intervento"]>

  export type InterventoSelectCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    id_registratore?: boolean
    data?: boolean
    lavoro?: boolean
    fattura?: boolean
    registratore?: boolean | RegistratoreDefaultArgs<ExtArgs>
  }, ExtArgs["result"]["intervento"]>

  export type InterventoSelectUpdateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    id_registratore?: boolean
    data?: boolean
    lavoro?: boolean
    fattura?: boolean
    registratore?: boolean | RegistratoreDefaultArgs<ExtArgs>
  }, ExtArgs["result"]["intervento"]>

  export type InterventoSelectScalar = {
    id?: boolean
    id_registratore?: boolean
    data?: boolean
    lavoro?: boolean
    fattura?: boolean
  }

  export type InterventoOmit<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetOmit<"id" | "id_registratore" | "data" | "lavoro" | "fattura", ExtArgs["result"]["intervento"]>
  export type InterventoInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    registratore?: boolean | RegistratoreDefaultArgs<ExtArgs>
  }
  export type InterventoIncludeCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    registratore?: boolean | RegistratoreDefaultArgs<ExtArgs>
  }
  export type InterventoIncludeUpdateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    registratore?: boolean | RegistratoreDefaultArgs<ExtArgs>
  }

  export type $InterventoPayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    name: "Intervento"
    objects: {
      registratore: Prisma.$RegistratorePayload<ExtArgs>
    }
    scalars: $Extensions.GetPayloadResult<{
      id: number
      id_registratore: string
      data: Date
      lavoro: string
      fattura: boolean
    }, ExtArgs["result"]["intervento"]>
    composites: {}
  }

  type InterventoGetPayload<S extends boolean | null | undefined | InterventoDefaultArgs> = $Result.GetResult<Prisma.$InterventoPayload, S>

  type InterventoCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
    Omit<InterventoFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
      select?: InterventoCountAggregateInputType | true
    }

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

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

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

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

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

    /**
     * Create a Intervento.
     * @param {InterventoCreateArgs} args - Arguments to create a Intervento.
     * @example
     * // Create one Intervento
     * const Intervento = await prisma.intervento.create({
     *   data: {
     *     // ... data to create a Intervento
     *   }
     * })
     * 
     */
    create<T extends InterventoCreateArgs>(args: SelectSubset<T, InterventoCreateArgs<ExtArgs>>): Prisma__InterventoClient<$Result.GetResult<Prisma.$InterventoPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

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

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

    /**
     * Delete a Intervento.
     * @param {InterventoDeleteArgs} args - Arguments to delete one Intervento.
     * @example
     * // Delete one Intervento
     * const Intervento = await prisma.intervento.delete({
     *   where: {
     *     // ... filter to delete one Intervento
     *   }
     * })
     * 
     */
    delete<T extends InterventoDeleteArgs>(args: SelectSubset<T, InterventoDeleteArgs<ExtArgs>>): Prisma__InterventoClient<$Result.GetResult<Prisma.$InterventoPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Update one Intervento.
     * @param {InterventoUpdateArgs} args - Arguments to update one Intervento.
     * @example
     * // Update one Intervento
     * const intervento = await prisma.intervento.update({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    update<T extends InterventoUpdateArgs>(args: SelectSubset<T, InterventoUpdateArgs<ExtArgs>>): Prisma__InterventoClient<$Result.GetResult<Prisma.$InterventoPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

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

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

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

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


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

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

    /**
     * Group by Intervento.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {InterventoGroupByArgs} 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 InterventoGroupByArgs,
      HasSelectOrTake extends Or<
        Extends<'skip', Keys<T>>,
        Extends<'take', Keys<T>>
      >,
      OrderByArg extends True extends HasSelectOrTake
        ? { orderBy: InterventoGroupByArgs['orderBy'] }
        : { orderBy?: InterventoGroupByArgs['orderBy'] },
      OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
      ByFields extends MaybeTupleToUnion<T['by']>,
      ByValid extends Has<ByFields, OrderFields>,
      HavingFields extends GetHavingFields<T['having']>,
      HavingValid extends Has<ByFields, HavingFields>,
      ByEmpty extends T['by'] extends never[] ? True : False,
      InputErrors extends ByEmpty extends True
      ? `Error: "by" must not be empty.`
      : HavingValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 True
      ? {}
      : {
          [P in OrderFields]: P extends ByFields
            ? never
            : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
        }[OrderFields]
    >(args: SubsetIntersection<T, InterventoGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetInterventoGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
  /**
   * Fields of the Intervento model
   */
  readonly fields: InterventoFieldRefs;
  }

  /**
   * The delegate class that acts as a "Promise-like" for Intervento.
   * 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__InterventoClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
    readonly [Symbol.toStringTag]: "PrismaPromise"
    registratore<T extends RegistratoreDefaultArgs<ExtArgs> = {}>(args?: Subset<T, RegistratoreDefaultArgs<ExtArgs>>): Prisma__RegistratoreClient<$Result.GetResult<Prisma.$RegistratorePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
    /**
     * 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): $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): $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): $Utils.JsPromise<T>
  }




  /**
   * Fields of the Intervento model
   */
  interface InterventoFieldRefs {
    readonly id: FieldRef<"Intervento", 'Int'>
    readonly id_registratore: FieldRef<"Intervento", 'String'>
    readonly data: FieldRef<"Intervento", 'DateTime'>
    readonly lavoro: FieldRef<"Intervento", 'String'>
    readonly fattura: FieldRef<"Intervento", 'Boolean'>
  }
    

  // Custom InputTypes
  /**
   * Intervento findUnique
   */
  export type InterventoFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Intervento
     */
    select?: InterventoSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Intervento
     */
    omit?: InterventoOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: InterventoInclude<ExtArgs> | null
    /**
     * Filter, which Intervento to fetch.
     */
    where: InterventoWhereUniqueInput
  }

  /**
   * Intervento findUniqueOrThrow
   */
  export type InterventoFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Intervento
     */
    select?: InterventoSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Intervento
     */
    omit?: InterventoOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: InterventoInclude<ExtArgs> | null
    /**
     * Filter, which Intervento to fetch.
     */
    where: InterventoWhereUniqueInput
  }

  /**
   * Intervento findFirst
   */
  export type InterventoFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Intervento
     */
    select?: InterventoSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Intervento
     */
    omit?: InterventoOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: InterventoInclude<ExtArgs> | null
    /**
     * Filter, which Intervento to fetch.
     */
    where?: InterventoWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Interventos to fetch.
     */
    orderBy?: InterventoOrderByWithRelationInput | InterventoOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for Interventos.
     */
    cursor?: InterventoWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Interventos 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` Interventos.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of Interventos.
     */
    distinct?: InterventoScalarFieldEnum | InterventoScalarFieldEnum[]
  }

  /**
   * Intervento findFirstOrThrow
   */
  export type InterventoFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Intervento
     */
    select?: InterventoSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Intervento
     */
    omit?: InterventoOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: InterventoInclude<ExtArgs> | null
    /**
     * Filter, which Intervento to fetch.
     */
    where?: InterventoWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Interventos to fetch.
     */
    orderBy?: InterventoOrderByWithRelationInput | InterventoOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for Interventos.
     */
    cursor?: InterventoWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Interventos 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` Interventos.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of Interventos.
     */
    distinct?: InterventoScalarFieldEnum | InterventoScalarFieldEnum[]
  }

  /**
   * Intervento findMany
   */
  export type InterventoFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Intervento
     */
    select?: InterventoSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Intervento
     */
    omit?: InterventoOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: InterventoInclude<ExtArgs> | null
    /**
     * Filter, which Interventos to fetch.
     */
    where?: InterventoWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Interventos to fetch.
     */
    orderBy?: InterventoOrderByWithRelationInput | InterventoOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for listing Interventos.
     */
    cursor?: InterventoWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Interventos 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` Interventos.
     */
    skip?: number
    distinct?: InterventoScalarFieldEnum | InterventoScalarFieldEnum[]
  }

  /**
   * Intervento create
   */
  export type InterventoCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Intervento
     */
    select?: InterventoSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Intervento
     */
    omit?: InterventoOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: InterventoInclude<ExtArgs> | null
    /**
     * The data needed to create a Intervento.
     */
    data: XOR<InterventoCreateInput, InterventoUncheckedCreateInput>
  }

  /**
   * Intervento createMany
   */
  export type InterventoCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to create many Interventos.
     */
    data: InterventoCreateManyInput | InterventoCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * Intervento createManyAndReturn
   */
  export type InterventoCreateManyAndReturnArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Intervento
     */
    select?: InterventoSelectCreateManyAndReturn<ExtArgs> | null
    /**
     * Omit specific fields from the Intervento
     */
    omit?: InterventoOmit<ExtArgs> | null
    /**
     * The data used to create many Interventos.
     */
    data: InterventoCreateManyInput | InterventoCreateManyInput[]
    skipDuplicates?: boolean
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: InterventoIncludeCreateManyAndReturn<ExtArgs> | null
  }

  /**
   * Intervento update
   */
  export type InterventoUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Intervento
     */
    select?: InterventoSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Intervento
     */
    omit?: InterventoOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: InterventoInclude<ExtArgs> | null
    /**
     * The data needed to update a Intervento.
     */
    data: XOR<InterventoUpdateInput, InterventoUncheckedUpdateInput>
    /**
     * Choose, which Intervento to update.
     */
    where: InterventoWhereUniqueInput
  }

  /**
   * Intervento updateMany
   */
  export type InterventoUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to update Interventos.
     */
    data: XOR<InterventoUpdateManyMutationInput, InterventoUncheckedUpdateManyInput>
    /**
     * Filter which Interventos to update
     */
    where?: InterventoWhereInput
    /**
     * Limit how many Interventos to update.
     */
    limit?: number
  }

  /**
   * Intervento updateManyAndReturn
   */
  export type InterventoUpdateManyAndReturnArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Intervento
     */
    select?: InterventoSelectUpdateManyAndReturn<ExtArgs> | null
    /**
     * Omit specific fields from the Intervento
     */
    omit?: InterventoOmit<ExtArgs> | null
    /**
     * The data used to update Interventos.
     */
    data: XOR<InterventoUpdateManyMutationInput, InterventoUncheckedUpdateManyInput>
    /**
     * Filter which Interventos to update
     */
    where?: InterventoWhereInput
    /**
     * Limit how many Interventos to update.
     */
    limit?: number
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: InterventoIncludeUpdateManyAndReturn<ExtArgs> | null
  }

  /**
   * Intervento upsert
   */
  export type InterventoUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Intervento
     */
    select?: InterventoSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Intervento
     */
    omit?: InterventoOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: InterventoInclude<ExtArgs> | null
    /**
     * The filter to search for the Intervento to update in case it exists.
     */
    where: InterventoWhereUniqueInput
    /**
     * In case the Intervento found by the `where` argument doesn't exist, create a new Intervento with this data.
     */
    create: XOR<InterventoCreateInput, InterventoUncheckedCreateInput>
    /**
     * In case the Intervento was found with the provided `where` argument, update it with this data.
     */
    update: XOR<InterventoUpdateInput, InterventoUncheckedUpdateInput>
  }

  /**
   * Intervento delete
   */
  export type InterventoDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Intervento
     */
    select?: InterventoSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Intervento
     */
    omit?: InterventoOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: InterventoInclude<ExtArgs> | null
    /**
     * Filter which Intervento to delete.
     */
    where: InterventoWhereUniqueInput
  }

  /**
   * Intervento deleteMany
   */
  export type InterventoDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which Interventos to delete
     */
    where?: InterventoWhereInput
    /**
     * Limit how many Interventos to delete.
     */
    limit?: number
  }

  /**
   * Intervento without action
   */
  export type InterventoDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Intervento
     */
    select?: InterventoSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Intervento
     */
    omit?: InterventoOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: InterventoInclude<ExtArgs> | null
  }


  /**
   * Model Registratore
   */

  export type AggregateRegistratore = {
    _count: RegistratoreCountAggregateOutputType | null
    _avg: RegistratoreAvgAggregateOutputType | null
    _sum: RegistratoreSumAggregateOutputType | null
    _min: RegistratoreMinAggregateOutputType | null
    _max: RegistratoreMaxAggregateOutputType | null
  }

  export type RegistratoreAvgAggregateOutputType = {
    id_cliente: number | null
  }

  export type RegistratoreSumAggregateOutputType = {
    id_cliente: number | null
  }

  export type RegistratoreMinAggregateOutputType = {
    id: string | null
    id_cliente: number | null
    modello: $Enums.Modello | null
    data_acquisto: Date | null
    ultima_verifica: Date | null
    prossima_verifica: Date | null
  }

  export type RegistratoreMaxAggregateOutputType = {
    id: string | null
    id_cliente: number | null
    modello: $Enums.Modello | null
    data_acquisto: Date | null
    ultima_verifica: Date | null
    prossima_verifica: Date | null
  }

  export type RegistratoreCountAggregateOutputType = {
    id: number
    id_cliente: number
    modello: number
    data_acquisto: number
    ultima_verifica: number
    prossima_verifica: number
    _all: number
  }


  export type RegistratoreAvgAggregateInputType = {
    id_cliente?: true
  }

  export type RegistratoreSumAggregateInputType = {
    id_cliente?: true
  }

  export type RegistratoreMinAggregateInputType = {
    id?: true
    id_cliente?: true
    modello?: true
    data_acquisto?: true
    ultima_verifica?: true
    prossima_verifica?: true
  }

  export type RegistratoreMaxAggregateInputType = {
    id?: true
    id_cliente?: true
    modello?: true
    data_acquisto?: true
    ultima_verifica?: true
    prossima_verifica?: true
  }

  export type RegistratoreCountAggregateInputType = {
    id?: true
    id_cliente?: true
    modello?: true
    data_acquisto?: true
    ultima_verifica?: true
    prossima_verifica?: true
    _all?: true
  }

  export type RegistratoreAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which Registratore to aggregate.
     */
    where?: RegistratoreWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Registratores to fetch.
     */
    orderBy?: RegistratoreOrderByWithRelationInput | RegistratoreOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the start position
     */
    cursor?: RegistratoreWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Registratores 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` Registratores.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Count returned Registratores
    **/
    _count?: true | RegistratoreCountAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to average
    **/
    _avg?: RegistratoreAvgAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to sum
    **/
    _sum?: RegistratoreSumAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the minimum value
    **/
    _min?: RegistratoreMinAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the maximum value
    **/
    _max?: RegistratoreMaxAggregateInputType
  }

  export type GetRegistratoreAggregateType<T extends RegistratoreAggregateArgs> = {
        [P in keyof T & keyof AggregateRegistratore]: P extends '_count' | 'count'
      ? T[P] extends true
        ? number
        : GetScalarType<T[P], AggregateRegistratore[P]>
      : GetScalarType<T[P], AggregateRegistratore[P]>
  }




  export type RegistratoreGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: RegistratoreWhereInput
    orderBy?: RegistratoreOrderByWithAggregationInput | RegistratoreOrderByWithAggregationInput[]
    by: RegistratoreScalarFieldEnum[] | RegistratoreScalarFieldEnum
    having?: RegistratoreScalarWhereWithAggregatesInput
    take?: number
    skip?: number
    _count?: RegistratoreCountAggregateInputType | true
    _avg?: RegistratoreAvgAggregateInputType
    _sum?: RegistratoreSumAggregateInputType
    _min?: RegistratoreMinAggregateInputType
    _max?: RegistratoreMaxAggregateInputType
  }

  export type RegistratoreGroupByOutputType = {
    id: string
    id_cliente: number
    modello: $Enums.Modello | null
    data_acquisto: Date | null
    ultima_verifica: Date | null
    prossima_verifica: Date | null
    _count: RegistratoreCountAggregateOutputType | null
    _avg: RegistratoreAvgAggregateOutputType | null
    _sum: RegistratoreSumAggregateOutputType | null
    _min: RegistratoreMinAggregateOutputType | null
    _max: RegistratoreMaxAggregateOutputType | null
  }

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


  export type RegistratoreSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    id_cliente?: boolean
    modello?: boolean
    data_acquisto?: boolean
    ultima_verifica?: boolean
    prossima_verifica?: boolean
    cliente?: boolean | ClienteDefaultArgs<ExtArgs>
    interventi?: boolean | Registratore$interventiArgs<ExtArgs>
    _count?: boolean | RegistratoreCountOutputTypeDefaultArgs<ExtArgs>
  }, ExtArgs["result"]["registratore"]>

  export type RegistratoreSelectCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    id_cliente?: boolean
    modello?: boolean
    data_acquisto?: boolean
    ultima_verifica?: boolean
    prossima_verifica?: boolean
    cliente?: boolean | ClienteDefaultArgs<ExtArgs>
  }, ExtArgs["result"]["registratore"]>

  export type RegistratoreSelectUpdateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    id_cliente?: boolean
    modello?: boolean
    data_acquisto?: boolean
    ultima_verifica?: boolean
    prossima_verifica?: boolean
    cliente?: boolean | ClienteDefaultArgs<ExtArgs>
  }, ExtArgs["result"]["registratore"]>

  export type RegistratoreSelectScalar = {
    id?: boolean
    id_cliente?: boolean
    modello?: boolean
    data_acquisto?: boolean
    ultima_verifica?: boolean
    prossima_verifica?: boolean
  }

  export type RegistratoreOmit<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetOmit<"id" | "id_cliente" | "modello" | "data_acquisto" | "ultima_verifica" | "prossima_verifica", ExtArgs["result"]["registratore"]>
  export type RegistratoreInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    cliente?: boolean | ClienteDefaultArgs<ExtArgs>
    interventi?: boolean | Registratore$interventiArgs<ExtArgs>
    _count?: boolean | RegistratoreCountOutputTypeDefaultArgs<ExtArgs>
  }
  export type RegistratoreIncludeCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    cliente?: boolean | ClienteDefaultArgs<ExtArgs>
  }
  export type RegistratoreIncludeUpdateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    cliente?: boolean | ClienteDefaultArgs<ExtArgs>
  }

  export type $RegistratorePayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    name: "Registratore"
    objects: {
      cliente: Prisma.$ClientePayload<ExtArgs>
      interventi: Prisma.$InterventoPayload<ExtArgs>[]
    }
    scalars: $Extensions.GetPayloadResult<{
      id: string
      id_cliente: number
      modello: $Enums.Modello | null
      data_acquisto: Date | null
      ultima_verifica: Date | null
      prossima_verifica: Date | null
    }, ExtArgs["result"]["registratore"]>
    composites: {}
  }

  type RegistratoreGetPayload<S extends boolean | null | undefined | RegistratoreDefaultArgs> = $Result.GetResult<Prisma.$RegistratorePayload, S>

  type RegistratoreCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
    Omit<RegistratoreFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
      select?: RegistratoreCountAggregateInputType | true
    }

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

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

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

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

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

    /**
     * Create a Registratore.
     * @param {RegistratoreCreateArgs} args - Arguments to create a Registratore.
     * @example
     * // Create one Registratore
     * const Registratore = await prisma.registratore.create({
     *   data: {
     *     // ... data to create a Registratore
     *   }
     * })
     * 
     */
    create<T extends RegistratoreCreateArgs>(args: SelectSubset<T, RegistratoreCreateArgs<ExtArgs>>): Prisma__RegistratoreClient<$Result.GetResult<Prisma.$RegistratorePayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

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

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

    /**
     * Delete a Registratore.
     * @param {RegistratoreDeleteArgs} args - Arguments to delete one Registratore.
     * @example
     * // Delete one Registratore
     * const Registratore = await prisma.registratore.delete({
     *   where: {
     *     // ... filter to delete one Registratore
     *   }
     * })
     * 
     */
    delete<T extends RegistratoreDeleteArgs>(args: SelectSubset<T, RegistratoreDeleteArgs<ExtArgs>>): Prisma__RegistratoreClient<$Result.GetResult<Prisma.$RegistratorePayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Update one Registratore.
     * @param {RegistratoreUpdateArgs} args - Arguments to update one Registratore.
     * @example
     * // Update one Registratore
     * const registratore = await prisma.registratore.update({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    update<T extends RegistratoreUpdateArgs>(args: SelectSubset<T, RegistratoreUpdateArgs<ExtArgs>>): Prisma__RegistratoreClient<$Result.GetResult<Prisma.$RegistratorePayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

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

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

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

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


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

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

    /**
     * Group by Registratore.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {RegistratoreGroupByArgs} 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 RegistratoreGroupByArgs,
      HasSelectOrTake extends Or<
        Extends<'skip', Keys<T>>,
        Extends<'take', Keys<T>>
      >,
      OrderByArg extends True extends HasSelectOrTake
        ? { orderBy: RegistratoreGroupByArgs['orderBy'] }
        : { orderBy?: RegistratoreGroupByArgs['orderBy'] },
      OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
      ByFields extends MaybeTupleToUnion<T['by']>,
      ByValid extends Has<ByFields, OrderFields>,
      HavingFields extends GetHavingFields<T['having']>,
      HavingValid extends Has<ByFields, HavingFields>,
      ByEmpty extends T['by'] extends never[] ? True : False,
      InputErrors extends ByEmpty extends True
      ? `Error: "by" must not be empty.`
      : HavingValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 True
      ? {}
      : {
          [P in OrderFields]: P extends ByFields
            ? never
            : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
        }[OrderFields]
    >(args: SubsetIntersection<T, RegistratoreGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetRegistratoreGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
  /**
   * Fields of the Registratore model
   */
  readonly fields: RegistratoreFieldRefs;
  }

  /**
   * The delegate class that acts as a "Promise-like" for Registratore.
   * 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__RegistratoreClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
    readonly [Symbol.toStringTag]: "PrismaPromise"
    cliente<T extends ClienteDefaultArgs<ExtArgs> = {}>(args?: Subset<T, ClienteDefaultArgs<ExtArgs>>): Prisma__ClienteClient<$Result.GetResult<Prisma.$ClientePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
    interventi<T extends Registratore$interventiArgs<ExtArgs> = {}>(args?: Subset<T, Registratore$interventiArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$InterventoPayload<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): $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): $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): $Utils.JsPromise<T>
  }




  /**
   * Fields of the Registratore model
   */
  interface RegistratoreFieldRefs {
    readonly id: FieldRef<"Registratore", 'String'>
    readonly id_cliente: FieldRef<"Registratore", 'Int'>
    readonly modello: FieldRef<"Registratore", 'Modello'>
    readonly data_acquisto: FieldRef<"Registratore", 'DateTime'>
    readonly ultima_verifica: FieldRef<"Registratore", 'DateTime'>
    readonly prossima_verifica: FieldRef<"Registratore", 'DateTime'>
  }
    

  // Custom InputTypes
  /**
   * Registratore findUnique
   */
  export type RegistratoreFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Registratore
     */
    select?: RegistratoreSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Registratore
     */
    omit?: RegistratoreOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RegistratoreInclude<ExtArgs> | null
    /**
     * Filter, which Registratore to fetch.
     */
    where: RegistratoreWhereUniqueInput
  }

  /**
   * Registratore findUniqueOrThrow
   */
  export type RegistratoreFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Registratore
     */
    select?: RegistratoreSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Registratore
     */
    omit?: RegistratoreOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RegistratoreInclude<ExtArgs> | null
    /**
     * Filter, which Registratore to fetch.
     */
    where: RegistratoreWhereUniqueInput
  }

  /**
   * Registratore findFirst
   */
  export type RegistratoreFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Registratore
     */
    select?: RegistratoreSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Registratore
     */
    omit?: RegistratoreOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RegistratoreInclude<ExtArgs> | null
    /**
     * Filter, which Registratore to fetch.
     */
    where?: RegistratoreWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Registratores to fetch.
     */
    orderBy?: RegistratoreOrderByWithRelationInput | RegistratoreOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for Registratores.
     */
    cursor?: RegistratoreWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Registratores 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` Registratores.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of Registratores.
     */
    distinct?: RegistratoreScalarFieldEnum | RegistratoreScalarFieldEnum[]
  }

  /**
   * Registratore findFirstOrThrow
   */
  export type RegistratoreFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Registratore
     */
    select?: RegistratoreSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Registratore
     */
    omit?: RegistratoreOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RegistratoreInclude<ExtArgs> | null
    /**
     * Filter, which Registratore to fetch.
     */
    where?: RegistratoreWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Registratores to fetch.
     */
    orderBy?: RegistratoreOrderByWithRelationInput | RegistratoreOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for Registratores.
     */
    cursor?: RegistratoreWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Registratores 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` Registratores.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of Registratores.
     */
    distinct?: RegistratoreScalarFieldEnum | RegistratoreScalarFieldEnum[]
  }

  /**
   * Registratore findMany
   */
  export type RegistratoreFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Registratore
     */
    select?: RegistratoreSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Registratore
     */
    omit?: RegistratoreOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RegistratoreInclude<ExtArgs> | null
    /**
     * Filter, which Registratores to fetch.
     */
    where?: RegistratoreWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Registratores to fetch.
     */
    orderBy?: RegistratoreOrderByWithRelationInput | RegistratoreOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for listing Registratores.
     */
    cursor?: RegistratoreWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Registratores 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` Registratores.
     */
    skip?: number
    distinct?: RegistratoreScalarFieldEnum | RegistratoreScalarFieldEnum[]
  }

  /**
   * Registratore create
   */
  export type RegistratoreCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Registratore
     */
    select?: RegistratoreSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Registratore
     */
    omit?: RegistratoreOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RegistratoreInclude<ExtArgs> | null
    /**
     * The data needed to create a Registratore.
     */
    data: XOR<RegistratoreCreateInput, RegistratoreUncheckedCreateInput>
  }

  /**
   * Registratore createMany
   */
  export type RegistratoreCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to create many Registratores.
     */
    data: RegistratoreCreateManyInput | RegistratoreCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * Registratore createManyAndReturn
   */
  export type RegistratoreCreateManyAndReturnArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Registratore
     */
    select?: RegistratoreSelectCreateManyAndReturn<ExtArgs> | null
    /**
     * Omit specific fields from the Registratore
     */
    omit?: RegistratoreOmit<ExtArgs> | null
    /**
     * The data used to create many Registratores.
     */
    data: RegistratoreCreateManyInput | RegistratoreCreateManyInput[]
    skipDuplicates?: boolean
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RegistratoreIncludeCreateManyAndReturn<ExtArgs> | null
  }

  /**
   * Registratore update
   */
  export type RegistratoreUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Registratore
     */
    select?: RegistratoreSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Registratore
     */
    omit?: RegistratoreOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RegistratoreInclude<ExtArgs> | null
    /**
     * The data needed to update a Registratore.
     */
    data: XOR<RegistratoreUpdateInput, RegistratoreUncheckedUpdateInput>
    /**
     * Choose, which Registratore to update.
     */
    where: RegistratoreWhereUniqueInput
  }

  /**
   * Registratore updateMany
   */
  export type RegistratoreUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to update Registratores.
     */
    data: XOR<RegistratoreUpdateManyMutationInput, RegistratoreUncheckedUpdateManyInput>
    /**
     * Filter which Registratores to update
     */
    where?: RegistratoreWhereInput
    /**
     * Limit how many Registratores to update.
     */
    limit?: number
  }

  /**
   * Registratore updateManyAndReturn
   */
  export type RegistratoreUpdateManyAndReturnArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Registratore
     */
    select?: RegistratoreSelectUpdateManyAndReturn<ExtArgs> | null
    /**
     * Omit specific fields from the Registratore
     */
    omit?: RegistratoreOmit<ExtArgs> | null
    /**
     * The data used to update Registratores.
     */
    data: XOR<RegistratoreUpdateManyMutationInput, RegistratoreUncheckedUpdateManyInput>
    /**
     * Filter which Registratores to update
     */
    where?: RegistratoreWhereInput
    /**
     * Limit how many Registratores to update.
     */
    limit?: number
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RegistratoreIncludeUpdateManyAndReturn<ExtArgs> | null
  }

  /**
   * Registratore upsert
   */
  export type RegistratoreUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Registratore
     */
    select?: RegistratoreSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Registratore
     */
    omit?: RegistratoreOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RegistratoreInclude<ExtArgs> | null
    /**
     * The filter to search for the Registratore to update in case it exists.
     */
    where: RegistratoreWhereUniqueInput
    /**
     * In case the Registratore found by the `where` argument doesn't exist, create a new Registratore with this data.
     */
    create: XOR<RegistratoreCreateInput, RegistratoreUncheckedCreateInput>
    /**
     * In case the Registratore was found with the provided `where` argument, update it with this data.
     */
    update: XOR<RegistratoreUpdateInput, RegistratoreUncheckedUpdateInput>
  }

  /**
   * Registratore delete
   */
  export type RegistratoreDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Registratore
     */
    select?: RegistratoreSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Registratore
     */
    omit?: RegistratoreOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RegistratoreInclude<ExtArgs> | null
    /**
     * Filter which Registratore to delete.
     */
    where: RegistratoreWhereUniqueInput
  }

  /**
   * Registratore deleteMany
   */
  export type RegistratoreDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which Registratores to delete
     */
    where?: RegistratoreWhereInput
    /**
     * Limit how many Registratores to delete.
     */
    limit?: number
  }

  /**
   * Registratore.interventi
   */
  export type Registratore$interventiArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Intervento
     */
    select?: InterventoSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Intervento
     */
    omit?: InterventoOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: InterventoInclude<ExtArgs> | null
    where?: InterventoWhereInput
    orderBy?: InterventoOrderByWithRelationInput | InterventoOrderByWithRelationInput[]
    cursor?: InterventoWhereUniqueInput
    take?: number
    skip?: number
    distinct?: InterventoScalarFieldEnum | InterventoScalarFieldEnum[]
  }

  /**
   * Registratore without action
   */
  export type RegistratoreDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Registratore
     */
    select?: RegistratoreSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Registratore
     */
    omit?: RegistratoreOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RegistratoreInclude<ExtArgs> | null
  }


  /**
   * Model Cliente
   */

  export type AggregateCliente = {
    _count: ClienteCountAggregateOutputType | null
    _avg: ClienteAvgAggregateOutputType | null
    _sum: ClienteSumAggregateOutputType | null
    _min: ClienteMinAggregateOutputType | null
    _max: ClienteMaxAggregateOutputType | null
  }

  export type ClienteAvgAggregateOutputType = {
    id: number | null
    lat: number | null
    lon: number | null
  }

  export type ClienteSumAggregateOutputType = {
    id: number | null
    lat: number | null
    lon: number | null
  }

  export type ClienteMinAggregateOutputType = {
    id: number | null
    ragione_sociale: string | null
    email: string | null
    partita_iva: string | null
    telefono: string | null
    sede: string | null
    sede_url: string | null
    contratto: string | null
    lat: number | null
    lon: number | null
  }

  export type ClienteMaxAggregateOutputType = {
    id: number | null
    ragione_sociale: string | null
    email: string | null
    partita_iva: string | null
    telefono: string | null
    sede: string | null
    sede_url: string | null
    contratto: string | null
    lat: number | null
    lon: number | null
  }

  export type ClienteCountAggregateOutputType = {
    id: number
    ragione_sociale: number
    email: number
    partita_iva: number
    telefono: number
    sede: number
    sede_url: number
    contratto: number
    lat: number
    lon: number
    _all: number
  }


  export type ClienteAvgAggregateInputType = {
    id?: true
    lat?: true
    lon?: true
  }

  export type ClienteSumAggregateInputType = {
    id?: true
    lat?: true
    lon?: true
  }

  export type ClienteMinAggregateInputType = {
    id?: true
    ragione_sociale?: true
    email?: true
    partita_iva?: true
    telefono?: true
    sede?: true
    sede_url?: true
    contratto?: true
    lat?: true
    lon?: true
  }

  export type ClienteMaxAggregateInputType = {
    id?: true
    ragione_sociale?: true
    email?: true
    partita_iva?: true
    telefono?: true
    sede?: true
    sede_url?: true
    contratto?: true
    lat?: true
    lon?: true
  }

  export type ClienteCountAggregateInputType = {
    id?: true
    ragione_sociale?: true
    email?: true
    partita_iva?: true
    telefono?: true
    sede?: true
    sede_url?: true
    contratto?: true
    lat?: true
    lon?: true
    _all?: true
  }

  export type ClienteAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which Cliente to aggregate.
     */
    where?: ClienteWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Clientes to fetch.
     */
    orderBy?: ClienteOrderByWithRelationInput | ClienteOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the start position
     */
    cursor?: ClienteWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Clientes 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` Clientes.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Count returned Clientes
    **/
    _count?: true | ClienteCountAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to average
    **/
    _avg?: ClienteAvgAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to sum
    **/
    _sum?: ClienteSumAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the minimum value
    **/
    _min?: ClienteMinAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the maximum value
    **/
    _max?: ClienteMaxAggregateInputType
  }

  export type GetClienteAggregateType<T extends ClienteAggregateArgs> = {
        [P in keyof T & keyof AggregateCliente]: P extends '_count' | 'count'
      ? T[P] extends true
        ? number
        : GetScalarType<T[P], AggregateCliente[P]>
      : GetScalarType<T[P], AggregateCliente[P]>
  }




  export type ClienteGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: ClienteWhereInput
    orderBy?: ClienteOrderByWithAggregationInput | ClienteOrderByWithAggregationInput[]
    by: ClienteScalarFieldEnum[] | ClienteScalarFieldEnum
    having?: ClienteScalarWhereWithAggregatesInput
    take?: number
    skip?: number
    _count?: ClienteCountAggregateInputType | true
    _avg?: ClienteAvgAggregateInputType
    _sum?: ClienteSumAggregateInputType
    _min?: ClienteMinAggregateInputType
    _max?: ClienteMaxAggregateInputType
  }

  export type ClienteGroupByOutputType = {
    id: number
    ragione_sociale: string
    email: string
    partita_iva: string
    telefono: string
    sede: string
    sede_url: string
    contratto: string
    lat: number
    lon: number
    _count: ClienteCountAggregateOutputType | null
    _avg: ClienteAvgAggregateOutputType | null
    _sum: ClienteSumAggregateOutputType | null
    _min: ClienteMinAggregateOutputType | null
    _max: ClienteMaxAggregateOutputType | null
  }

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


  export type ClienteSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    ragione_sociale?: boolean
    email?: boolean
    partita_iva?: boolean
    telefono?: boolean
    sede?: boolean
    sede_url?: boolean
    contratto?: boolean
    lat?: boolean
    lon?: boolean
    registratori?: boolean | Cliente$registratoriArgs<ExtArgs>
    _count?: boolean | ClienteCountOutputTypeDefaultArgs<ExtArgs>
  }, ExtArgs["result"]["cliente"]>

  export type ClienteSelectCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    ragione_sociale?: boolean
    email?: boolean
    partita_iva?: boolean
    telefono?: boolean
    sede?: boolean
    sede_url?: boolean
    contratto?: boolean
    lat?: boolean
    lon?: boolean
  }, ExtArgs["result"]["cliente"]>

  export type ClienteSelectUpdateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    ragione_sociale?: boolean
    email?: boolean
    partita_iva?: boolean
    telefono?: boolean
    sede?: boolean
    sede_url?: boolean
    contratto?: boolean
    lat?: boolean
    lon?: boolean
  }, ExtArgs["result"]["cliente"]>

  export type ClienteSelectScalar = {
    id?: boolean
    ragione_sociale?: boolean
    email?: boolean
    partita_iva?: boolean
    telefono?: boolean
    sede?: boolean
    sede_url?: boolean
    contratto?: boolean
    lat?: boolean
    lon?: boolean
  }

  export type ClienteOmit<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetOmit<"id" | "ragione_sociale" | "email" | "partita_iva" | "telefono" | "sede" | "sede_url" | "contratto" | "lat" | "lon", ExtArgs["result"]["cliente"]>
  export type ClienteInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    registratori?: boolean | Cliente$registratoriArgs<ExtArgs>
    _count?: boolean | ClienteCountOutputTypeDefaultArgs<ExtArgs>
  }
  export type ClienteIncludeCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {}
  export type ClienteIncludeUpdateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {}

  export type $ClientePayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    name: "Cliente"
    objects: {
      registratori: Prisma.$RegistratorePayload<ExtArgs>[]
    }
    scalars: $Extensions.GetPayloadResult<{
      id: number
      ragione_sociale: string
      email: string
      partita_iva: string
      telefono: string
      sede: string
      sede_url: string
      contratto: string
      lat: number
      lon: number
    }, ExtArgs["result"]["cliente"]>
    composites: {}
  }

  type ClienteGetPayload<S extends boolean | null | undefined | ClienteDefaultArgs> = $Result.GetResult<Prisma.$ClientePayload, S>

  type ClienteCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
    Omit<ClienteFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
      select?: ClienteCountAggregateInputType | true
    }

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

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

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

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

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

    /**
     * Create a Cliente.
     * @param {ClienteCreateArgs} args - Arguments to create a Cliente.
     * @example
     * // Create one Cliente
     * const Cliente = await prisma.cliente.create({
     *   data: {
     *     // ... data to create a Cliente
     *   }
     * })
     * 
     */
    create<T extends ClienteCreateArgs>(args: SelectSubset<T, ClienteCreateArgs<ExtArgs>>): Prisma__ClienteClient<$Result.GetResult<Prisma.$ClientePayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

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

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

    /**
     * Delete a Cliente.
     * @param {ClienteDeleteArgs} args - Arguments to delete one Cliente.
     * @example
     * // Delete one Cliente
     * const Cliente = await prisma.cliente.delete({
     *   where: {
     *     // ... filter to delete one Cliente
     *   }
     * })
     * 
     */
    delete<T extends ClienteDeleteArgs>(args: SelectSubset<T, ClienteDeleteArgs<ExtArgs>>): Prisma__ClienteClient<$Result.GetResult<Prisma.$ClientePayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Update one Cliente.
     * @param {ClienteUpdateArgs} args - Arguments to update one Cliente.
     * @example
     * // Update one Cliente
     * const cliente = await prisma.cliente.update({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    update<T extends ClienteUpdateArgs>(args: SelectSubset<T, ClienteUpdateArgs<ExtArgs>>): Prisma__ClienteClient<$Result.GetResult<Prisma.$ClientePayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

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

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

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

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


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

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

    /**
     * Group by Cliente.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {ClienteGroupByArgs} 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 ClienteGroupByArgs,
      HasSelectOrTake extends Or<
        Extends<'skip', Keys<T>>,
        Extends<'take', Keys<T>>
      >,
      OrderByArg extends True extends HasSelectOrTake
        ? { orderBy: ClienteGroupByArgs['orderBy'] }
        : { orderBy?: ClienteGroupByArgs['orderBy'] },
      OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
      ByFields extends MaybeTupleToUnion<T['by']>,
      ByValid extends Has<ByFields, OrderFields>,
      HavingFields extends GetHavingFields<T['having']>,
      HavingValid extends Has<ByFields, HavingFields>,
      ByEmpty extends T['by'] extends never[] ? True : False,
      InputErrors extends ByEmpty extends True
      ? `Error: "by" must not be empty.`
      : HavingValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends 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 True
      ? {}
      : {
          [P in OrderFields]: P extends ByFields
            ? never
            : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
        }[OrderFields]
    >(args: SubsetIntersection<T, ClienteGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetClienteGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
  /**
   * Fields of the Cliente model
   */
  readonly fields: ClienteFieldRefs;
  }

  /**
   * The delegate class that acts as a "Promise-like" for Cliente.
   * 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__ClienteClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
    readonly [Symbol.toStringTag]: "PrismaPromise"
    registratori<T extends Cliente$registratoriArgs<ExtArgs> = {}>(args?: Subset<T, Cliente$registratoriArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$RegistratorePayload<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): $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): $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): $Utils.JsPromise<T>
  }




  /**
   * Fields of the Cliente model
   */
  interface ClienteFieldRefs {
    readonly id: FieldRef<"Cliente", 'Int'>
    readonly ragione_sociale: FieldRef<"Cliente", 'String'>
    readonly email: FieldRef<"Cliente", 'String'>
    readonly partita_iva: FieldRef<"Cliente", 'String'>
    readonly telefono: FieldRef<"Cliente", 'String'>
    readonly sede: FieldRef<"Cliente", 'String'>
    readonly sede_url: FieldRef<"Cliente", 'String'>
    readonly contratto: FieldRef<"Cliente", 'String'>
    readonly lat: FieldRef<"Cliente", 'Float'>
    readonly lon: FieldRef<"Cliente", 'Float'>
  }
    

  // Custom InputTypes
  /**
   * Cliente findUnique
   */
  export type ClienteFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Cliente
     */
    select?: ClienteSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Cliente
     */
    omit?: ClienteOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ClienteInclude<ExtArgs> | null
    /**
     * Filter, which Cliente to fetch.
     */
    where: ClienteWhereUniqueInput
  }

  /**
   * Cliente findUniqueOrThrow
   */
  export type ClienteFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Cliente
     */
    select?: ClienteSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Cliente
     */
    omit?: ClienteOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ClienteInclude<ExtArgs> | null
    /**
     * Filter, which Cliente to fetch.
     */
    where: ClienteWhereUniqueInput
  }

  /**
   * Cliente findFirst
   */
  export type ClienteFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Cliente
     */
    select?: ClienteSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Cliente
     */
    omit?: ClienteOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ClienteInclude<ExtArgs> | null
    /**
     * Filter, which Cliente to fetch.
     */
    where?: ClienteWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Clientes to fetch.
     */
    orderBy?: ClienteOrderByWithRelationInput | ClienteOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for Clientes.
     */
    cursor?: ClienteWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Clientes 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` Clientes.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of Clientes.
     */
    distinct?: ClienteScalarFieldEnum | ClienteScalarFieldEnum[]
  }

  /**
   * Cliente findFirstOrThrow
   */
  export type ClienteFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Cliente
     */
    select?: ClienteSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Cliente
     */
    omit?: ClienteOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ClienteInclude<ExtArgs> | null
    /**
     * Filter, which Cliente to fetch.
     */
    where?: ClienteWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Clientes to fetch.
     */
    orderBy?: ClienteOrderByWithRelationInput | ClienteOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for Clientes.
     */
    cursor?: ClienteWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Clientes 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` Clientes.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of Clientes.
     */
    distinct?: ClienteScalarFieldEnum | ClienteScalarFieldEnum[]
  }

  /**
   * Cliente findMany
   */
  export type ClienteFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Cliente
     */
    select?: ClienteSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Cliente
     */
    omit?: ClienteOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ClienteInclude<ExtArgs> | null
    /**
     * Filter, which Clientes to fetch.
     */
    where?: ClienteWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Clientes to fetch.
     */
    orderBy?: ClienteOrderByWithRelationInput | ClienteOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for listing Clientes.
     */
    cursor?: ClienteWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Clientes 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` Clientes.
     */
    skip?: number
    distinct?: ClienteScalarFieldEnum | ClienteScalarFieldEnum[]
  }

  /**
   * Cliente create
   */
  export type ClienteCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Cliente
     */
    select?: ClienteSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Cliente
     */
    omit?: ClienteOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ClienteInclude<ExtArgs> | null
    /**
     * The data needed to create a Cliente.
     */
    data: XOR<ClienteCreateInput, ClienteUncheckedCreateInput>
  }

  /**
   * Cliente createMany
   */
  export type ClienteCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to create many Clientes.
     */
    data: ClienteCreateManyInput | ClienteCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * Cliente createManyAndReturn
   */
  export type ClienteCreateManyAndReturnArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Cliente
     */
    select?: ClienteSelectCreateManyAndReturn<ExtArgs> | null
    /**
     * Omit specific fields from the Cliente
     */
    omit?: ClienteOmit<ExtArgs> | null
    /**
     * The data used to create many Clientes.
     */
    data: ClienteCreateManyInput | ClienteCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * Cliente update
   */
  export type ClienteUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Cliente
     */
    select?: ClienteSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Cliente
     */
    omit?: ClienteOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ClienteInclude<ExtArgs> | null
    /**
     * The data needed to update a Cliente.
     */
    data: XOR<ClienteUpdateInput, ClienteUncheckedUpdateInput>
    /**
     * Choose, which Cliente to update.
     */
    where: ClienteWhereUniqueInput
  }

  /**
   * Cliente updateMany
   */
  export type ClienteUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to update Clientes.
     */
    data: XOR<ClienteUpdateManyMutationInput, ClienteUncheckedUpdateManyInput>
    /**
     * Filter which Clientes to update
     */
    where?: ClienteWhereInput
    /**
     * Limit how many Clientes to update.
     */
    limit?: number
  }

  /**
   * Cliente updateManyAndReturn
   */
  export type ClienteUpdateManyAndReturnArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Cliente
     */
    select?: ClienteSelectUpdateManyAndReturn<ExtArgs> | null
    /**
     * Omit specific fields from the Cliente
     */
    omit?: ClienteOmit<ExtArgs> | null
    /**
     * The data used to update Clientes.
     */
    data: XOR<ClienteUpdateManyMutationInput, ClienteUncheckedUpdateManyInput>
    /**
     * Filter which Clientes to update
     */
    where?: ClienteWhereInput
    /**
     * Limit how many Clientes to update.
     */
    limit?: number
  }

  /**
   * Cliente upsert
   */
  export type ClienteUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Cliente
     */
    select?: ClienteSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Cliente
     */
    omit?: ClienteOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ClienteInclude<ExtArgs> | null
    /**
     * The filter to search for the Cliente to update in case it exists.
     */
    where: ClienteWhereUniqueInput
    /**
     * In case the Cliente found by the `where` argument doesn't exist, create a new Cliente with this data.
     */
    create: XOR<ClienteCreateInput, ClienteUncheckedCreateInput>
    /**
     * In case the Cliente was found with the provided `where` argument, update it with this data.
     */
    update: XOR<ClienteUpdateInput, ClienteUncheckedUpdateInput>
  }

  /**
   * Cliente delete
   */
  export type ClienteDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Cliente
     */
    select?: ClienteSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Cliente
     */
    omit?: ClienteOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ClienteInclude<ExtArgs> | null
    /**
     * Filter which Cliente to delete.
     */
    where: ClienteWhereUniqueInput
  }

  /**
   * Cliente deleteMany
   */
  export type ClienteDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which Clientes to delete
     */
    where?: ClienteWhereInput
    /**
     * Limit how many Clientes to delete.
     */
    limit?: number
  }

  /**
   * Cliente.registratori
   */
  export type Cliente$registratoriArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Registratore
     */
    select?: RegistratoreSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Registratore
     */
    omit?: RegistratoreOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RegistratoreInclude<ExtArgs> | null
    where?: RegistratoreWhereInput
    orderBy?: RegistratoreOrderByWithRelationInput | RegistratoreOrderByWithRelationInput[]
    cursor?: RegistratoreWhereUniqueInput
    take?: number
    skip?: number
    distinct?: RegistratoreScalarFieldEnum | RegistratoreScalarFieldEnum[]
  }

  /**
   * Cliente without action
   */
  export type ClienteDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Cliente
     */
    select?: ClienteSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Cliente
     */
    omit?: ClienteOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ClienteInclude<ExtArgs> | null
  }


  /**
   * Enums
   */

  export const TransactionIsolationLevel: {
    ReadUncommitted: 'ReadUncommitted',
    ReadCommitted: 'ReadCommitted',
    RepeatableRead: 'RepeatableRead',
    Serializable: 'Serializable'
  };

  export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel]


  export const InterventoScalarFieldEnum: {
    id: 'id',
    id_registratore: 'id_registratore',
    data: 'data',
    lavoro: 'lavoro',
    fattura: 'fattura'
  };

  export type InterventoScalarFieldEnum = (typeof InterventoScalarFieldEnum)[keyof typeof InterventoScalarFieldEnum]


  export const RegistratoreScalarFieldEnum: {
    id: 'id',
    id_cliente: 'id_cliente',
    modello: 'modello',
    data_acquisto: 'data_acquisto',
    ultima_verifica: 'ultima_verifica',
    prossima_verifica: 'prossima_verifica'
  };

  export type RegistratoreScalarFieldEnum = (typeof RegistratoreScalarFieldEnum)[keyof typeof RegistratoreScalarFieldEnum]


  export const ClienteScalarFieldEnum: {
    id: 'id',
    ragione_sociale: 'ragione_sociale',
    email: 'email',
    partita_iva: 'partita_iva',
    telefono: 'telefono',
    sede: 'sede',
    sede_url: 'sede_url',
    contratto: 'contratto',
    lat: 'lat',
    lon: 'lon'
  };

  export type ClienteScalarFieldEnum = (typeof ClienteScalarFieldEnum)[keyof typeof ClienteScalarFieldEnum]


  export const SortOrder: {
    asc: 'asc',
    desc: 'desc'
  };

  export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder]


  export const QueryMode: {
    default: 'default',
    insensitive: 'insensitive'
  };

  export type QueryMode = (typeof QueryMode)[keyof typeof QueryMode]


  export const NullsOrder: {
    first: 'first',
    last: 'last'
  };

  export type NullsOrder = (typeof NullsOrder)[keyof typeof NullsOrder]


  /**
   * Field references
   */


  /**
   * Reference to a field of type 'Int'
   */
  export type IntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int'>
    


  /**
   * Reference to a field of type 'Int[]'
   */
  export type ListIntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int[]'>
    


  /**
   * Reference to a field of type 'String'
   */
  export type StringFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'String'>
    


  /**
   * Reference to a field of type 'String[]'
   */
  export type ListStringFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'String[]'>
    


  /**
   * Reference to a field of type 'DateTime'
   */
  export type DateTimeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'DateTime'>
    


  /**
   * Reference to a field of type 'DateTime[]'
   */
  export type ListDateTimeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'DateTime[]'>
    


  /**
   * Reference to a field of type 'Boolean'
   */
  export type BooleanFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Boolean'>
    


  /**
   * Reference to a field of type 'Modello'
   */
  export type EnumModelloFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Modello'>
    


  /**
   * Reference to a field of type 'Modello[]'
   */
  export type ListEnumModelloFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Modello[]'>
    


  /**
   * Reference to a field of type 'Float'
   */
  export type FloatFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Float'>
    


  /**
   * Reference to a field of type 'Float[]'
   */
  export type ListFloatFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Float[]'>
    
  /**
   * Deep Input Types
   */


  export type InterventoWhereInput = {
    AND?: InterventoWhereInput | InterventoWhereInput[]
    OR?: InterventoWhereInput[]
    NOT?: InterventoWhereInput | InterventoWhereInput[]
    id?: IntFilter<"Intervento"> | number
    id_registratore?: StringFilter<"Intervento"> | string
    data?: DateTimeFilter<"Intervento"> | Date | string
    lavoro?: StringFilter<"Intervento"> | string
    fattura?: BoolFilter<"Intervento"> | boolean
    registratore?: XOR<RegistratoreScalarRelationFilter, RegistratoreWhereInput>
  }

  export type InterventoOrderByWithRelationInput = {
    id?: SortOrder
    id_registratore?: SortOrder
    data?: SortOrder
    lavoro?: SortOrder
    fattura?: SortOrder
    registratore?: RegistratoreOrderByWithRelationInput
  }

  export type InterventoWhereUniqueInput = Prisma.AtLeast<{
    id?: number
    AND?: InterventoWhereInput | InterventoWhereInput[]
    OR?: InterventoWhereInput[]
    NOT?: InterventoWhereInput | InterventoWhereInput[]
    id_registratore?: StringFilter<"Intervento"> | string
    data?: DateTimeFilter<"Intervento"> | Date | string
    lavoro?: StringFilter<"Intervento"> | string
    fattura?: BoolFilter<"Intervento"> | boolean
    registratore?: XOR<RegistratoreScalarRelationFilter, RegistratoreWhereInput>
  }, "id">

  export type InterventoOrderByWithAggregationInput = {
    id?: SortOrder
    id_registratore?: SortOrder
    data?: SortOrder
    lavoro?: SortOrder
    fattura?: SortOrder
    _count?: InterventoCountOrderByAggregateInput
    _avg?: InterventoAvgOrderByAggregateInput
    _max?: InterventoMaxOrderByAggregateInput
    _min?: InterventoMinOrderByAggregateInput
    _sum?: InterventoSumOrderByAggregateInput
  }

  export type InterventoScalarWhereWithAggregatesInput = {
    AND?: InterventoScalarWhereWithAggregatesInput | InterventoScalarWhereWithAggregatesInput[]
    OR?: InterventoScalarWhereWithAggregatesInput[]
    NOT?: InterventoScalarWhereWithAggregatesInput | InterventoScalarWhereWithAggregatesInput[]
    id?: IntWithAggregatesFilter<"Intervento"> | number
    id_registratore?: StringWithAggregatesFilter<"Intervento"> | string
    data?: DateTimeWithAggregatesFilter<"Intervento"> | Date | string
    lavoro?: StringWithAggregatesFilter<"Intervento"> | string
    fattura?: BoolWithAggregatesFilter<"Intervento"> | boolean
  }

  export type RegistratoreWhereInput = {
    AND?: RegistratoreWhereInput | RegistratoreWhereInput[]
    OR?: RegistratoreWhereInput[]
    NOT?: RegistratoreWhereInput | RegistratoreWhereInput[]
    id?: StringFilter<"Registratore"> | string
    id_cliente?: IntFilter<"Registratore"> | number
    modello?: EnumModelloNullableFilter<"Registratore"> | $Enums.Modello | null
    data_acquisto?: DateTimeNullableFilter<"Registratore"> | Date | string | null
    ultima_verifica?: DateTimeNullableFilter<"Registratore"> | Date | string | null
    prossima_verifica?: DateTimeNullableFilter<"Registratore"> | Date | string | null
    cliente?: XOR<ClienteScalarRelationFilter, ClienteWhereInput>
    interventi?: InterventoListRelationFilter
  }

  export type RegistratoreOrderByWithRelationInput = {
    id?: SortOrder
    id_cliente?: SortOrder
    modello?: SortOrderInput | SortOrder
    data_acquisto?: SortOrderInput | SortOrder
    ultima_verifica?: SortOrderInput | SortOrder
    prossima_verifica?: SortOrderInput | SortOrder
    cliente?: ClienteOrderByWithRelationInput
    interventi?: InterventoOrderByRelationAggregateInput
  }

  export type RegistratoreWhereUniqueInput = Prisma.AtLeast<{
    id?: string
    AND?: RegistratoreWhereInput | RegistratoreWhereInput[]
    OR?: RegistratoreWhereInput[]
    NOT?: RegistratoreWhereInput | RegistratoreWhereInput[]
    id_cliente?: IntFilter<"Registratore"> | number
    modello?: EnumModelloNullableFilter<"Registratore"> | $Enums.Modello | null
    data_acquisto?: DateTimeNullableFilter<"Registratore"> | Date | string | null
    ultima_verifica?: DateTimeNullableFilter<"Registratore"> | Date | string | null
    prossima_verifica?: DateTimeNullableFilter<"Registratore"> | Date | string | null
    cliente?: XOR<ClienteScalarRelationFilter, ClienteWhereInput>
    interventi?: InterventoListRelationFilter
  }, "id">

  export type RegistratoreOrderByWithAggregationInput = {
    id?: SortOrder
    id_cliente?: SortOrder
    modello?: SortOrderInput | SortOrder
    data_acquisto?: SortOrderInput | SortOrder
    ultima_verifica?: SortOrderInput | SortOrder
    prossima_verifica?: SortOrderInput | SortOrder
    _count?: RegistratoreCountOrderByAggregateInput
    _avg?: RegistratoreAvgOrderByAggregateInput
    _max?: RegistratoreMaxOrderByAggregateInput
    _min?: RegistratoreMinOrderByAggregateInput
    _sum?: RegistratoreSumOrderByAggregateInput
  }

  export type RegistratoreScalarWhereWithAggregatesInput = {
    AND?: RegistratoreScalarWhereWithAggregatesInput | RegistratoreScalarWhereWithAggregatesInput[]
    OR?: RegistratoreScalarWhereWithAggregatesInput[]
    NOT?: RegistratoreScalarWhereWithAggregatesInput | RegistratoreScalarWhereWithAggregatesInput[]
    id?: StringWithAggregatesFilter<"Registratore"> | string
    id_cliente?: IntWithAggregatesFilter<"Registratore"> | number
    modello?: EnumModelloNullableWithAggregatesFilter<"Registratore"> | $Enums.Modello | null
    data_acquisto?: DateTimeNullableWithAggregatesFilter<"Registratore"> | Date | string | null
    ultima_verifica?: DateTimeNullableWithAggregatesFilter<"Registratore"> | Date | string | null
    prossima_verifica?: DateTimeNullableWithAggregatesFilter<"Registratore"> | Date | string | null
  }

  export type ClienteWhereInput = {
    AND?: ClienteWhereInput | ClienteWhereInput[]
    OR?: ClienteWhereInput[]
    NOT?: ClienteWhereInput | ClienteWhereInput[]
    id?: IntFilter<"Cliente"> | number
    ragione_sociale?: StringFilter<"Cliente"> | string
    email?: StringFilter<"Cliente"> | string
    partita_iva?: StringFilter<"Cliente"> | string
    telefono?: StringFilter<"Cliente"> | string
    sede?: StringFilter<"Cliente"> | string
    sede_url?: StringFilter<"Cliente"> | string
    contratto?: StringFilter<"Cliente"> | string
    lat?: FloatFilter<"Cliente"> | number
    lon?: FloatFilter<"Cliente"> | number
    registratori?: RegistratoreListRelationFilter
  }

  export type ClienteOrderByWithRelationInput = {
    id?: SortOrder
    ragione_sociale?: SortOrder
    email?: SortOrder
    partita_iva?: SortOrder
    telefono?: SortOrder
    sede?: SortOrder
    sede_url?: SortOrder
    contratto?: SortOrder
    lat?: SortOrder
    lon?: SortOrder
    registratori?: RegistratoreOrderByRelationAggregateInput
  }

  export type ClienteWhereUniqueInput = Prisma.AtLeast<{
    id?: number
    ragione_sociale?: string
    AND?: ClienteWhereInput | ClienteWhereInput[]
    OR?: ClienteWhereInput[]
    NOT?: ClienteWhereInput | ClienteWhereInput[]
    email?: StringFilter<"Cliente"> | string
    partita_iva?: StringFilter<"Cliente"> | string
    telefono?: StringFilter<"Cliente"> | string
    sede?: StringFilter<"Cliente"> | string
    sede_url?: StringFilter<"Cliente"> | string
    contratto?: StringFilter<"Cliente"> | string
    lat?: FloatFilter<"Cliente"> | number
    lon?: FloatFilter<"Cliente"> | number
    registratori?: RegistratoreListRelationFilter
  }, "id" | "ragione_sociale">

  export type ClienteOrderByWithAggregationInput = {
    id?: SortOrder
    ragione_sociale?: SortOrder
    email?: SortOrder
    partita_iva?: SortOrder
    telefono?: SortOrder
    sede?: SortOrder
    sede_url?: SortOrder
    contratto?: SortOrder
    lat?: SortOrder
    lon?: SortOrder
    _count?: ClienteCountOrderByAggregateInput
    _avg?: ClienteAvgOrderByAggregateInput
    _max?: ClienteMaxOrderByAggregateInput
    _min?: ClienteMinOrderByAggregateInput
    _sum?: ClienteSumOrderByAggregateInput
  }

  export type ClienteScalarWhereWithAggregatesInput = {
    AND?: ClienteScalarWhereWithAggregatesInput | ClienteScalarWhereWithAggregatesInput[]
    OR?: ClienteScalarWhereWithAggregatesInput[]
    NOT?: ClienteScalarWhereWithAggregatesInput | ClienteScalarWhereWithAggregatesInput[]
    id?: IntWithAggregatesFilter<"Cliente"> | number
    ragione_sociale?: StringWithAggregatesFilter<"Cliente"> | string
    email?: StringWithAggregatesFilter<"Cliente"> | string
    partita_iva?: StringWithAggregatesFilter<"Cliente"> | string
    telefono?: StringWithAggregatesFilter<"Cliente"> | string
    sede?: StringWithAggregatesFilter<"Cliente"> | string
    sede_url?: StringWithAggregatesFilter<"Cliente"> | string
    contratto?: StringWithAggregatesFilter<"Cliente"> | string
    lat?: FloatWithAggregatesFilter<"Cliente"> | number
    lon?: FloatWithAggregatesFilter<"Cliente"> | number
  }

  export type InterventoCreateInput = {
    data: Date | string
    lavoro: string
    fattura: boolean
    registratore: RegistratoreCreateNestedOneWithoutInterventiInput
  }

  export type InterventoUncheckedCreateInput = {
    id?: number
    id_registratore: string
    data: Date | string
    lavoro: string
    fattura: boolean
  }

  export type InterventoUpdateInput = {
    data?: DateTimeFieldUpdateOperationsInput | Date | string
    lavoro?: StringFieldUpdateOperationsInput | string
    fattura?: BoolFieldUpdateOperationsInput | boolean
    registratore?: RegistratoreUpdateOneRequiredWithoutInterventiNestedInput
  }

  export type InterventoUncheckedUpdateInput = {
    id?: IntFieldUpdateOperationsInput | number
    id_registratore?: StringFieldUpdateOperationsInput | string
    data?: DateTimeFieldUpdateOperationsInput | Date | string
    lavoro?: StringFieldUpdateOperationsInput | string
    fattura?: BoolFieldUpdateOperationsInput | boolean
  }

  export type InterventoCreateManyInput = {
    id?: number
    id_registratore: string
    data: Date | string
    lavoro: string
    fattura: boolean
  }

  export type InterventoUpdateManyMutationInput = {
    data?: DateTimeFieldUpdateOperationsInput | Date | string
    lavoro?: StringFieldUpdateOperationsInput | string
    fattura?: BoolFieldUpdateOperationsInput | boolean
  }

  export type InterventoUncheckedUpdateManyInput = {
    id?: IntFieldUpdateOperationsInput | number
    id_registratore?: StringFieldUpdateOperationsInput | string
    data?: DateTimeFieldUpdateOperationsInput | Date | string
    lavoro?: StringFieldUpdateOperationsInput | string
    fattura?: BoolFieldUpdateOperationsInput | boolean
  }

  export type RegistratoreCreateInput = {
    id: string
    modello?: $Enums.Modello | null
    data_acquisto?: Date | string | null
    ultima_verifica?: Date | string | null
    prossima_verifica?: Date | string | null
    cliente: ClienteCreateNestedOneWithoutRegistratoriInput
    interventi?: InterventoCreateNestedManyWithoutRegistratoreInput
  }

  export type RegistratoreUncheckedCreateInput = {
    id: string
    id_cliente: number
    modello?: $Enums.Modello | null
    data_acquisto?: Date | string | null
    ultima_verifica?: Date | string | null
    prossima_verifica?: Date | string | null
    interventi?: InterventoUncheckedCreateNestedManyWithoutRegistratoreInput
  }

  export type RegistratoreUpdateInput = {
    id?: StringFieldUpdateOperationsInput | string
    modello?: NullableEnumModelloFieldUpdateOperationsInput | $Enums.Modello | null
    data_acquisto?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    ultima_verifica?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    prossima_verifica?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    cliente?: ClienteUpdateOneRequiredWithoutRegistratoriNestedInput
    interventi?: InterventoUpdateManyWithoutRegistratoreNestedInput
  }

  export type RegistratoreUncheckedUpdateInput = {
    id?: StringFieldUpdateOperationsInput | string
    id_cliente?: IntFieldUpdateOperationsInput | number
    modello?: NullableEnumModelloFieldUpdateOperationsInput | $Enums.Modello | null
    data_acquisto?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    ultima_verifica?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    prossima_verifica?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    interventi?: InterventoUncheckedUpdateManyWithoutRegistratoreNestedInput
  }

  export type RegistratoreCreateManyInput = {
    id: string
    id_cliente: number
    modello?: $Enums.Modello | null
    data_acquisto?: Date | string | null
    ultima_verifica?: Date | string | null
    prossima_verifica?: Date | string | null
  }

  export type RegistratoreUpdateManyMutationInput = {
    id?: StringFieldUpdateOperationsInput | string
    modello?: NullableEnumModelloFieldUpdateOperationsInput | $Enums.Modello | null
    data_acquisto?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    ultima_verifica?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    prossima_verifica?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  }

  export type RegistratoreUncheckedUpdateManyInput = {
    id?: StringFieldUpdateOperationsInput | string
    id_cliente?: IntFieldUpdateOperationsInput | number
    modello?: NullableEnumModelloFieldUpdateOperationsInput | $Enums.Modello | null
    data_acquisto?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    ultima_verifica?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    prossima_verifica?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  }

  export type ClienteCreateInput = {
    ragione_sociale: string
    email: string
    partita_iva: string
    telefono: string
    sede: string
    sede_url: string
    contratto: string
    lat: number
    lon: number
    registratori?: RegistratoreCreateNestedManyWithoutClienteInput
  }

  export type ClienteUncheckedCreateInput = {
    id?: number
    ragione_sociale: string
    email: string
    partita_iva: string
    telefono: string
    sede: string
    sede_url: string
    contratto: string
    lat: number
    lon: number
    registratori?: RegistratoreUncheckedCreateNestedManyWithoutClienteInput
  }

  export type ClienteUpdateInput = {
    ragione_sociale?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    partita_iva?: StringFieldUpdateOperationsInput | string
    telefono?: StringFieldUpdateOperationsInput | string
    sede?: StringFieldUpdateOperationsInput | string
    sede_url?: StringFieldUpdateOperationsInput | string
    contratto?: StringFieldUpdateOperationsInput | string
    lat?: FloatFieldUpdateOperationsInput | number
    lon?: FloatFieldUpdateOperationsInput | number
    registratori?: RegistratoreUpdateManyWithoutClienteNestedInput
  }

  export type ClienteUncheckedUpdateInput = {
    id?: IntFieldUpdateOperationsInput | number
    ragione_sociale?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    partita_iva?: StringFieldUpdateOperationsInput | string
    telefono?: StringFieldUpdateOperationsInput | string
    sede?: StringFieldUpdateOperationsInput | string
    sede_url?: StringFieldUpdateOperationsInput | string
    contratto?: StringFieldUpdateOperationsInput | string
    lat?: FloatFieldUpdateOperationsInput | number
    lon?: FloatFieldUpdateOperationsInput | number
    registratori?: RegistratoreUncheckedUpdateManyWithoutClienteNestedInput
  }

  export type ClienteCreateManyInput = {
    id?: number
    ragione_sociale: string
    email: string
    partita_iva: string
    telefono: string
    sede: string
    sede_url: string
    contratto: string
    lat: number
    lon: number
  }

  export type ClienteUpdateManyMutationInput = {
    ragione_sociale?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    partita_iva?: StringFieldUpdateOperationsInput | string
    telefono?: StringFieldUpdateOperationsInput | string
    sede?: StringFieldUpdateOperationsInput | string
    sede_url?: StringFieldUpdateOperationsInput | string
    contratto?: StringFieldUpdateOperationsInput | string
    lat?: FloatFieldUpdateOperationsInput | number
    lon?: FloatFieldUpdateOperationsInput | number
  }

  export type ClienteUncheckedUpdateManyInput = {
    id?: IntFieldUpdateOperationsInput | number
    ragione_sociale?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    partita_iva?: StringFieldUpdateOperationsInput | string
    telefono?: StringFieldUpdateOperationsInput | string
    sede?: StringFieldUpdateOperationsInput | string
    sede_url?: StringFieldUpdateOperationsInput | string
    contratto?: StringFieldUpdateOperationsInput | string
    lat?: FloatFieldUpdateOperationsInput | number
    lon?: FloatFieldUpdateOperationsInput | number
  }

  export type IntFilter<$PrismaModel = never> = {
    equals?: number | IntFieldRefInput<$PrismaModel>
    in?: number[] | ListIntFieldRefInput<$PrismaModel>
    notIn?: number[] | ListIntFieldRefInput<$PrismaModel>
    lt?: number | IntFieldRefInput<$PrismaModel>
    lte?: number | IntFieldRefInput<$PrismaModel>
    gt?: number | IntFieldRefInput<$PrismaModel>
    gte?: number | IntFieldRefInput<$PrismaModel>
    not?: NestedIntFilter<$PrismaModel> | number
  }

  export type StringFilter<$PrismaModel = never> = {
    equals?: string | StringFieldRefInput<$PrismaModel>
    in?: string[] | ListStringFieldRefInput<$PrismaModel>
    notIn?: string[] | ListStringFieldRefInput<$PrismaModel>
    lt?: string | StringFieldRefInput<$PrismaModel>
    lte?: string | StringFieldRefInput<$PrismaModel>
    gt?: string | StringFieldRefInput<$PrismaModel>
    gte?: string | StringFieldRefInput<$PrismaModel>
    contains?: string | StringFieldRefInput<$PrismaModel>
    startsWith?: string | StringFieldRefInput<$PrismaModel>
    endsWith?: string | StringFieldRefInput<$PrismaModel>
    mode?: QueryMode
    not?: NestedStringFilter<$PrismaModel> | string
  }

  export type DateTimeFilter<$PrismaModel = never> = {
    equals?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel>
    notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel>
    lt?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    lte?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    gt?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    gte?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    not?: NestedDateTimeFilter<$PrismaModel> | Date | string
  }

  export type BoolFilter<$PrismaModel = never> = {
    equals?: boolean | BooleanFieldRefInput<$PrismaModel>
    not?: NestedBoolFilter<$PrismaModel> | boolean
  }

  export type RegistratoreScalarRelationFilter = {
    is?: RegistratoreWhereInput
    isNot?: RegistratoreWhereInput
  }

  export type InterventoCountOrderByAggregateInput = {
    id?: SortOrder
    id_registratore?: SortOrder
    data?: SortOrder
    lavoro?: SortOrder
    fattura?: SortOrder
  }

  export type InterventoAvgOrderByAggregateInput = {
    id?: SortOrder
  }

  export type InterventoMaxOrderByAggregateInput = {
    id?: SortOrder
    id_registratore?: SortOrder
    data?: SortOrder
    lavoro?: SortOrder
    fattura?: SortOrder
  }

  export type InterventoMinOrderByAggregateInput = {
    id?: SortOrder
    id_registratore?: SortOrder
    data?: SortOrder
    lavoro?: SortOrder
    fattura?: SortOrder
  }

  export type InterventoSumOrderByAggregateInput = {
    id?: SortOrder
  }

  export type IntWithAggregatesFilter<$PrismaModel = never> = {
    equals?: number | IntFieldRefInput<$PrismaModel>
    in?: number[] | ListIntFieldRefInput<$PrismaModel>
    notIn?: number[] | ListIntFieldRefInput<$PrismaModel>
    lt?: number | IntFieldRefInput<$PrismaModel>
    lte?: number | IntFieldRefInput<$PrismaModel>
    gt?: number | IntFieldRefInput<$PrismaModel>
    gte?: number | IntFieldRefInput<$PrismaModel>
    not?: NestedIntWithAggregatesFilter<$PrismaModel> | number
    _count?: NestedIntFilter<$PrismaModel>
    _avg?: NestedFloatFilter<$PrismaModel>
    _sum?: NestedIntFilter<$PrismaModel>
    _min?: NestedIntFilter<$PrismaModel>
    _max?: NestedIntFilter<$PrismaModel>
  }

  export type StringWithAggregatesFilter<$PrismaModel = never> = {
    equals?: string | StringFieldRefInput<$PrismaModel>
    in?: string[] | ListStringFieldRefInput<$PrismaModel>
    notIn?: string[] | ListStringFieldRefInput<$PrismaModel>
    lt?: string | StringFieldRefInput<$PrismaModel>
    lte?: string | StringFieldRefInput<$PrismaModel>
    gt?: string | StringFieldRefInput<$PrismaModel>
    gte?: string | StringFieldRefInput<$PrismaModel>
    contains?: string | StringFieldRefInput<$PrismaModel>
    startsWith?: string | StringFieldRefInput<$PrismaModel>
    endsWith?: string | StringFieldRefInput<$PrismaModel>
    mode?: QueryMode
    not?: NestedStringWithAggregatesFilter<$PrismaModel> | string
    _count?: NestedIntFilter<$PrismaModel>
    _min?: NestedStringFilter<$PrismaModel>
    _max?: NestedStringFilter<$PrismaModel>
  }

  export type DateTimeWithAggregatesFilter<$PrismaModel = never> = {
    equals?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel>
    notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel>
    lt?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    lte?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    gt?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    gte?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    not?: NestedDateTimeWithAggregatesFilter<$PrismaModel> | Date | string
    _count?: NestedIntFilter<$PrismaModel>
    _min?: NestedDateTimeFilter<$PrismaModel>
    _max?: NestedDateTimeFilter<$PrismaModel>
  }

  export type BoolWithAggregatesFilter<$PrismaModel = never> = {
    equals?: boolean | BooleanFieldRefInput<$PrismaModel>
    not?: NestedBoolWithAggregatesFilter<$PrismaModel> | boolean
    _count?: NestedIntFilter<$PrismaModel>
    _min?: NestedBoolFilter<$PrismaModel>
    _max?: NestedBoolFilter<$PrismaModel>
  }

  export type EnumModelloNullableFilter<$PrismaModel = never> = {
    equals?: $Enums.Modello | EnumModelloFieldRefInput<$PrismaModel> | null
    in?: $Enums.Modello[] | ListEnumModelloFieldRefInput<$PrismaModel> | null
    notIn?: $Enums.Modello[] | ListEnumModelloFieldRefInput<$PrismaModel> | null
    not?: NestedEnumModelloNullableFilter<$PrismaModel> | $Enums.Modello | null
  }

  export type DateTimeNullableFilter<$PrismaModel = never> = {
    equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null
    in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null
    notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null
    lt?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    lte?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    gt?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    gte?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    not?: NestedDateTimeNullableFilter<$PrismaModel> | Date | string | null
  }

  export type ClienteScalarRelationFilter = {
    is?: ClienteWhereInput
    isNot?: ClienteWhereInput
  }

  export type InterventoListRelationFilter = {
    every?: InterventoWhereInput
    some?: InterventoWhereInput
    none?: InterventoWhereInput
  }

  export type SortOrderInput = {
    sort: SortOrder
    nulls?: NullsOrder
  }

  export type InterventoOrderByRelationAggregateInput = {
    _count?: SortOrder
  }

  export type RegistratoreCountOrderByAggregateInput = {
    id?: SortOrder
    id_cliente?: SortOrder
    modello?: SortOrder
    data_acquisto?: SortOrder
    ultima_verifica?: SortOrder
    prossima_verifica?: SortOrder
  }

  export type RegistratoreAvgOrderByAggregateInput = {
    id_cliente?: SortOrder
  }

  export type RegistratoreMaxOrderByAggregateInput = {
    id?: SortOrder
    id_cliente?: SortOrder
    modello?: SortOrder
    data_acquisto?: SortOrder
    ultima_verifica?: SortOrder
    prossima_verifica?: SortOrder
  }

  export type RegistratoreMinOrderByAggregateInput = {
    id?: SortOrder
    id_cliente?: SortOrder
    modello?: SortOrder
    data_acquisto?: SortOrder
    ultima_verifica?: SortOrder
    prossima_verifica?: SortOrder
  }

  export type RegistratoreSumOrderByAggregateInput = {
    id_cliente?: SortOrder
  }

  export type EnumModelloNullableWithAggregatesFilter<$PrismaModel = never> = {
    equals?: $Enums.Modello | EnumModelloFieldRefInput<$PrismaModel> | null
    in?: $Enums.Modello[] | ListEnumModelloFieldRefInput<$PrismaModel> | null
    notIn?: $Enums.Modello[] | ListEnumModelloFieldRefInput<$PrismaModel> | null
    not?: NestedEnumModelloNullableWithAggregatesFilter<$PrismaModel> | $Enums.Modello | null
    _count?: NestedIntNullableFilter<$PrismaModel>
    _min?: NestedEnumModelloNullableFilter<$PrismaModel>
    _max?: NestedEnumModelloNullableFilter<$PrismaModel>
  }

  export type DateTimeNullableWithAggregatesFilter<$PrismaModel = never> = {
    equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null
    in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null
    notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null
    lt?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    lte?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    gt?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    gte?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    not?: NestedDateTimeNullableWithAggregatesFilter<$PrismaModel> | Date | string | null
    _count?: NestedIntNullableFilter<$PrismaModel>
    _min?: NestedDateTimeNullableFilter<$PrismaModel>
    _max?: NestedDateTimeNullableFilter<$PrismaModel>
  }

  export type FloatFilter<$PrismaModel = never> = {
    equals?: number | FloatFieldRefInput<$PrismaModel>
    in?: number[] | ListFloatFieldRefInput<$PrismaModel>
    notIn?: number[] | ListFloatFieldRefInput<$PrismaModel>
    lt?: number | FloatFieldRefInput<$PrismaModel>
    lte?: number | FloatFieldRefInput<$PrismaModel>
    gt?: number | FloatFieldRefInput<$PrismaModel>
    gte?: number | FloatFieldRefInput<$PrismaModel>
    not?: NestedFloatFilter<$PrismaModel> | number
  }

  export type RegistratoreListRelationFilter = {
    every?: RegistratoreWhereInput
    some?: RegistratoreWhereInput
    none?: RegistratoreWhereInput
  }

  export type RegistratoreOrderByRelationAggregateInput = {
    _count?: SortOrder
  }

  export type ClienteCountOrderByAggregateInput = {
    id?: SortOrder
    ragione_sociale?: SortOrder
    email?: SortOrder
    partita_iva?: SortOrder
    telefono?: SortOrder
    sede?: SortOrder
    sede_url?: SortOrder
    contratto?: SortOrder
    lat?: SortOrder
    lon?: SortOrder
  }

  export type ClienteAvgOrderByAggregateInput = {
    id?: SortOrder
    lat?: SortOrder
    lon?: SortOrder
  }

  export type ClienteMaxOrderByAggregateInput = {
    id?: SortOrder
    ragione_sociale?: SortOrder
    email?: SortOrder
    partita_iva?: SortOrder
    telefono?: SortOrder
    sede?: SortOrder
    sede_url?: SortOrder
    contratto?: SortOrder
    lat?: SortOrder
    lon?: SortOrder
  }

  export type ClienteMinOrderByAggregateInput = {
    id?: SortOrder
    ragione_sociale?: SortOrder
    email?: SortOrder
    partita_iva?: SortOrder
    telefono?: SortOrder
    sede?: SortOrder
    sede_url?: SortOrder
    contratto?: SortOrder
    lat?: SortOrder
    lon?: SortOrder
  }

  export type ClienteSumOrderByAggregateInput = {
    id?: SortOrder
    lat?: SortOrder
    lon?: SortOrder
  }

  export type FloatWithAggregatesFilter<$PrismaModel = never> = {
    equals?: number | FloatFieldRefInput<$PrismaModel>
    in?: number[] | ListFloatFieldRefInput<$PrismaModel>
    notIn?: number[] | ListFloatFieldRefInput<$PrismaModel>
    lt?: number | FloatFieldRefInput<$PrismaModel>
    lte?: number | FloatFieldRefInput<$PrismaModel>
    gt?: number | FloatFieldRefInput<$PrismaModel>
    gte?: number | FloatFieldRefInput<$PrismaModel>
    not?: NestedFloatWithAggregatesFilter<$PrismaModel> | number
    _count?: NestedIntFilter<$PrismaModel>
    _avg?: NestedFloatFilter<$PrismaModel>
    _sum?: NestedFloatFilter<$PrismaModel>
    _min?: NestedFloatFilter<$PrismaModel>
    _max?: NestedFloatFilter<$PrismaModel>
  }

  export type RegistratoreCreateNestedOneWithoutInterventiInput = {
    create?: XOR<RegistratoreCreateWithoutInterventiInput, RegistratoreUncheckedCreateWithoutInterventiInput>
    connectOrCreate?: RegistratoreCreateOrConnectWithoutInterventiInput
    connect?: RegistratoreWhereUniqueInput
  }

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

  export type StringFieldUpdateOperationsInput = {
    set?: string
  }

  export type BoolFieldUpdateOperationsInput = {
    set?: boolean
  }

  export type RegistratoreUpdateOneRequiredWithoutInterventiNestedInput = {
    create?: XOR<RegistratoreCreateWithoutInterventiInput, RegistratoreUncheckedCreateWithoutInterventiInput>
    connectOrCreate?: RegistratoreCreateOrConnectWithoutInterventiInput
    upsert?: RegistratoreUpsertWithoutInterventiInput
    connect?: RegistratoreWhereUniqueInput
    update?: XOR<XOR<RegistratoreUpdateToOneWithWhereWithoutInterventiInput, RegistratoreUpdateWithoutInterventiInput>, RegistratoreUncheckedUpdateWithoutInterventiInput>
  }

  export type IntFieldUpdateOperationsInput = {
    set?: number
    increment?: number
    decrement?: number
    multiply?: number
    divide?: number
  }

  export type ClienteCreateNestedOneWithoutRegistratoriInput = {
    create?: XOR<ClienteCreateWithoutRegistratoriInput, ClienteUncheckedCreateWithoutRegistratoriInput>
    connectOrCreate?: ClienteCreateOrConnectWithoutRegistratoriInput
    connect?: ClienteWhereUniqueInput
  }

  export type InterventoCreateNestedManyWithoutRegistratoreInput = {
    create?: XOR<InterventoCreateWithoutRegistratoreInput, InterventoUncheckedCreateWithoutRegistratoreInput> | InterventoCreateWithoutRegistratoreInput[] | InterventoUncheckedCreateWithoutRegistratoreInput[]
    connectOrCreate?: InterventoCreateOrConnectWithoutRegistratoreInput | InterventoCreateOrConnectWithoutRegistratoreInput[]
    createMany?: InterventoCreateManyRegistratoreInputEnvelope
    connect?: InterventoWhereUniqueInput | InterventoWhereUniqueInput[]
  }

  export type InterventoUncheckedCreateNestedManyWithoutRegistratoreInput = {
    create?: XOR<InterventoCreateWithoutRegistratoreInput, InterventoUncheckedCreateWithoutRegistratoreInput> | InterventoCreateWithoutRegistratoreInput[] | InterventoUncheckedCreateWithoutRegistratoreInput[]
    connectOrCreate?: InterventoCreateOrConnectWithoutRegistratoreInput | InterventoCreateOrConnectWithoutRegistratoreInput[]
    createMany?: InterventoCreateManyRegistratoreInputEnvelope
    connect?: InterventoWhereUniqueInput | InterventoWhereUniqueInput[]
  }

  export type NullableEnumModelloFieldUpdateOperationsInput = {
    set?: $Enums.Modello | null
  }

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

  export type ClienteUpdateOneRequiredWithoutRegistratoriNestedInput = {
    create?: XOR<ClienteCreateWithoutRegistratoriInput, ClienteUncheckedCreateWithoutRegistratoriInput>
    connectOrCreate?: ClienteCreateOrConnectWithoutRegistratoriInput
    upsert?: ClienteUpsertWithoutRegistratoriInput
    connect?: ClienteWhereUniqueInput
    update?: XOR<XOR<ClienteUpdateToOneWithWhereWithoutRegistratoriInput, ClienteUpdateWithoutRegistratoriInput>, ClienteUncheckedUpdateWithoutRegistratoriInput>
  }

  export type InterventoUpdateManyWithoutRegistratoreNestedInput = {
    create?: XOR<InterventoCreateWithoutRegistratoreInput, InterventoUncheckedCreateWithoutRegistratoreInput> | InterventoCreateWithoutRegistratoreInput[] | InterventoUncheckedCreateWithoutRegistratoreInput[]
    connectOrCreate?: InterventoCreateOrConnectWithoutRegistratoreInput | InterventoCreateOrConnectWithoutRegistratoreInput[]
    upsert?: InterventoUpsertWithWhereUniqueWithoutRegistratoreInput | InterventoUpsertWithWhereUniqueWithoutRegistratoreInput[]
    createMany?: InterventoCreateManyRegistratoreInputEnvelope
    set?: InterventoWhereUniqueInput | InterventoWhereUniqueInput[]
    disconnect?: InterventoWhereUniqueInput | InterventoWhereUniqueInput[]
    delete?: InterventoWhereUniqueInput | InterventoWhereUniqueInput[]
    connect?: InterventoWhereUniqueInput | InterventoWhereUniqueInput[]
    update?: InterventoUpdateWithWhereUniqueWithoutRegistratoreInput | InterventoUpdateWithWhereUniqueWithoutRegistratoreInput[]
    updateMany?: InterventoUpdateManyWithWhereWithoutRegistratoreInput | InterventoUpdateManyWithWhereWithoutRegistratoreInput[]
    deleteMany?: InterventoScalarWhereInput | InterventoScalarWhereInput[]
  }

  export type InterventoUncheckedUpdateManyWithoutRegistratoreNestedInput = {
    create?: XOR<InterventoCreateWithoutRegistratoreInput, InterventoUncheckedCreateWithoutRegistratoreInput> | InterventoCreateWithoutRegistratoreInput[] | InterventoUncheckedCreateWithoutRegistratoreInput[]
    connectOrCreate?: InterventoCreateOrConnectWithoutRegistratoreInput | InterventoCreateOrConnectWithoutRegistratoreInput[]
    upsert?: InterventoUpsertWithWhereUniqueWithoutRegistratoreInput | InterventoUpsertWithWhereUniqueWithoutRegistratoreInput[]
    createMany?: InterventoCreateManyRegistratoreInputEnvelope
    set?: InterventoWhereUniqueInput | InterventoWhereUniqueInput[]
    disconnect?: InterventoWhereUniqueInput | InterventoWhereUniqueInput[]
    delete?: InterventoWhereUniqueInput | InterventoWhereUniqueInput[]
    connect?: InterventoWhereUniqueInput | InterventoWhereUniqueInput[]
    update?: InterventoUpdateWithWhereUniqueWithoutRegistratoreInput | InterventoUpdateWithWhereUniqueWithoutRegistratoreInput[]
    updateMany?: InterventoUpdateManyWithWhereWithoutRegistratoreInput | InterventoUpdateManyWithWhereWithoutRegistratoreInput[]
    deleteMany?: InterventoScalarWhereInput | InterventoScalarWhereInput[]
  }

  export type RegistratoreCreateNestedManyWithoutClienteInput = {
    create?: XOR<RegistratoreCreateWithoutClienteInput, RegistratoreUncheckedCreateWithoutClienteInput> | RegistratoreCreateWithoutClienteInput[] | RegistratoreUncheckedCreateWithoutClienteInput[]
    connectOrCreate?: RegistratoreCreateOrConnectWithoutClienteInput | RegistratoreCreateOrConnectWithoutClienteInput[]
    createMany?: RegistratoreCreateManyClienteInputEnvelope
    connect?: RegistratoreWhereUniqueInput | RegistratoreWhereUniqueInput[]
  }

  export type RegistratoreUncheckedCreateNestedManyWithoutClienteInput = {
    create?: XOR<RegistratoreCreateWithoutClienteInput, RegistratoreUncheckedCreateWithoutClienteInput> | RegistratoreCreateWithoutClienteInput[] | RegistratoreUncheckedCreateWithoutClienteInput[]
    connectOrCreate?: RegistratoreCreateOrConnectWithoutClienteInput | RegistratoreCreateOrConnectWithoutClienteInput[]
    createMany?: RegistratoreCreateManyClienteInputEnvelope
    connect?: RegistratoreWhereUniqueInput | RegistratoreWhereUniqueInput[]
  }

  export type FloatFieldUpdateOperationsInput = {
    set?: number
    increment?: number
    decrement?: number
    multiply?: number
    divide?: number
  }

  export type RegistratoreUpdateManyWithoutClienteNestedInput = {
    create?: XOR<RegistratoreCreateWithoutClienteInput, RegistratoreUncheckedCreateWithoutClienteInput> | RegistratoreCreateWithoutClienteInput[] | RegistratoreUncheckedCreateWithoutClienteInput[]
    connectOrCreate?: RegistratoreCreateOrConnectWithoutClienteInput | RegistratoreCreateOrConnectWithoutClienteInput[]
    upsert?: RegistratoreUpsertWithWhereUniqueWithoutClienteInput | RegistratoreUpsertWithWhereUniqueWithoutClienteInput[]
    createMany?: RegistratoreCreateManyClienteInputEnvelope
    set?: RegistratoreWhereUniqueInput | RegistratoreWhereUniqueInput[]
    disconnect?: RegistratoreWhereUniqueInput | RegistratoreWhereUniqueInput[]
    delete?: RegistratoreWhereUniqueInput | RegistratoreWhereUniqueInput[]
    connect?: RegistratoreWhereUniqueInput | RegistratoreWhereUniqueInput[]
    update?: RegistratoreUpdateWithWhereUniqueWithoutClienteInput | RegistratoreUpdateWithWhereUniqueWithoutClienteInput[]
    updateMany?: RegistratoreUpdateManyWithWhereWithoutClienteInput | RegistratoreUpdateManyWithWhereWithoutClienteInput[]
    deleteMany?: RegistratoreScalarWhereInput | RegistratoreScalarWhereInput[]
  }

  export type RegistratoreUncheckedUpdateManyWithoutClienteNestedInput = {
    create?: XOR<RegistratoreCreateWithoutClienteInput, RegistratoreUncheckedCreateWithoutClienteInput> | RegistratoreCreateWithoutClienteInput[] | RegistratoreUncheckedCreateWithoutClienteInput[]
    connectOrCreate?: RegistratoreCreateOrConnectWithoutClienteInput | RegistratoreCreateOrConnectWithoutClienteInput[]
    upsert?: RegistratoreUpsertWithWhereUniqueWithoutClienteInput | RegistratoreUpsertWithWhereUniqueWithoutClienteInput[]
    createMany?: RegistratoreCreateManyClienteInputEnvelope
    set?: RegistratoreWhereUniqueInput | RegistratoreWhereUniqueInput[]
    disconnect?: RegistratoreWhereUniqueInput | RegistratoreWhereUniqueInput[]
    delete?: RegistratoreWhereUniqueInput | RegistratoreWhereUniqueInput[]
    connect?: RegistratoreWhereUniqueInput | RegistratoreWhereUniqueInput[]
    update?: RegistratoreUpdateWithWhereUniqueWithoutClienteInput | RegistratoreUpdateWithWhereUniqueWithoutClienteInput[]
    updateMany?: RegistratoreUpdateManyWithWhereWithoutClienteInput | RegistratoreUpdateManyWithWhereWithoutClienteInput[]
    deleteMany?: RegistratoreScalarWhereInput | RegistratoreScalarWhereInput[]
  }

  export type NestedIntFilter<$PrismaModel = never> = {
    equals?: number | IntFieldRefInput<$PrismaModel>
    in?: number[] | ListIntFieldRefInput<$PrismaModel>
    notIn?: number[] | ListIntFieldRefInput<$PrismaModel>
    lt?: number | IntFieldRefInput<$PrismaModel>
    lte?: number | IntFieldRefInput<$PrismaModel>
    gt?: number | IntFieldRefInput<$PrismaModel>
    gte?: number | IntFieldRefInput<$PrismaModel>
    not?: NestedIntFilter<$PrismaModel> | number
  }

  export type NestedStringFilter<$PrismaModel = never> = {
    equals?: string | StringFieldRefInput<$PrismaModel>
    in?: string[] | ListStringFieldRefInput<$PrismaModel>
    notIn?: string[] | ListStringFieldRefInput<$PrismaModel>
    lt?: string | StringFieldRefInput<$PrismaModel>
    lte?: string | StringFieldRefInput<$PrismaModel>
    gt?: string | StringFieldRefInput<$PrismaModel>
    gte?: string | StringFieldRefInput<$PrismaModel>
    contains?: string | StringFieldRefInput<$PrismaModel>
    startsWith?: string | StringFieldRefInput<$PrismaModel>
    endsWith?: string | StringFieldRefInput<$PrismaModel>
    not?: NestedStringFilter<$PrismaModel> | string
  }

  export type NestedDateTimeFilter<$PrismaModel = never> = {
    equals?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel>
    notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel>
    lt?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    lte?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    gt?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    gte?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    not?: NestedDateTimeFilter<$PrismaModel> | Date | string
  }

  export type NestedBoolFilter<$PrismaModel = never> = {
    equals?: boolean | BooleanFieldRefInput<$PrismaModel>
    not?: NestedBoolFilter<$PrismaModel> | boolean
  }

  export type NestedIntWithAggregatesFilter<$PrismaModel = never> = {
    equals?: number | IntFieldRefInput<$PrismaModel>
    in?: number[] | ListIntFieldRefInput<$PrismaModel>
    notIn?: number[] | ListIntFieldRefInput<$PrismaModel>
    lt?: number | IntFieldRefInput<$PrismaModel>
    lte?: number | IntFieldRefInput<$PrismaModel>
    gt?: number | IntFieldRefInput<$PrismaModel>
    gte?: number | IntFieldRefInput<$PrismaModel>
    not?: NestedIntWithAggregatesFilter<$PrismaModel> | number
    _count?: NestedIntFilter<$PrismaModel>
    _avg?: NestedFloatFilter<$PrismaModel>
    _sum?: NestedIntFilter<$PrismaModel>
    _min?: NestedIntFilter<$PrismaModel>
    _max?: NestedIntFilter<$PrismaModel>
  }

  export type NestedFloatFilter<$PrismaModel = never> = {
    equals?: number | FloatFieldRefInput<$PrismaModel>
    in?: number[] | ListFloatFieldRefInput<$PrismaModel>
    notIn?: number[] | ListFloatFieldRefInput<$PrismaModel>
    lt?: number | FloatFieldRefInput<$PrismaModel>
    lte?: number | FloatFieldRefInput<$PrismaModel>
    gt?: number | FloatFieldRefInput<$PrismaModel>
    gte?: number | FloatFieldRefInput<$PrismaModel>
    not?: NestedFloatFilter<$PrismaModel> | number
  }

  export type NestedStringWithAggregatesFilter<$PrismaModel = never> = {
    equals?: string | StringFieldRefInput<$PrismaModel>
    in?: string[] | ListStringFieldRefInput<$PrismaModel>
    notIn?: string[] | ListStringFieldRefInput<$PrismaModel>
    lt?: string | StringFieldRefInput<$PrismaModel>
    lte?: string | StringFieldRefInput<$PrismaModel>
    gt?: string | StringFieldRefInput<$PrismaModel>
    gte?: string | StringFieldRefInput<$PrismaModel>
    contains?: string | StringFieldRefInput<$PrismaModel>
    startsWith?: string | StringFieldRefInput<$PrismaModel>
    endsWith?: string | StringFieldRefInput<$PrismaModel>
    not?: NestedStringWithAggregatesFilter<$PrismaModel> | string
    _count?: NestedIntFilter<$PrismaModel>
    _min?: NestedStringFilter<$PrismaModel>
    _max?: NestedStringFilter<$PrismaModel>
  }

  export type NestedDateTimeWithAggregatesFilter<$PrismaModel = never> = {
    equals?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel>
    notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel>
    lt?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    lte?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    gt?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    gte?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    not?: NestedDateTimeWithAggregatesFilter<$PrismaModel> | Date | string
    _count?: NestedIntFilter<$PrismaModel>
    _min?: NestedDateTimeFilter<$PrismaModel>
    _max?: NestedDateTimeFilter<$PrismaModel>
  }

  export type NestedBoolWithAggregatesFilter<$PrismaModel = never> = {
    equals?: boolean | BooleanFieldRefInput<$PrismaModel>
    not?: NestedBoolWithAggregatesFilter<$PrismaModel> | boolean
    _count?: NestedIntFilter<$PrismaModel>
    _min?: NestedBoolFilter<$PrismaModel>
    _max?: NestedBoolFilter<$PrismaModel>
  }

  export type NestedEnumModelloNullableFilter<$PrismaModel = never> = {
    equals?: $Enums.Modello | EnumModelloFieldRefInput<$PrismaModel> | null
    in?: $Enums.Modello[] | ListEnumModelloFieldRefInput<$PrismaModel> | null
    notIn?: $Enums.Modello[] | ListEnumModelloFieldRefInput<$PrismaModel> | null
    not?: NestedEnumModelloNullableFilter<$PrismaModel> | $Enums.Modello | null
  }

  export type NestedDateTimeNullableFilter<$PrismaModel = never> = {
    equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null
    in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null
    notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null
    lt?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    lte?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    gt?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    gte?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    not?: NestedDateTimeNullableFilter<$PrismaModel> | Date | string | null
  }

  export type NestedEnumModelloNullableWithAggregatesFilter<$PrismaModel = never> = {
    equals?: $Enums.Modello | EnumModelloFieldRefInput<$PrismaModel> | null
    in?: $Enums.Modello[] | ListEnumModelloFieldRefInput<$PrismaModel> | null
    notIn?: $Enums.Modello[] | ListEnumModelloFieldRefInput<$PrismaModel> | null
    not?: NestedEnumModelloNullableWithAggregatesFilter<$PrismaModel> | $Enums.Modello | null
    _count?: NestedIntNullableFilter<$PrismaModel>
    _min?: NestedEnumModelloNullableFilter<$PrismaModel>
    _max?: NestedEnumModelloNullableFilter<$PrismaModel>
  }

  export type NestedIntNullableFilter<$PrismaModel = never> = {
    equals?: number | IntFieldRefInput<$PrismaModel> | null
    in?: number[] | ListIntFieldRefInput<$PrismaModel> | null
    notIn?: number[] | ListIntFieldRefInput<$PrismaModel> | null
    lt?: number | IntFieldRefInput<$PrismaModel>
    lte?: number | IntFieldRefInput<$PrismaModel>
    gt?: number | IntFieldRefInput<$PrismaModel>
    gte?: number | IntFieldRefInput<$PrismaModel>
    not?: NestedIntNullableFilter<$PrismaModel> | number | null
  }

  export type NestedDateTimeNullableWithAggregatesFilter<$PrismaModel = never> = {
    equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null
    in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null
    notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null
    lt?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    lte?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    gt?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    gte?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    not?: NestedDateTimeNullableWithAggregatesFilter<$PrismaModel> | Date | string | null
    _count?: NestedIntNullableFilter<$PrismaModel>
    _min?: NestedDateTimeNullableFilter<$PrismaModel>
    _max?: NestedDateTimeNullableFilter<$PrismaModel>
  }

  export type NestedFloatWithAggregatesFilter<$PrismaModel = never> = {
    equals?: number | FloatFieldRefInput<$PrismaModel>
    in?: number[] | ListFloatFieldRefInput<$PrismaModel>
    notIn?: number[] | ListFloatFieldRefInput<$PrismaModel>
    lt?: number | FloatFieldRefInput<$PrismaModel>
    lte?: number | FloatFieldRefInput<$PrismaModel>
    gt?: number | FloatFieldRefInput<$PrismaModel>
    gte?: number | FloatFieldRefInput<$PrismaModel>
    not?: NestedFloatWithAggregatesFilter<$PrismaModel> | number
    _count?: NestedIntFilter<$PrismaModel>
    _avg?: NestedFloatFilter<$PrismaModel>
    _sum?: NestedFloatFilter<$PrismaModel>
    _min?: NestedFloatFilter<$PrismaModel>
    _max?: NestedFloatFilter<$PrismaModel>
  }

  export type RegistratoreCreateWithoutInterventiInput = {
    id: string
    modello?: $Enums.Modello | null
    data_acquisto?: Date | string | null
    ultima_verifica?: Date | string | null
    prossima_verifica?: Date | string | null
    cliente: ClienteCreateNestedOneWithoutRegistratoriInput
  }

  export type RegistratoreUncheckedCreateWithoutInterventiInput = {
    id: string
    id_cliente: number
    modello?: $Enums.Modello | null
    data_acquisto?: Date | string | null
    ultima_verifica?: Date | string | null
    prossima_verifica?: Date | string | null
  }

  export type RegistratoreCreateOrConnectWithoutInterventiInput = {
    where: RegistratoreWhereUniqueInput
    create: XOR<RegistratoreCreateWithoutInterventiInput, RegistratoreUncheckedCreateWithoutInterventiInput>
  }

  export type RegistratoreUpsertWithoutInterventiInput = {
    update: XOR<RegistratoreUpdateWithoutInterventiInput, RegistratoreUncheckedUpdateWithoutInterventiInput>
    create: XOR<RegistratoreCreateWithoutInterventiInput, RegistratoreUncheckedCreateWithoutInterventiInput>
    where?: RegistratoreWhereInput
  }

  export type RegistratoreUpdateToOneWithWhereWithoutInterventiInput = {
    where?: RegistratoreWhereInput
    data: XOR<RegistratoreUpdateWithoutInterventiInput, RegistratoreUncheckedUpdateWithoutInterventiInput>
  }

  export type RegistratoreUpdateWithoutInterventiInput = {
    id?: StringFieldUpdateOperationsInput | string
    modello?: NullableEnumModelloFieldUpdateOperationsInput | $Enums.Modello | null
    data_acquisto?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    ultima_verifica?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    prossima_verifica?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    cliente?: ClienteUpdateOneRequiredWithoutRegistratoriNestedInput
  }

  export type RegistratoreUncheckedUpdateWithoutInterventiInput = {
    id?: StringFieldUpdateOperationsInput | string
    id_cliente?: IntFieldUpdateOperationsInput | number
    modello?: NullableEnumModelloFieldUpdateOperationsInput | $Enums.Modello | null
    data_acquisto?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    ultima_verifica?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    prossima_verifica?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  }

  export type ClienteCreateWithoutRegistratoriInput = {
    ragione_sociale: string
    email: string
    partita_iva: string
    telefono: string
    sede: string
    sede_url: string
    contratto: string
    lat: number
    lon: number
  }

  export type ClienteUncheckedCreateWithoutRegistratoriInput = {
    id?: number
    ragione_sociale: string
    email: string
    partita_iva: string
    telefono: string
    sede: string
    sede_url: string
    contratto: string
    lat: number
    lon: number
  }

  export type ClienteCreateOrConnectWithoutRegistratoriInput = {
    where: ClienteWhereUniqueInput
    create: XOR<ClienteCreateWithoutRegistratoriInput, ClienteUncheckedCreateWithoutRegistratoriInput>
  }

  export type InterventoCreateWithoutRegistratoreInput = {
    data: Date | string
    lavoro: string
    fattura: boolean
  }

  export type InterventoUncheckedCreateWithoutRegistratoreInput = {
    id?: number
    data: Date | string
    lavoro: string
    fattura: boolean
  }

  export type InterventoCreateOrConnectWithoutRegistratoreInput = {
    where: InterventoWhereUniqueInput
    create: XOR<InterventoCreateWithoutRegistratoreInput, InterventoUncheckedCreateWithoutRegistratoreInput>
  }

  export type InterventoCreateManyRegistratoreInputEnvelope = {
    data: InterventoCreateManyRegistratoreInput | InterventoCreateManyRegistratoreInput[]
    skipDuplicates?: boolean
  }

  export type ClienteUpsertWithoutRegistratoriInput = {
    update: XOR<ClienteUpdateWithoutRegistratoriInput, ClienteUncheckedUpdateWithoutRegistratoriInput>
    create: XOR<ClienteCreateWithoutRegistratoriInput, ClienteUncheckedCreateWithoutRegistratoriInput>
    where?: ClienteWhereInput
  }

  export type ClienteUpdateToOneWithWhereWithoutRegistratoriInput = {
    where?: ClienteWhereInput
    data: XOR<ClienteUpdateWithoutRegistratoriInput, ClienteUncheckedUpdateWithoutRegistratoriInput>
  }

  export type ClienteUpdateWithoutRegistratoriInput = {
    ragione_sociale?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    partita_iva?: StringFieldUpdateOperationsInput | string
    telefono?: StringFieldUpdateOperationsInput | string
    sede?: StringFieldUpdateOperationsInput | string
    sede_url?: StringFieldUpdateOperationsInput | string
    contratto?: StringFieldUpdateOperationsInput | string
    lat?: FloatFieldUpdateOperationsInput | number
    lon?: FloatFieldUpdateOperationsInput | number
  }

  export type ClienteUncheckedUpdateWithoutRegistratoriInput = {
    id?: IntFieldUpdateOperationsInput | number
    ragione_sociale?: StringFieldUpdateOperationsInput | string
    email?: StringFieldUpdateOperationsInput | string
    partita_iva?: StringFieldUpdateOperationsInput | string
    telefono?: StringFieldUpdateOperationsInput | string
    sede?: StringFieldUpdateOperationsInput | string
    sede_url?: StringFieldUpdateOperationsInput | string
    contratto?: StringFieldUpdateOperationsInput | string
    lat?: FloatFieldUpdateOperationsInput | number
    lon?: FloatFieldUpdateOperationsInput | number
  }

  export type InterventoUpsertWithWhereUniqueWithoutRegistratoreInput = {
    where: InterventoWhereUniqueInput
    update: XOR<InterventoUpdateWithoutRegistratoreInput, InterventoUncheckedUpdateWithoutRegistratoreInput>
    create: XOR<InterventoCreateWithoutRegistratoreInput, InterventoUncheckedCreateWithoutRegistratoreInput>
  }

  export type InterventoUpdateWithWhereUniqueWithoutRegistratoreInput = {
    where: InterventoWhereUniqueInput
    data: XOR<InterventoUpdateWithoutRegistratoreInput, InterventoUncheckedUpdateWithoutRegistratoreInput>
  }

  export type InterventoUpdateManyWithWhereWithoutRegistratoreInput = {
    where: InterventoScalarWhereInput
    data: XOR<InterventoUpdateManyMutationInput, InterventoUncheckedUpdateManyWithoutRegistratoreInput>
  }

  export type InterventoScalarWhereInput = {
    AND?: InterventoScalarWhereInput | InterventoScalarWhereInput[]
    OR?: InterventoScalarWhereInput[]
    NOT?: InterventoScalarWhereInput | InterventoScalarWhereInput[]
    id?: IntFilter<"Intervento"> | number
    id_registratore?: StringFilter<"Intervento"> | string
    data?: DateTimeFilter<"Intervento"> | Date | string
    lavoro?: StringFilter<"Intervento"> | string
    fattura?: BoolFilter<"Intervento"> | boolean
  }

  export type RegistratoreCreateWithoutClienteInput = {
    id: string
    modello?: $Enums.Modello | null
    data_acquisto?: Date | string | null
    ultima_verifica?: Date | string | null
    prossima_verifica?: Date | string | null
    interventi?: InterventoCreateNestedManyWithoutRegistratoreInput
  }

  export type RegistratoreUncheckedCreateWithoutClienteInput = {
    id: string
    modello?: $Enums.Modello | null
    data_acquisto?: Date | string | null
    ultima_verifica?: Date | string | null
    prossima_verifica?: Date | string | null
    interventi?: InterventoUncheckedCreateNestedManyWithoutRegistratoreInput
  }

  export type RegistratoreCreateOrConnectWithoutClienteInput = {
    where: RegistratoreWhereUniqueInput
    create: XOR<RegistratoreCreateWithoutClienteInput, RegistratoreUncheckedCreateWithoutClienteInput>
  }

  export type RegistratoreCreateManyClienteInputEnvelope = {
    data: RegistratoreCreateManyClienteInput | RegistratoreCreateManyClienteInput[]
    skipDuplicates?: boolean
  }

  export type RegistratoreUpsertWithWhereUniqueWithoutClienteInput = {
    where: RegistratoreWhereUniqueInput
    update: XOR<RegistratoreUpdateWithoutClienteInput, RegistratoreUncheckedUpdateWithoutClienteInput>
    create: XOR<RegistratoreCreateWithoutClienteInput, RegistratoreUncheckedCreateWithoutClienteInput>
  }

  export type RegistratoreUpdateWithWhereUniqueWithoutClienteInput = {
    where: RegistratoreWhereUniqueInput
    data: XOR<RegistratoreUpdateWithoutClienteInput, RegistratoreUncheckedUpdateWithoutClienteInput>
  }

  export type RegistratoreUpdateManyWithWhereWithoutClienteInput = {
    where: RegistratoreScalarWhereInput
    data: XOR<RegistratoreUpdateManyMutationInput, RegistratoreUncheckedUpdateManyWithoutClienteInput>
  }

  export type RegistratoreScalarWhereInput = {
    AND?: RegistratoreScalarWhereInput | RegistratoreScalarWhereInput[]
    OR?: RegistratoreScalarWhereInput[]
    NOT?: RegistratoreScalarWhereInput | RegistratoreScalarWhereInput[]
    id?: StringFilter<"Registratore"> | string
    id_cliente?: IntFilter<"Registratore"> | number
    modello?: EnumModelloNullableFilter<"Registratore"> | $Enums.Modello | null
    data_acquisto?: DateTimeNullableFilter<"Registratore"> | Date | string | null
    ultima_verifica?: DateTimeNullableFilter<"Registratore"> | Date | string | null
    prossima_verifica?: DateTimeNullableFilter<"Registratore"> | Date | string | null
  }

  export type InterventoCreateManyRegistratoreInput = {
    id?: number
    data: Date | string
    lavoro: string
    fattura: boolean
  }

  export type InterventoUpdateWithoutRegistratoreInput = {
    data?: DateTimeFieldUpdateOperationsInput | Date | string
    lavoro?: StringFieldUpdateOperationsInput | string
    fattura?: BoolFieldUpdateOperationsInput | boolean
  }

  export type InterventoUncheckedUpdateWithoutRegistratoreInput = {
    id?: IntFieldUpdateOperationsInput | number
    data?: DateTimeFieldUpdateOperationsInput | Date | string
    lavoro?: StringFieldUpdateOperationsInput | string
    fattura?: BoolFieldUpdateOperationsInput | boolean
  }

  export type InterventoUncheckedUpdateManyWithoutRegistratoreInput = {
    id?: IntFieldUpdateOperationsInput | number
    data?: DateTimeFieldUpdateOperationsInput | Date | string
    lavoro?: StringFieldUpdateOperationsInput | string
    fattura?: BoolFieldUpdateOperationsInput | boolean
  }

  export type RegistratoreCreateManyClienteInput = {
    id: string
    modello?: $Enums.Modello | null
    data_acquisto?: Date | string | null
    ultima_verifica?: Date | string | null
    prossima_verifica?: Date | string | null
  }

  export type RegistratoreUpdateWithoutClienteInput = {
    id?: StringFieldUpdateOperationsInput | string
    modello?: NullableEnumModelloFieldUpdateOperationsInput | $Enums.Modello | null
    data_acquisto?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    ultima_verifica?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    prossima_verifica?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    interventi?: InterventoUpdateManyWithoutRegistratoreNestedInput
  }

  export type RegistratoreUncheckedUpdateWithoutClienteInput = {
    id?: StringFieldUpdateOperationsInput | string
    modello?: NullableEnumModelloFieldUpdateOperationsInput | $Enums.Modello | null
    data_acquisto?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    ultima_verifica?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    prossima_verifica?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    interventi?: InterventoUncheckedUpdateManyWithoutRegistratoreNestedInput
  }

  export type RegistratoreUncheckedUpdateManyWithoutClienteInput = {
    id?: StringFieldUpdateOperationsInput | string
    modello?: NullableEnumModelloFieldUpdateOperationsInput | $Enums.Modello | null
    data_acquisto?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    ultima_verifica?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    prossima_verifica?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  }



  /**
   * Batch Payload for updateMany & deleteMany & createMany
   */

  export type BatchPayload = {
    count: number
  }

  /**
   * DMMF
   */
  export const dmmf: runtime.BaseDMMF
}