
/**
 * Client
**/

import * as runtime from '@prisma/client/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 Meeting
 * 
 */
export type Meeting = $Result.DefaultSelection<Prisma.$MeetingPayload>
/**
 * Model Race
 * 
 */
export type Race = $Result.DefaultSelection<Prisma.$RacePayload>
/**
 * Model Horse
 * 
 */
export type Horse = $Result.DefaultSelection<Prisma.$HorsePayload>
/**
 * Model Runner
 * 
 */
export type Runner = $Result.DefaultSelection<Prisma.$RunnerPayload>
/**
 * Model Result
 * 
 */
export type Result = $Result.DefaultSelection<Prisma.$ResultPayload>
/**
 * Model Scrape
 * 
 */
export type Scrape = $Result.DefaultSelection<Prisma.$ScrapePayload>
/**
 * Model JobRun
 * 
 */
export type JobRun = $Result.DefaultSelection<Prisma.$JobRunPayload>
/**
 * Model Dividend
 * 
 */
export type Dividend = $Result.DefaultSelection<Prisma.$DividendPayload>
/**
 * Model OddsSnapshot
 * 
 */
export type OddsSnapshot = $Result.DefaultSelection<Prisma.$OddsSnapshotPayload>

/**
 * ##  Prisma Client ʲˢ
 * 
 * Type-safe database client for TypeScript & Node.js
 * @example
 * ```
 * const prisma = new PrismaClient()
 * // Fetch zero or more Meetings
 * const meetings = await prisma.meeting.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,
  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 Meetings
   * const meetings = await prisma.meeting.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): void;

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

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

  /**
   * Add a middleware
   * @deprecated since 4.16.0. For new code, prefer client extensions instead.
   * @see https://pris.ly/d/extensions
   */
  $use(cb: Prisma.Middleware): 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, ExtArgs>

      /**
   * `prisma.meeting`: Exposes CRUD operations for the **Meeting** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more Meetings
    * const meetings = await prisma.meeting.findMany()
    * ```
    */
  get meeting(): Prisma.MeetingDelegate<ExtArgs>;

  /**
   * `prisma.race`: Exposes CRUD operations for the **Race** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more Races
    * const races = await prisma.race.findMany()
    * ```
    */
  get race(): Prisma.RaceDelegate<ExtArgs>;

  /**
   * `prisma.horse`: Exposes CRUD operations for the **Horse** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more Horses
    * const horses = await prisma.horse.findMany()
    * ```
    */
  get horse(): Prisma.HorseDelegate<ExtArgs>;

  /**
   * `prisma.runner`: Exposes CRUD operations for the **Runner** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more Runners
    * const runners = await prisma.runner.findMany()
    * ```
    */
  get runner(): Prisma.RunnerDelegate<ExtArgs>;

  /**
   * `prisma.result`: Exposes CRUD operations for the **Result** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more Results
    * const results = await prisma.result.findMany()
    * ```
    */
  get result(): Prisma.ResultDelegate<ExtArgs>;

  /**
   * `prisma.scrape`: Exposes CRUD operations for the **Scrape** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more Scrapes
    * const scrapes = await prisma.scrape.findMany()
    * ```
    */
  get scrape(): Prisma.ScrapeDelegate<ExtArgs>;

  /**
   * `prisma.jobRun`: Exposes CRUD operations for the **JobRun** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more JobRuns
    * const jobRuns = await prisma.jobRun.findMany()
    * ```
    */
  get jobRun(): Prisma.JobRunDelegate<ExtArgs>;

  /**
   * `prisma.dividend`: Exposes CRUD operations for the **Dividend** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more Dividends
    * const dividends = await prisma.dividend.findMany()
    * ```
    */
  get dividend(): Prisma.DividendDelegate<ExtArgs>;

  /**
   * `prisma.oddsSnapshot`: Exposes CRUD operations for the **OddsSnapshot** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more OddsSnapshots
    * const oddsSnapshots = await prisma.oddsSnapshot.findMany()
    * ```
    */
  get oddsSnapshot(): Prisma.OddsSnapshotDelegate<ExtArgs>;
}

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
  export import NotFoundError = runtime.NotFoundError

  /**
   * 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: 5.22.0
   * Query Engine version: 605197351a3c8bdd595af2d2a9bc3025bca48ea2
   */
  export type PrismaVersion = {
    client: string
  }

  export const prismaVersion: PrismaVersion 

  /**
   * Utility Types
   */


  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 ? K : 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: {
    Meeting: 'Meeting',
    Race: 'Race',
    Horse: 'Horse',
    Runner: 'Runner',
    Result: 'Result',
    Scrape: 'Scrape',
    JobRun: 'JobRun',
    Dividend: 'Dividend',
    OddsSnapshot: 'OddsSnapshot'
  };

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


  export type Datasources = {
    db?: Datasource
  }

  interface TypeMapCb extends $Utils.Fn<{extArgs: $Extensions.InternalArgs, clientOptions: PrismaClientOptions }, $Utils.Record<string, any>> {
    returns: Prisma.TypeMap<this['params']['extArgs'], this['params']['clientOptions']>
  }

  export type TypeMap<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, ClientOptions = {}> = {
    meta: {
      modelProps: "meeting" | "race" | "horse" | "runner" | "result" | "scrape" | "jobRun" | "dividend" | "oddsSnapshot"
      txIsolationLevel: Prisma.TransactionIsolationLevel
    }
    model: {
      Meeting: {
        payload: Prisma.$MeetingPayload<ExtArgs>
        fields: Prisma.MeetingFieldRefs
        operations: {
          findUnique: {
            args: Prisma.MeetingFindUniqueArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$MeetingPayload> | null
          }
          findUniqueOrThrow: {
            args: Prisma.MeetingFindUniqueOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$MeetingPayload>
          }
          findFirst: {
            args: Prisma.MeetingFindFirstArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$MeetingPayload> | null
          }
          findFirstOrThrow: {
            args: Prisma.MeetingFindFirstOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$MeetingPayload>
          }
          findMany: {
            args: Prisma.MeetingFindManyArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$MeetingPayload>[]
          }
          create: {
            args: Prisma.MeetingCreateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$MeetingPayload>
          }
          createMany: {
            args: Prisma.MeetingCreateManyArgs<ExtArgs>
            result: BatchPayload
          }
          createManyAndReturn: {
            args: Prisma.MeetingCreateManyAndReturnArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$MeetingPayload>[]
          }
          delete: {
            args: Prisma.MeetingDeleteArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$MeetingPayload>
          }
          update: {
            args: Prisma.MeetingUpdateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$MeetingPayload>
          }
          deleteMany: {
            args: Prisma.MeetingDeleteManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateMany: {
            args: Prisma.MeetingUpdateManyArgs<ExtArgs>
            result: BatchPayload
          }
          upsert: {
            args: Prisma.MeetingUpsertArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$MeetingPayload>
          }
          aggregate: {
            args: Prisma.MeetingAggregateArgs<ExtArgs>
            result: $Utils.Optional<AggregateMeeting>
          }
          groupBy: {
            args: Prisma.MeetingGroupByArgs<ExtArgs>
            result: $Utils.Optional<MeetingGroupByOutputType>[]
          }
          count: {
            args: Prisma.MeetingCountArgs<ExtArgs>
            result: $Utils.Optional<MeetingCountAggregateOutputType> | number
          }
        }
      }
      Race: {
        payload: Prisma.$RacePayload<ExtArgs>
        fields: Prisma.RaceFieldRefs
        operations: {
          findUnique: {
            args: Prisma.RaceFindUniqueArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RacePayload> | null
          }
          findUniqueOrThrow: {
            args: Prisma.RaceFindUniqueOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RacePayload>
          }
          findFirst: {
            args: Prisma.RaceFindFirstArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RacePayload> | null
          }
          findFirstOrThrow: {
            args: Prisma.RaceFindFirstOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RacePayload>
          }
          findMany: {
            args: Prisma.RaceFindManyArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RacePayload>[]
          }
          create: {
            args: Prisma.RaceCreateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RacePayload>
          }
          createMany: {
            args: Prisma.RaceCreateManyArgs<ExtArgs>
            result: BatchPayload
          }
          createManyAndReturn: {
            args: Prisma.RaceCreateManyAndReturnArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RacePayload>[]
          }
          delete: {
            args: Prisma.RaceDeleteArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RacePayload>
          }
          update: {
            args: Prisma.RaceUpdateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RacePayload>
          }
          deleteMany: {
            args: Prisma.RaceDeleteManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateMany: {
            args: Prisma.RaceUpdateManyArgs<ExtArgs>
            result: BatchPayload
          }
          upsert: {
            args: Prisma.RaceUpsertArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RacePayload>
          }
          aggregate: {
            args: Prisma.RaceAggregateArgs<ExtArgs>
            result: $Utils.Optional<AggregateRace>
          }
          groupBy: {
            args: Prisma.RaceGroupByArgs<ExtArgs>
            result: $Utils.Optional<RaceGroupByOutputType>[]
          }
          count: {
            args: Prisma.RaceCountArgs<ExtArgs>
            result: $Utils.Optional<RaceCountAggregateOutputType> | number
          }
        }
      }
      Horse: {
        payload: Prisma.$HorsePayload<ExtArgs>
        fields: Prisma.HorseFieldRefs
        operations: {
          findUnique: {
            args: Prisma.HorseFindUniqueArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$HorsePayload> | null
          }
          findUniqueOrThrow: {
            args: Prisma.HorseFindUniqueOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$HorsePayload>
          }
          findFirst: {
            args: Prisma.HorseFindFirstArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$HorsePayload> | null
          }
          findFirstOrThrow: {
            args: Prisma.HorseFindFirstOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$HorsePayload>
          }
          findMany: {
            args: Prisma.HorseFindManyArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$HorsePayload>[]
          }
          create: {
            args: Prisma.HorseCreateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$HorsePayload>
          }
          createMany: {
            args: Prisma.HorseCreateManyArgs<ExtArgs>
            result: BatchPayload
          }
          createManyAndReturn: {
            args: Prisma.HorseCreateManyAndReturnArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$HorsePayload>[]
          }
          delete: {
            args: Prisma.HorseDeleteArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$HorsePayload>
          }
          update: {
            args: Prisma.HorseUpdateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$HorsePayload>
          }
          deleteMany: {
            args: Prisma.HorseDeleteManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateMany: {
            args: Prisma.HorseUpdateManyArgs<ExtArgs>
            result: BatchPayload
          }
          upsert: {
            args: Prisma.HorseUpsertArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$HorsePayload>
          }
          aggregate: {
            args: Prisma.HorseAggregateArgs<ExtArgs>
            result: $Utils.Optional<AggregateHorse>
          }
          groupBy: {
            args: Prisma.HorseGroupByArgs<ExtArgs>
            result: $Utils.Optional<HorseGroupByOutputType>[]
          }
          count: {
            args: Prisma.HorseCountArgs<ExtArgs>
            result: $Utils.Optional<HorseCountAggregateOutputType> | number
          }
        }
      }
      Runner: {
        payload: Prisma.$RunnerPayload<ExtArgs>
        fields: Prisma.RunnerFieldRefs
        operations: {
          findUnique: {
            args: Prisma.RunnerFindUniqueArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RunnerPayload> | null
          }
          findUniqueOrThrow: {
            args: Prisma.RunnerFindUniqueOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RunnerPayload>
          }
          findFirst: {
            args: Prisma.RunnerFindFirstArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RunnerPayload> | null
          }
          findFirstOrThrow: {
            args: Prisma.RunnerFindFirstOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RunnerPayload>
          }
          findMany: {
            args: Prisma.RunnerFindManyArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RunnerPayload>[]
          }
          create: {
            args: Prisma.RunnerCreateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RunnerPayload>
          }
          createMany: {
            args: Prisma.RunnerCreateManyArgs<ExtArgs>
            result: BatchPayload
          }
          createManyAndReturn: {
            args: Prisma.RunnerCreateManyAndReturnArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RunnerPayload>[]
          }
          delete: {
            args: Prisma.RunnerDeleteArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RunnerPayload>
          }
          update: {
            args: Prisma.RunnerUpdateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RunnerPayload>
          }
          deleteMany: {
            args: Prisma.RunnerDeleteManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateMany: {
            args: Prisma.RunnerUpdateManyArgs<ExtArgs>
            result: BatchPayload
          }
          upsert: {
            args: Prisma.RunnerUpsertArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$RunnerPayload>
          }
          aggregate: {
            args: Prisma.RunnerAggregateArgs<ExtArgs>
            result: $Utils.Optional<AggregateRunner>
          }
          groupBy: {
            args: Prisma.RunnerGroupByArgs<ExtArgs>
            result: $Utils.Optional<RunnerGroupByOutputType>[]
          }
          count: {
            args: Prisma.RunnerCountArgs<ExtArgs>
            result: $Utils.Optional<RunnerCountAggregateOutputType> | number
          }
        }
      }
      Result: {
        payload: Prisma.$ResultPayload<ExtArgs>
        fields: Prisma.ResultFieldRefs
        operations: {
          findUnique: {
            args: Prisma.ResultFindUniqueArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ResultPayload> | null
          }
          findUniqueOrThrow: {
            args: Prisma.ResultFindUniqueOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ResultPayload>
          }
          findFirst: {
            args: Prisma.ResultFindFirstArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ResultPayload> | null
          }
          findFirstOrThrow: {
            args: Prisma.ResultFindFirstOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ResultPayload>
          }
          findMany: {
            args: Prisma.ResultFindManyArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ResultPayload>[]
          }
          create: {
            args: Prisma.ResultCreateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ResultPayload>
          }
          createMany: {
            args: Prisma.ResultCreateManyArgs<ExtArgs>
            result: BatchPayload
          }
          createManyAndReturn: {
            args: Prisma.ResultCreateManyAndReturnArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ResultPayload>[]
          }
          delete: {
            args: Prisma.ResultDeleteArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ResultPayload>
          }
          update: {
            args: Prisma.ResultUpdateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ResultPayload>
          }
          deleteMany: {
            args: Prisma.ResultDeleteManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateMany: {
            args: Prisma.ResultUpdateManyArgs<ExtArgs>
            result: BatchPayload
          }
          upsert: {
            args: Prisma.ResultUpsertArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ResultPayload>
          }
          aggregate: {
            args: Prisma.ResultAggregateArgs<ExtArgs>
            result: $Utils.Optional<AggregateResult>
          }
          groupBy: {
            args: Prisma.ResultGroupByArgs<ExtArgs>
            result: $Utils.Optional<ResultGroupByOutputType>[]
          }
          count: {
            args: Prisma.ResultCountArgs<ExtArgs>
            result: $Utils.Optional<ResultCountAggregateOutputType> | number
          }
        }
      }
      Scrape: {
        payload: Prisma.$ScrapePayload<ExtArgs>
        fields: Prisma.ScrapeFieldRefs
        operations: {
          findUnique: {
            args: Prisma.ScrapeFindUniqueArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ScrapePayload> | null
          }
          findUniqueOrThrow: {
            args: Prisma.ScrapeFindUniqueOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ScrapePayload>
          }
          findFirst: {
            args: Prisma.ScrapeFindFirstArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ScrapePayload> | null
          }
          findFirstOrThrow: {
            args: Prisma.ScrapeFindFirstOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ScrapePayload>
          }
          findMany: {
            args: Prisma.ScrapeFindManyArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ScrapePayload>[]
          }
          create: {
            args: Prisma.ScrapeCreateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ScrapePayload>
          }
          createMany: {
            args: Prisma.ScrapeCreateManyArgs<ExtArgs>
            result: BatchPayload
          }
          createManyAndReturn: {
            args: Prisma.ScrapeCreateManyAndReturnArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ScrapePayload>[]
          }
          delete: {
            args: Prisma.ScrapeDeleteArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ScrapePayload>
          }
          update: {
            args: Prisma.ScrapeUpdateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ScrapePayload>
          }
          deleteMany: {
            args: Prisma.ScrapeDeleteManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateMany: {
            args: Prisma.ScrapeUpdateManyArgs<ExtArgs>
            result: BatchPayload
          }
          upsert: {
            args: Prisma.ScrapeUpsertArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ScrapePayload>
          }
          aggregate: {
            args: Prisma.ScrapeAggregateArgs<ExtArgs>
            result: $Utils.Optional<AggregateScrape>
          }
          groupBy: {
            args: Prisma.ScrapeGroupByArgs<ExtArgs>
            result: $Utils.Optional<ScrapeGroupByOutputType>[]
          }
          count: {
            args: Prisma.ScrapeCountArgs<ExtArgs>
            result: $Utils.Optional<ScrapeCountAggregateOutputType> | number
          }
        }
      }
      JobRun: {
        payload: Prisma.$JobRunPayload<ExtArgs>
        fields: Prisma.JobRunFieldRefs
        operations: {
          findUnique: {
            args: Prisma.JobRunFindUniqueArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$JobRunPayload> | null
          }
          findUniqueOrThrow: {
            args: Prisma.JobRunFindUniqueOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$JobRunPayload>
          }
          findFirst: {
            args: Prisma.JobRunFindFirstArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$JobRunPayload> | null
          }
          findFirstOrThrow: {
            args: Prisma.JobRunFindFirstOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$JobRunPayload>
          }
          findMany: {
            args: Prisma.JobRunFindManyArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$JobRunPayload>[]
          }
          create: {
            args: Prisma.JobRunCreateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$JobRunPayload>
          }
          createMany: {
            args: Prisma.JobRunCreateManyArgs<ExtArgs>
            result: BatchPayload
          }
          createManyAndReturn: {
            args: Prisma.JobRunCreateManyAndReturnArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$JobRunPayload>[]
          }
          delete: {
            args: Prisma.JobRunDeleteArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$JobRunPayload>
          }
          update: {
            args: Prisma.JobRunUpdateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$JobRunPayload>
          }
          deleteMany: {
            args: Prisma.JobRunDeleteManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateMany: {
            args: Prisma.JobRunUpdateManyArgs<ExtArgs>
            result: BatchPayload
          }
          upsert: {
            args: Prisma.JobRunUpsertArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$JobRunPayload>
          }
          aggregate: {
            args: Prisma.JobRunAggregateArgs<ExtArgs>
            result: $Utils.Optional<AggregateJobRun>
          }
          groupBy: {
            args: Prisma.JobRunGroupByArgs<ExtArgs>
            result: $Utils.Optional<JobRunGroupByOutputType>[]
          }
          count: {
            args: Prisma.JobRunCountArgs<ExtArgs>
            result: $Utils.Optional<JobRunCountAggregateOutputType> | number
          }
        }
      }
      Dividend: {
        payload: Prisma.$DividendPayload<ExtArgs>
        fields: Prisma.DividendFieldRefs
        operations: {
          findUnique: {
            args: Prisma.DividendFindUniqueArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$DividendPayload> | null
          }
          findUniqueOrThrow: {
            args: Prisma.DividendFindUniqueOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$DividendPayload>
          }
          findFirst: {
            args: Prisma.DividendFindFirstArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$DividendPayload> | null
          }
          findFirstOrThrow: {
            args: Prisma.DividendFindFirstOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$DividendPayload>
          }
          findMany: {
            args: Prisma.DividendFindManyArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$DividendPayload>[]
          }
          create: {
            args: Prisma.DividendCreateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$DividendPayload>
          }
          createMany: {
            args: Prisma.DividendCreateManyArgs<ExtArgs>
            result: BatchPayload
          }
          createManyAndReturn: {
            args: Prisma.DividendCreateManyAndReturnArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$DividendPayload>[]
          }
          delete: {
            args: Prisma.DividendDeleteArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$DividendPayload>
          }
          update: {
            args: Prisma.DividendUpdateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$DividendPayload>
          }
          deleteMany: {
            args: Prisma.DividendDeleteManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateMany: {
            args: Prisma.DividendUpdateManyArgs<ExtArgs>
            result: BatchPayload
          }
          upsert: {
            args: Prisma.DividendUpsertArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$DividendPayload>
          }
          aggregate: {
            args: Prisma.DividendAggregateArgs<ExtArgs>
            result: $Utils.Optional<AggregateDividend>
          }
          groupBy: {
            args: Prisma.DividendGroupByArgs<ExtArgs>
            result: $Utils.Optional<DividendGroupByOutputType>[]
          }
          count: {
            args: Prisma.DividendCountArgs<ExtArgs>
            result: $Utils.Optional<DividendCountAggregateOutputType> | number
          }
        }
      }
      OddsSnapshot: {
        payload: Prisma.$OddsSnapshotPayload<ExtArgs>
        fields: Prisma.OddsSnapshotFieldRefs
        operations: {
          findUnique: {
            args: Prisma.OddsSnapshotFindUniqueArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$OddsSnapshotPayload> | null
          }
          findUniqueOrThrow: {
            args: Prisma.OddsSnapshotFindUniqueOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$OddsSnapshotPayload>
          }
          findFirst: {
            args: Prisma.OddsSnapshotFindFirstArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$OddsSnapshotPayload> | null
          }
          findFirstOrThrow: {
            args: Prisma.OddsSnapshotFindFirstOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$OddsSnapshotPayload>
          }
          findMany: {
            args: Prisma.OddsSnapshotFindManyArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$OddsSnapshotPayload>[]
          }
          create: {
            args: Prisma.OddsSnapshotCreateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$OddsSnapshotPayload>
          }
          createMany: {
            args: Prisma.OddsSnapshotCreateManyArgs<ExtArgs>
            result: BatchPayload
          }
          createManyAndReturn: {
            args: Prisma.OddsSnapshotCreateManyAndReturnArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$OddsSnapshotPayload>[]
          }
          delete: {
            args: Prisma.OddsSnapshotDeleteArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$OddsSnapshotPayload>
          }
          update: {
            args: Prisma.OddsSnapshotUpdateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$OddsSnapshotPayload>
          }
          deleteMany: {
            args: Prisma.OddsSnapshotDeleteManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateMany: {
            args: Prisma.OddsSnapshotUpdateManyArgs<ExtArgs>
            result: BatchPayload
          }
          upsert: {
            args: Prisma.OddsSnapshotUpsertArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$OddsSnapshotPayload>
          }
          aggregate: {
            args: Prisma.OddsSnapshotAggregateArgs<ExtArgs>
            result: $Utils.Optional<AggregateOddsSnapshot>
          }
          groupBy: {
            args: Prisma.OddsSnapshotGroupByArgs<ExtArgs>
            result: $Utils.Optional<OddsSnapshotGroupByOutputType>[]
          }
          count: {
            args: Prisma.OddsSnapshotCountArgs<ExtArgs>
            result: $Utils.Optional<OddsSnapshotCountAggregateOutputType> | 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
     * ```
     * // Defaults to stdout
     * log: ['query', 'info', 'warn', 'error']
     * 
     * // Emit as events
     * log: [
     *   { 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
    }
  }


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

  export type GetLogType<T extends LogLevel | LogDefinition> = T extends LogDefinition ? T['emit'] extends 'event' ? T['level'] : never : never
  export type GetEvents<T extends any> = T extends Array<LogLevel | LogDefinition> ?
    GetLogType<T[0]> | GetLogType<T[1]> | GetLogType<T[2]> | GetLogType<T[3]>
    : 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'
    | 'upsert'
    | 'delete'
    | 'deleteMany'
    | 'executeRaw'
    | 'queryRaw'
    | 'aggregate'
    | 'count'
    | 'runCommandRaw'
    | 'findRaw'
    | 'groupBy'

  /**
   * These options are being passed into the middleware as "params"
   */
  export type MiddlewareParams = {
    model?: ModelName
    action: PrismaAction
    args: any
    dataPath: string[]
    runInTransaction: boolean
  }

  /**
   * The `T` type makes sure, that the `return proceed` is not forgotten in the middleware implementation
   */
  export type Middleware<T = any> = (
    params: MiddlewareParams,
    next: (params: MiddlewareParams) => $Utils.JsPromise<T>,
  ) => $Utils.JsPromise<T>

  // 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 MeetingCountOutputType
   */

  export type MeetingCountOutputType = {
    races: number
  }

  export type MeetingCountOutputTypeSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    races?: boolean | MeetingCountOutputTypeCountRacesArgs
  }

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

  /**
   * MeetingCountOutputType without action
   */
  export type MeetingCountOutputTypeCountRacesArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: RaceWhereInput
  }


  /**
   * Count Type RaceCountOutputType
   */

  export type RaceCountOutputType = {
    runners: number
    scrapes: number
    results: number
    dividends: number
  }

  export type RaceCountOutputTypeSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    runners?: boolean | RaceCountOutputTypeCountRunnersArgs
    scrapes?: boolean | RaceCountOutputTypeCountScrapesArgs
    results?: boolean | RaceCountOutputTypeCountResultsArgs
    dividends?: boolean | RaceCountOutputTypeCountDividendsArgs
  }

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

  /**
   * RaceCountOutputType without action
   */
  export type RaceCountOutputTypeCountRunnersArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: RunnerWhereInput
  }

  /**
   * RaceCountOutputType without action
   */
  export type RaceCountOutputTypeCountScrapesArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: ScrapeWhereInput
  }

  /**
   * RaceCountOutputType without action
   */
  export type RaceCountOutputTypeCountResultsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: ResultWhereInput
  }

  /**
   * RaceCountOutputType without action
   */
  export type RaceCountOutputTypeCountDividendsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: DividendWhereInput
  }


  /**
   * Count Type HorseCountOutputType
   */

  export type HorseCountOutputType = {
    runners: number
  }

  export type HorseCountOutputTypeSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    runners?: boolean | HorseCountOutputTypeCountRunnersArgs
  }

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

  /**
   * HorseCountOutputType without action
   */
  export type HorseCountOutputTypeCountRunnersArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: RunnerWhereInput
  }


  /**
   * Count Type RunnerCountOutputType
   */

  export type RunnerCountOutputType = {
    results: number
    oddsSnapshots: number
  }

  export type RunnerCountOutputTypeSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    results?: boolean | RunnerCountOutputTypeCountResultsArgs
    oddsSnapshots?: boolean | RunnerCountOutputTypeCountOddsSnapshotsArgs
  }

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

  /**
   * RunnerCountOutputType without action
   */
  export type RunnerCountOutputTypeCountResultsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: ResultWhereInput
  }

  /**
   * RunnerCountOutputType without action
   */
  export type RunnerCountOutputTypeCountOddsSnapshotsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: OddsSnapshotWhereInput
  }


  /**
   * Count Type JobRunCountOutputType
   */

  export type JobRunCountOutputType = {
    scrapes: number
    retryJobRuns: number
  }

  export type JobRunCountOutputTypeSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    scrapes?: boolean | JobRunCountOutputTypeCountScrapesArgs
    retryJobRuns?: boolean | JobRunCountOutputTypeCountRetryJobRunsArgs
  }

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

  /**
   * JobRunCountOutputType without action
   */
  export type JobRunCountOutputTypeCountScrapesArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: ScrapeWhereInput
  }

  /**
   * JobRunCountOutputType without action
   */
  export type JobRunCountOutputTypeCountRetryJobRunsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: JobRunWhereInput
  }


  /**
   * Models
   */

  /**
   * Model Meeting
   */

  export type AggregateMeeting = {
    _count: MeetingCountAggregateOutputType | null
    _avg: MeetingAvgAggregateOutputType | null
    _sum: MeetingSumAggregateOutputType | null
    _min: MeetingMinAggregateOutputType | null
    _max: MeetingMaxAggregateOutputType | null
  }

  export type MeetingAvgAggregateOutputType = {
    quaddie: number | null
    earlyQuaddie: number | null
    toteMeetingNumber: number | null
  }

  export type MeetingSumAggregateOutputType = {
    quaddie: number[]
    earlyQuaddie: number[]
    toteMeetingNumber: number | null
  }

  export type MeetingMinAggregateOutputType = {
    id: string | null
    name: string | null
    date: Date | null
    country: string | null
    state: string | null
    category: string | null
    categoryName: string | null
    trackCondition: string | null
    weather: string | null
    toteMeetingNumber: number | null
    toteStatus: string | null
    createdAt: Date | null
    updatedAt: Date | null
  }

  export type MeetingMaxAggregateOutputType = {
    id: string | null
    name: string | null
    date: Date | null
    country: string | null
    state: string | null
    category: string | null
    categoryName: string | null
    trackCondition: string | null
    weather: string | null
    toteMeetingNumber: number | null
    toteStatus: string | null
    createdAt: Date | null
    updatedAt: Date | null
  }

  export type MeetingCountAggregateOutputType = {
    id: number
    name: number
    date: number
    country: number
    state: number
    category: number
    categoryName: number
    trackCondition: number
    weather: number
    videoChannels: number
    quaddie: number
    earlyQuaddie: number
    toteMeetingNumber: number
    toteStatus: number
    metadata: number
    createdAt: number
    updatedAt: number
    _all: number
  }


  export type MeetingAvgAggregateInputType = {
    quaddie?: true
    earlyQuaddie?: true
    toteMeetingNumber?: true
  }

  export type MeetingSumAggregateInputType = {
    quaddie?: true
    earlyQuaddie?: true
    toteMeetingNumber?: true
  }

  export type MeetingMinAggregateInputType = {
    id?: true
    name?: true
    date?: true
    country?: true
    state?: true
    category?: true
    categoryName?: true
    trackCondition?: true
    weather?: true
    toteMeetingNumber?: true
    toteStatus?: true
    createdAt?: true
    updatedAt?: true
  }

  export type MeetingMaxAggregateInputType = {
    id?: true
    name?: true
    date?: true
    country?: true
    state?: true
    category?: true
    categoryName?: true
    trackCondition?: true
    weather?: true
    toteMeetingNumber?: true
    toteStatus?: true
    createdAt?: true
    updatedAt?: true
  }

  export type MeetingCountAggregateInputType = {
    id?: true
    name?: true
    date?: true
    country?: true
    state?: true
    category?: true
    categoryName?: true
    trackCondition?: true
    weather?: true
    videoChannels?: true
    quaddie?: true
    earlyQuaddie?: true
    toteMeetingNumber?: true
    toteStatus?: true
    metadata?: true
    createdAt?: true
    updatedAt?: true
    _all?: true
  }

  export type MeetingAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which Meeting to aggregate.
     */
    where?: MeetingWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Meetings to fetch.
     */
    orderBy?: MeetingOrderByWithRelationInput | MeetingOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the start position
     */
    cursor?: MeetingWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Meetings 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` Meetings.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Count returned Meetings
    **/
    _count?: true | MeetingCountAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to average
    **/
    _avg?: MeetingAvgAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to sum
    **/
    _sum?: MeetingSumAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the minimum value
    **/
    _min?: MeetingMinAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the maximum value
    **/
    _max?: MeetingMaxAggregateInputType
  }

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




  export type MeetingGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: MeetingWhereInput
    orderBy?: MeetingOrderByWithAggregationInput | MeetingOrderByWithAggregationInput[]
    by: MeetingScalarFieldEnum[] | MeetingScalarFieldEnum
    having?: MeetingScalarWhereWithAggregatesInput
    take?: number
    skip?: number
    _count?: MeetingCountAggregateInputType | true
    _avg?: MeetingAvgAggregateInputType
    _sum?: MeetingSumAggregateInputType
    _min?: MeetingMinAggregateInputType
    _max?: MeetingMaxAggregateInputType
  }

  export type MeetingGroupByOutputType = {
    id: string
    name: string
    date: Date
    country: string
    state: string | null
    category: string
    categoryName: string | null
    trackCondition: string | null
    weather: string | null
    videoChannels: JsonValue | null
    quaddie: number[]
    earlyQuaddie: number[]
    toteMeetingNumber: number | null
    toteStatus: string | null
    metadata: JsonValue | null
    createdAt: Date
    updatedAt: Date
    _count: MeetingCountAggregateOutputType | null
    _avg: MeetingAvgAggregateOutputType | null
    _sum: MeetingSumAggregateOutputType | null
    _min: MeetingMinAggregateOutputType | null
    _max: MeetingMaxAggregateOutputType | null
  }

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


  export type MeetingSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    name?: boolean
    date?: boolean
    country?: boolean
    state?: boolean
    category?: boolean
    categoryName?: boolean
    trackCondition?: boolean
    weather?: boolean
    videoChannels?: boolean
    quaddie?: boolean
    earlyQuaddie?: boolean
    toteMeetingNumber?: boolean
    toteStatus?: boolean
    metadata?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    races?: boolean | Meeting$racesArgs<ExtArgs>
    _count?: boolean | MeetingCountOutputTypeDefaultArgs<ExtArgs>
  }, ExtArgs["result"]["meeting"]>

  export type MeetingSelectCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    name?: boolean
    date?: boolean
    country?: boolean
    state?: boolean
    category?: boolean
    categoryName?: boolean
    trackCondition?: boolean
    weather?: boolean
    videoChannels?: boolean
    quaddie?: boolean
    earlyQuaddie?: boolean
    toteMeetingNumber?: boolean
    toteStatus?: boolean
    metadata?: boolean
    createdAt?: boolean
    updatedAt?: boolean
  }, ExtArgs["result"]["meeting"]>

  export type MeetingSelectScalar = {
    id?: boolean
    name?: boolean
    date?: boolean
    country?: boolean
    state?: boolean
    category?: boolean
    categoryName?: boolean
    trackCondition?: boolean
    weather?: boolean
    videoChannels?: boolean
    quaddie?: boolean
    earlyQuaddie?: boolean
    toteMeetingNumber?: boolean
    toteStatus?: boolean
    metadata?: boolean
    createdAt?: boolean
    updatedAt?: boolean
  }

  export type MeetingInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    races?: boolean | Meeting$racesArgs<ExtArgs>
    _count?: boolean | MeetingCountOutputTypeDefaultArgs<ExtArgs>
  }
  export type MeetingIncludeCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {}

  export type $MeetingPayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    name: "Meeting"
    objects: {
      races: Prisma.$RacePayload<ExtArgs>[]
    }
    scalars: $Extensions.GetPayloadResult<{
      id: string
      name: string
      date: Date
      country: string
      state: string | null
      category: string
      categoryName: string | null
      trackCondition: string | null
      weather: string | null
      videoChannels: Prisma.JsonValue | null
      quaddie: number[]
      earlyQuaddie: number[]
      toteMeetingNumber: number | null
      toteStatus: string | null
      metadata: Prisma.JsonValue | null
      createdAt: Date
      updatedAt: Date
    }, ExtArgs["result"]["meeting"]>
    composites: {}
  }

  type MeetingGetPayload<S extends boolean | null | undefined | MeetingDefaultArgs> = $Result.GetResult<Prisma.$MeetingPayload, S>

  type MeetingCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = 
    Omit<MeetingFindManyArgs, 'select' | 'include' | 'distinct'> & {
      select?: MeetingCountAggregateInputType | true
    }

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

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

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

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

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

    /**
     * Create a Meeting.
     * @param {MeetingCreateArgs} args - Arguments to create a Meeting.
     * @example
     * // Create one Meeting
     * const Meeting = await prisma.meeting.create({
     *   data: {
     *     // ... data to create a Meeting
     *   }
     * })
     * 
     */
    create<T extends MeetingCreateArgs>(args: SelectSubset<T, MeetingCreateArgs<ExtArgs>>): Prisma__MeetingClient<$Result.GetResult<Prisma.$MeetingPayload<ExtArgs>, T, "create">, never, ExtArgs>

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

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

    /**
     * Delete a Meeting.
     * @param {MeetingDeleteArgs} args - Arguments to delete one Meeting.
     * @example
     * // Delete one Meeting
     * const Meeting = await prisma.meeting.delete({
     *   where: {
     *     // ... filter to delete one Meeting
     *   }
     * })
     * 
     */
    delete<T extends MeetingDeleteArgs>(args: SelectSubset<T, MeetingDeleteArgs<ExtArgs>>): Prisma__MeetingClient<$Result.GetResult<Prisma.$MeetingPayload<ExtArgs>, T, "delete">, never, ExtArgs>

    /**
     * Update one Meeting.
     * @param {MeetingUpdateArgs} args - Arguments to update one Meeting.
     * @example
     * // Update one Meeting
     * const meeting = await prisma.meeting.update({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    update<T extends MeetingUpdateArgs>(args: SelectSubset<T, MeetingUpdateArgs<ExtArgs>>): Prisma__MeetingClient<$Result.GetResult<Prisma.$MeetingPayload<ExtArgs>, T, "update">, never, ExtArgs>

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

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

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


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

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

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

  /**
   * The delegate class that acts as a "Promise-like" for Meeting.
   * 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__MeetingClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> extends Prisma.PrismaPromise<T> {
    readonly [Symbol.toStringTag]: "PrismaPromise"
    races<T extends Meeting$racesArgs<ExtArgs> = {}>(args?: Subset<T, Meeting$racesArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$RacePayload<ExtArgs>, T, "findMany"> | 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 Meeting model
   */ 
  interface MeetingFieldRefs {
    readonly id: FieldRef<"Meeting", 'String'>
    readonly name: FieldRef<"Meeting", 'String'>
    readonly date: FieldRef<"Meeting", 'DateTime'>
    readonly country: FieldRef<"Meeting", 'String'>
    readonly state: FieldRef<"Meeting", 'String'>
    readonly category: FieldRef<"Meeting", 'String'>
    readonly categoryName: FieldRef<"Meeting", 'String'>
    readonly trackCondition: FieldRef<"Meeting", 'String'>
    readonly weather: FieldRef<"Meeting", 'String'>
    readonly videoChannels: FieldRef<"Meeting", 'Json'>
    readonly quaddie: FieldRef<"Meeting", 'Int[]'>
    readonly earlyQuaddie: FieldRef<"Meeting", 'Int[]'>
    readonly toteMeetingNumber: FieldRef<"Meeting", 'Int'>
    readonly toteStatus: FieldRef<"Meeting", 'String'>
    readonly metadata: FieldRef<"Meeting", 'Json'>
    readonly createdAt: FieldRef<"Meeting", 'DateTime'>
    readonly updatedAt: FieldRef<"Meeting", 'DateTime'>
  }
    

  // Custom InputTypes
  /**
   * Meeting findUnique
   */
  export type MeetingFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Meeting
     */
    select?: MeetingSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: MeetingInclude<ExtArgs> | null
    /**
     * Filter, which Meeting to fetch.
     */
    where: MeetingWhereUniqueInput
  }

  /**
   * Meeting findUniqueOrThrow
   */
  export type MeetingFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Meeting
     */
    select?: MeetingSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: MeetingInclude<ExtArgs> | null
    /**
     * Filter, which Meeting to fetch.
     */
    where: MeetingWhereUniqueInput
  }

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

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

  /**
   * Meeting findMany
   */
  export type MeetingFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Meeting
     */
    select?: MeetingSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: MeetingInclude<ExtArgs> | null
    /**
     * Filter, which Meetings to fetch.
     */
    where?: MeetingWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Meetings to fetch.
     */
    orderBy?: MeetingOrderByWithRelationInput | MeetingOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for listing Meetings.
     */
    cursor?: MeetingWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Meetings 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` Meetings.
     */
    skip?: number
    distinct?: MeetingScalarFieldEnum | MeetingScalarFieldEnum[]
  }

  /**
   * Meeting create
   */
  export type MeetingCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Meeting
     */
    select?: MeetingSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: MeetingInclude<ExtArgs> | null
    /**
     * The data needed to create a Meeting.
     */
    data: XOR<MeetingCreateInput, MeetingUncheckedCreateInput>
  }

  /**
   * Meeting createMany
   */
  export type MeetingCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to create many Meetings.
     */
    data: MeetingCreateManyInput | MeetingCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * Meeting createManyAndReturn
   */
  export type MeetingCreateManyAndReturnArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Meeting
     */
    select?: MeetingSelectCreateManyAndReturn<ExtArgs> | null
    /**
     * The data used to create many Meetings.
     */
    data: MeetingCreateManyInput | MeetingCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * Meeting update
   */
  export type MeetingUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Meeting
     */
    select?: MeetingSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: MeetingInclude<ExtArgs> | null
    /**
     * The data needed to update a Meeting.
     */
    data: XOR<MeetingUpdateInput, MeetingUncheckedUpdateInput>
    /**
     * Choose, which Meeting to update.
     */
    where: MeetingWhereUniqueInput
  }

  /**
   * Meeting updateMany
   */
  export type MeetingUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to update Meetings.
     */
    data: XOR<MeetingUpdateManyMutationInput, MeetingUncheckedUpdateManyInput>
    /**
     * Filter which Meetings to update
     */
    where?: MeetingWhereInput
  }

  /**
   * Meeting upsert
   */
  export type MeetingUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Meeting
     */
    select?: MeetingSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: MeetingInclude<ExtArgs> | null
    /**
     * The filter to search for the Meeting to update in case it exists.
     */
    where: MeetingWhereUniqueInput
    /**
     * In case the Meeting found by the `where` argument doesn't exist, create a new Meeting with this data.
     */
    create: XOR<MeetingCreateInput, MeetingUncheckedCreateInput>
    /**
     * In case the Meeting was found with the provided `where` argument, update it with this data.
     */
    update: XOR<MeetingUpdateInput, MeetingUncheckedUpdateInput>
  }

  /**
   * Meeting delete
   */
  export type MeetingDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Meeting
     */
    select?: MeetingSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: MeetingInclude<ExtArgs> | null
    /**
     * Filter which Meeting to delete.
     */
    where: MeetingWhereUniqueInput
  }

  /**
   * Meeting deleteMany
   */
  export type MeetingDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which Meetings to delete
     */
    where?: MeetingWhereInput
  }

  /**
   * Meeting.races
   */
  export type Meeting$racesArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Race
     */
    select?: RaceSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RaceInclude<ExtArgs> | null
    where?: RaceWhereInput
    orderBy?: RaceOrderByWithRelationInput | RaceOrderByWithRelationInput[]
    cursor?: RaceWhereUniqueInput
    take?: number
    skip?: number
    distinct?: RaceScalarFieldEnum | RaceScalarFieldEnum[]
  }

  /**
   * Meeting without action
   */
  export type MeetingDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Meeting
     */
    select?: MeetingSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: MeetingInclude<ExtArgs> | null
  }


  /**
   * Model Race
   */

  export type AggregateRace = {
    _count: RaceCountAggregateOutputType | null
    _avg: RaceAvgAggregateOutputType | null
    _sum: RaceSumAggregateOutputType | null
    _min: RaceMinAggregateOutputType | null
    _max: RaceMaxAggregateOutputType | null
  }

  export type RaceAvgAggregateOutputType = {
    raceNumber: number | null
    distance: number | null
  }

  export type RaceSumAggregateOutputType = {
    raceNumber: number | null
    distance: number | null
  }

  export type RaceMinAggregateOutputType = {
    id: string | null
    meetingId: string | null
    raceNumber: number | null
    name: string | null
    startTime: Date | null
    toteStartTime: Date | null
    distance: number | null
    trackCondition: string | null
    weather: string | null
    status: string | null
    country: string | null
    state: string | null
    createdAt: Date | null
    updatedAt: Date | null
  }

  export type RaceMaxAggregateOutputType = {
    id: string | null
    meetingId: string | null
    raceNumber: number | null
    name: string | null
    startTime: Date | null
    toteStartTime: Date | null
    distance: number | null
    trackCondition: string | null
    weather: string | null
    status: string | null
    country: string | null
    state: string | null
    createdAt: Date | null
    updatedAt: Date | null
  }

  export type RaceCountAggregateOutputType = {
    id: number
    meetingId: number
    raceNumber: number
    name: number
    startTime: number
    toteStartTime: number
    distance: number
    trackCondition: number
    weather: number
    status: number
    country: number
    state: number
    metadata: number
    createdAt: number
    updatedAt: number
    _all: number
  }


  export type RaceAvgAggregateInputType = {
    raceNumber?: true
    distance?: true
  }

  export type RaceSumAggregateInputType = {
    raceNumber?: true
    distance?: true
  }

  export type RaceMinAggregateInputType = {
    id?: true
    meetingId?: true
    raceNumber?: true
    name?: true
    startTime?: true
    toteStartTime?: true
    distance?: true
    trackCondition?: true
    weather?: true
    status?: true
    country?: true
    state?: true
    createdAt?: true
    updatedAt?: true
  }

  export type RaceMaxAggregateInputType = {
    id?: true
    meetingId?: true
    raceNumber?: true
    name?: true
    startTime?: true
    toteStartTime?: true
    distance?: true
    trackCondition?: true
    weather?: true
    status?: true
    country?: true
    state?: true
    createdAt?: true
    updatedAt?: true
  }

  export type RaceCountAggregateInputType = {
    id?: true
    meetingId?: true
    raceNumber?: true
    name?: true
    startTime?: true
    toteStartTime?: true
    distance?: true
    trackCondition?: true
    weather?: true
    status?: true
    country?: true
    state?: true
    metadata?: true
    createdAt?: true
    updatedAt?: true
    _all?: true
  }

  export type RaceAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which Race to aggregate.
     */
    where?: RaceWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Races to fetch.
     */
    orderBy?: RaceOrderByWithRelationInput | RaceOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the start position
     */
    cursor?: RaceWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Races 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` Races.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Count returned Races
    **/
    _count?: true | RaceCountAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to average
    **/
    _avg?: RaceAvgAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to sum
    **/
    _sum?: RaceSumAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the minimum value
    **/
    _min?: RaceMinAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the maximum value
    **/
    _max?: RaceMaxAggregateInputType
  }

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




  export type RaceGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: RaceWhereInput
    orderBy?: RaceOrderByWithAggregationInput | RaceOrderByWithAggregationInput[]
    by: RaceScalarFieldEnum[] | RaceScalarFieldEnum
    having?: RaceScalarWhereWithAggregatesInput
    take?: number
    skip?: number
    _count?: RaceCountAggregateInputType | true
    _avg?: RaceAvgAggregateInputType
    _sum?: RaceSumAggregateInputType
    _min?: RaceMinAggregateInputType
    _max?: RaceMaxAggregateInputType
  }

  export type RaceGroupByOutputType = {
    id: string
    meetingId: string
    raceNumber: number
    name: string
    startTime: Date
    toteStartTime: Date | null
    distance: number
    trackCondition: string | null
    weather: string | null
    status: string
    country: string
    state: string | null
    metadata: JsonValue | null
    createdAt: Date
    updatedAt: Date
    _count: RaceCountAggregateOutputType | null
    _avg: RaceAvgAggregateOutputType | null
    _sum: RaceSumAggregateOutputType | null
    _min: RaceMinAggregateOutputType | null
    _max: RaceMaxAggregateOutputType | null
  }

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


  export type RaceSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    meetingId?: boolean
    raceNumber?: boolean
    name?: boolean
    startTime?: boolean
    toteStartTime?: boolean
    distance?: boolean
    trackCondition?: boolean
    weather?: boolean
    status?: boolean
    country?: boolean
    state?: boolean
    metadata?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    meeting?: boolean | MeetingDefaultArgs<ExtArgs>
    runners?: boolean | Race$runnersArgs<ExtArgs>
    scrapes?: boolean | Race$scrapesArgs<ExtArgs>
    results?: boolean | Race$resultsArgs<ExtArgs>
    dividends?: boolean | Race$dividendsArgs<ExtArgs>
    _count?: boolean | RaceCountOutputTypeDefaultArgs<ExtArgs>
  }, ExtArgs["result"]["race"]>

  export type RaceSelectCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    meetingId?: boolean
    raceNumber?: boolean
    name?: boolean
    startTime?: boolean
    toteStartTime?: boolean
    distance?: boolean
    trackCondition?: boolean
    weather?: boolean
    status?: boolean
    country?: boolean
    state?: boolean
    metadata?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    meeting?: boolean | MeetingDefaultArgs<ExtArgs>
  }, ExtArgs["result"]["race"]>

  export type RaceSelectScalar = {
    id?: boolean
    meetingId?: boolean
    raceNumber?: boolean
    name?: boolean
    startTime?: boolean
    toteStartTime?: boolean
    distance?: boolean
    trackCondition?: boolean
    weather?: boolean
    status?: boolean
    country?: boolean
    state?: boolean
    metadata?: boolean
    createdAt?: boolean
    updatedAt?: boolean
  }

  export type RaceInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    meeting?: boolean | MeetingDefaultArgs<ExtArgs>
    runners?: boolean | Race$runnersArgs<ExtArgs>
    scrapes?: boolean | Race$scrapesArgs<ExtArgs>
    results?: boolean | Race$resultsArgs<ExtArgs>
    dividends?: boolean | Race$dividendsArgs<ExtArgs>
    _count?: boolean | RaceCountOutputTypeDefaultArgs<ExtArgs>
  }
  export type RaceIncludeCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    meeting?: boolean | MeetingDefaultArgs<ExtArgs>
  }

  export type $RacePayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    name: "Race"
    objects: {
      meeting: Prisma.$MeetingPayload<ExtArgs>
      runners: Prisma.$RunnerPayload<ExtArgs>[]
      scrapes: Prisma.$ScrapePayload<ExtArgs>[]
      results: Prisma.$ResultPayload<ExtArgs>[]
      dividends: Prisma.$DividendPayload<ExtArgs>[]
    }
    scalars: $Extensions.GetPayloadResult<{
      id: string
      meetingId: string
      raceNumber: number
      name: string
      startTime: Date
      toteStartTime: Date | null
      distance: number
      trackCondition: string | null
      weather: string | null
      status: string
      country: string
      state: string | null
      metadata: Prisma.JsonValue | null
      createdAt: Date
      updatedAt: Date
    }, ExtArgs["result"]["race"]>
    composites: {}
  }

  type RaceGetPayload<S extends boolean | null | undefined | RaceDefaultArgs> = $Result.GetResult<Prisma.$RacePayload, S>

  type RaceCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = 
    Omit<RaceFindManyArgs, 'select' | 'include' | 'distinct'> & {
      select?: RaceCountAggregateInputType | true
    }

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

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

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

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

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

    /**
     * Create a Race.
     * @param {RaceCreateArgs} args - Arguments to create a Race.
     * @example
     * // Create one Race
     * const Race = await prisma.race.create({
     *   data: {
     *     // ... data to create a Race
     *   }
     * })
     * 
     */
    create<T extends RaceCreateArgs>(args: SelectSubset<T, RaceCreateArgs<ExtArgs>>): Prisma__RaceClient<$Result.GetResult<Prisma.$RacePayload<ExtArgs>, T, "create">, never, ExtArgs>

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

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

    /**
     * Delete a Race.
     * @param {RaceDeleteArgs} args - Arguments to delete one Race.
     * @example
     * // Delete one Race
     * const Race = await prisma.race.delete({
     *   where: {
     *     // ... filter to delete one Race
     *   }
     * })
     * 
     */
    delete<T extends RaceDeleteArgs>(args: SelectSubset<T, RaceDeleteArgs<ExtArgs>>): Prisma__RaceClient<$Result.GetResult<Prisma.$RacePayload<ExtArgs>, T, "delete">, never, ExtArgs>

    /**
     * Update one Race.
     * @param {RaceUpdateArgs} args - Arguments to update one Race.
     * @example
     * // Update one Race
     * const race = await prisma.race.update({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    update<T extends RaceUpdateArgs>(args: SelectSubset<T, RaceUpdateArgs<ExtArgs>>): Prisma__RaceClient<$Result.GetResult<Prisma.$RacePayload<ExtArgs>, T, "update">, never, ExtArgs>

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

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

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


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

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

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

  /**
   * The delegate class that acts as a "Promise-like" for Race.
   * 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__RaceClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> extends Prisma.PrismaPromise<T> {
    readonly [Symbol.toStringTag]: "PrismaPromise"
    meeting<T extends MeetingDefaultArgs<ExtArgs> = {}>(args?: Subset<T, MeetingDefaultArgs<ExtArgs>>): Prisma__MeetingClient<$Result.GetResult<Prisma.$MeetingPayload<ExtArgs>, T, "findUniqueOrThrow"> | Null, Null, ExtArgs>
    runners<T extends Race$runnersArgs<ExtArgs> = {}>(args?: Subset<T, Race$runnersArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$RunnerPayload<ExtArgs>, T, "findMany"> | Null>
    scrapes<T extends Race$scrapesArgs<ExtArgs> = {}>(args?: Subset<T, Race$scrapesArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$ScrapePayload<ExtArgs>, T, "findMany"> | Null>
    results<T extends Race$resultsArgs<ExtArgs> = {}>(args?: Subset<T, Race$resultsArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$ResultPayload<ExtArgs>, T, "findMany"> | Null>
    dividends<T extends Race$dividendsArgs<ExtArgs> = {}>(args?: Subset<T, Race$dividendsArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$DividendPayload<ExtArgs>, T, "findMany"> | 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 Race model
   */ 
  interface RaceFieldRefs {
    readonly id: FieldRef<"Race", 'String'>
    readonly meetingId: FieldRef<"Race", 'String'>
    readonly raceNumber: FieldRef<"Race", 'Int'>
    readonly name: FieldRef<"Race", 'String'>
    readonly startTime: FieldRef<"Race", 'DateTime'>
    readonly toteStartTime: FieldRef<"Race", 'DateTime'>
    readonly distance: FieldRef<"Race", 'Int'>
    readonly trackCondition: FieldRef<"Race", 'String'>
    readonly weather: FieldRef<"Race", 'String'>
    readonly status: FieldRef<"Race", 'String'>
    readonly country: FieldRef<"Race", 'String'>
    readonly state: FieldRef<"Race", 'String'>
    readonly metadata: FieldRef<"Race", 'Json'>
    readonly createdAt: FieldRef<"Race", 'DateTime'>
    readonly updatedAt: FieldRef<"Race", 'DateTime'>
  }
    

  // Custom InputTypes
  /**
   * Race findUnique
   */
  export type RaceFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Race
     */
    select?: RaceSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RaceInclude<ExtArgs> | null
    /**
     * Filter, which Race to fetch.
     */
    where: RaceWhereUniqueInput
  }

  /**
   * Race findUniqueOrThrow
   */
  export type RaceFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Race
     */
    select?: RaceSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RaceInclude<ExtArgs> | null
    /**
     * Filter, which Race to fetch.
     */
    where: RaceWhereUniqueInput
  }

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

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

  /**
   * Race findMany
   */
  export type RaceFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Race
     */
    select?: RaceSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RaceInclude<ExtArgs> | null
    /**
     * Filter, which Races to fetch.
     */
    where?: RaceWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Races to fetch.
     */
    orderBy?: RaceOrderByWithRelationInput | RaceOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for listing Races.
     */
    cursor?: RaceWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Races 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` Races.
     */
    skip?: number
    distinct?: RaceScalarFieldEnum | RaceScalarFieldEnum[]
  }

  /**
   * Race create
   */
  export type RaceCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Race
     */
    select?: RaceSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RaceInclude<ExtArgs> | null
    /**
     * The data needed to create a Race.
     */
    data: XOR<RaceCreateInput, RaceUncheckedCreateInput>
  }

  /**
   * Race createMany
   */
  export type RaceCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to create many Races.
     */
    data: RaceCreateManyInput | RaceCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * Race createManyAndReturn
   */
  export type RaceCreateManyAndReturnArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Race
     */
    select?: RaceSelectCreateManyAndReturn<ExtArgs> | null
    /**
     * The data used to create many Races.
     */
    data: RaceCreateManyInput | RaceCreateManyInput[]
    skipDuplicates?: boolean
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RaceIncludeCreateManyAndReturn<ExtArgs> | null
  }

  /**
   * Race update
   */
  export type RaceUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Race
     */
    select?: RaceSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RaceInclude<ExtArgs> | null
    /**
     * The data needed to update a Race.
     */
    data: XOR<RaceUpdateInput, RaceUncheckedUpdateInput>
    /**
     * Choose, which Race to update.
     */
    where: RaceWhereUniqueInput
  }

  /**
   * Race updateMany
   */
  export type RaceUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to update Races.
     */
    data: XOR<RaceUpdateManyMutationInput, RaceUncheckedUpdateManyInput>
    /**
     * Filter which Races to update
     */
    where?: RaceWhereInput
  }

  /**
   * Race upsert
   */
  export type RaceUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Race
     */
    select?: RaceSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RaceInclude<ExtArgs> | null
    /**
     * The filter to search for the Race to update in case it exists.
     */
    where: RaceWhereUniqueInput
    /**
     * In case the Race found by the `where` argument doesn't exist, create a new Race with this data.
     */
    create: XOR<RaceCreateInput, RaceUncheckedCreateInput>
    /**
     * In case the Race was found with the provided `where` argument, update it with this data.
     */
    update: XOR<RaceUpdateInput, RaceUncheckedUpdateInput>
  }

  /**
   * Race delete
   */
  export type RaceDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Race
     */
    select?: RaceSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RaceInclude<ExtArgs> | null
    /**
     * Filter which Race to delete.
     */
    where: RaceWhereUniqueInput
  }

  /**
   * Race deleteMany
   */
  export type RaceDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which Races to delete
     */
    where?: RaceWhereInput
  }

  /**
   * Race.runners
   */
  export type Race$runnersArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Runner
     */
    select?: RunnerSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RunnerInclude<ExtArgs> | null
    where?: RunnerWhereInput
    orderBy?: RunnerOrderByWithRelationInput | RunnerOrderByWithRelationInput[]
    cursor?: RunnerWhereUniqueInput
    take?: number
    skip?: number
    distinct?: RunnerScalarFieldEnum | RunnerScalarFieldEnum[]
  }

  /**
   * Race.scrapes
   */
  export type Race$scrapesArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Scrape
     */
    select?: ScrapeSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ScrapeInclude<ExtArgs> | null
    where?: ScrapeWhereInput
    orderBy?: ScrapeOrderByWithRelationInput | ScrapeOrderByWithRelationInput[]
    cursor?: ScrapeWhereUniqueInput
    take?: number
    skip?: number
    distinct?: ScrapeScalarFieldEnum | ScrapeScalarFieldEnum[]
  }

  /**
   * Race.results
   */
  export type Race$resultsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Result
     */
    select?: ResultSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ResultInclude<ExtArgs> | null
    where?: ResultWhereInput
    orderBy?: ResultOrderByWithRelationInput | ResultOrderByWithRelationInput[]
    cursor?: ResultWhereUniqueInput
    take?: number
    skip?: number
    distinct?: ResultScalarFieldEnum | ResultScalarFieldEnum[]
  }

  /**
   * Race.dividends
   */
  export type Race$dividendsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Dividend
     */
    select?: DividendSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: DividendInclude<ExtArgs> | null
    where?: DividendWhereInput
    orderBy?: DividendOrderByWithRelationInput | DividendOrderByWithRelationInput[]
    cursor?: DividendWhereUniqueInput
    take?: number
    skip?: number
    distinct?: DividendScalarFieldEnum | DividendScalarFieldEnum[]
  }

  /**
   * Race without action
   */
  export type RaceDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Race
     */
    select?: RaceSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RaceInclude<ExtArgs> | null
  }


  /**
   * Model Horse
   */

  export type AggregateHorse = {
    _count: HorseCountAggregateOutputType | null
    _avg: HorseAvgAggregateOutputType | null
    _sum: HorseSumAggregateOutputType | null
    _min: HorseMinAggregateOutputType | null
    _max: HorseMaxAggregateOutputType | null
  }

  export type HorseAvgAggregateOutputType = {
    tabHorseId: number | null
    harnessNzHorseId: number | null
    raceCount: number | null
  }

  export type HorseSumAggregateOutputType = {
    tabHorseId: number | null
    harnessNzHorseId: bigint | null
    raceCount: number | null
  }

  export type HorseMinAggregateOutputType = {
    id: string | null
    tabEntrantId: string | null
    tabHorseId: number | null
    harnessNzHorseId: bigint | null
    name: string | null
    normalizedName: string | null
    sire: string | null
    dam: string | null
    damSire: string | null
    sex: string | null
    colour: string | null
    country: string | null
    firstSeen: Date | null
    lastSeen: Date | null
    raceCount: number | null
  }

  export type HorseMaxAggregateOutputType = {
    id: string | null
    tabEntrantId: string | null
    tabHorseId: number | null
    harnessNzHorseId: bigint | null
    name: string | null
    normalizedName: string | null
    sire: string | null
    dam: string | null
    damSire: string | null
    sex: string | null
    colour: string | null
    country: string | null
    firstSeen: Date | null
    lastSeen: Date | null
    raceCount: number | null
  }

  export type HorseCountAggregateOutputType = {
    id: number
    tabEntrantId: number
    tabHorseId: number
    harnessNzHorseId: number
    name: number
    normalizedName: number
    sire: number
    dam: number
    damSire: number
    sex: number
    colour: number
    country: number
    firstSeen: number
    lastSeen: number
    raceCount: number
    _all: number
  }


  export type HorseAvgAggregateInputType = {
    tabHorseId?: true
    harnessNzHorseId?: true
    raceCount?: true
  }

  export type HorseSumAggregateInputType = {
    tabHorseId?: true
    harnessNzHorseId?: true
    raceCount?: true
  }

  export type HorseMinAggregateInputType = {
    id?: true
    tabEntrantId?: true
    tabHorseId?: true
    harnessNzHorseId?: true
    name?: true
    normalizedName?: true
    sire?: true
    dam?: true
    damSire?: true
    sex?: true
    colour?: true
    country?: true
    firstSeen?: true
    lastSeen?: true
    raceCount?: true
  }

  export type HorseMaxAggregateInputType = {
    id?: true
    tabEntrantId?: true
    tabHorseId?: true
    harnessNzHorseId?: true
    name?: true
    normalizedName?: true
    sire?: true
    dam?: true
    damSire?: true
    sex?: true
    colour?: true
    country?: true
    firstSeen?: true
    lastSeen?: true
    raceCount?: true
  }

  export type HorseCountAggregateInputType = {
    id?: true
    tabEntrantId?: true
    tabHorseId?: true
    harnessNzHorseId?: true
    name?: true
    normalizedName?: true
    sire?: true
    dam?: true
    damSire?: true
    sex?: true
    colour?: true
    country?: true
    firstSeen?: true
    lastSeen?: true
    raceCount?: true
    _all?: true
  }

  export type HorseAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which Horse to aggregate.
     */
    where?: HorseWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Horses to fetch.
     */
    orderBy?: HorseOrderByWithRelationInput | HorseOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the start position
     */
    cursor?: HorseWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Horses 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` Horses.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Count returned Horses
    **/
    _count?: true | HorseCountAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to average
    **/
    _avg?: HorseAvgAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to sum
    **/
    _sum?: HorseSumAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the minimum value
    **/
    _min?: HorseMinAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the maximum value
    **/
    _max?: HorseMaxAggregateInputType
  }

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




  export type HorseGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: HorseWhereInput
    orderBy?: HorseOrderByWithAggregationInput | HorseOrderByWithAggregationInput[]
    by: HorseScalarFieldEnum[] | HorseScalarFieldEnum
    having?: HorseScalarWhereWithAggregatesInput
    take?: number
    skip?: number
    _count?: HorseCountAggregateInputType | true
    _avg?: HorseAvgAggregateInputType
    _sum?: HorseSumAggregateInputType
    _min?: HorseMinAggregateInputType
    _max?: HorseMaxAggregateInputType
  }

  export type HorseGroupByOutputType = {
    id: string
    tabEntrantId: string | null
    tabHorseId: number | null
    harnessNzHorseId: bigint | null
    name: string
    normalizedName: string
    sire: string | null
    dam: string | null
    damSire: string | null
    sex: string | null
    colour: string | null
    country: string | null
    firstSeen: Date
    lastSeen: Date
    raceCount: number
    _count: HorseCountAggregateOutputType | null
    _avg: HorseAvgAggregateOutputType | null
    _sum: HorseSumAggregateOutputType | null
    _min: HorseMinAggregateOutputType | null
    _max: HorseMaxAggregateOutputType | null
  }

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


  export type HorseSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    tabEntrantId?: boolean
    tabHorseId?: boolean
    harnessNzHorseId?: boolean
    name?: boolean
    normalizedName?: boolean
    sire?: boolean
    dam?: boolean
    damSire?: boolean
    sex?: boolean
    colour?: boolean
    country?: boolean
    firstSeen?: boolean
    lastSeen?: boolean
    raceCount?: boolean
    runners?: boolean | Horse$runnersArgs<ExtArgs>
    _count?: boolean | HorseCountOutputTypeDefaultArgs<ExtArgs>
  }, ExtArgs["result"]["horse"]>

  export type HorseSelectCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    tabEntrantId?: boolean
    tabHorseId?: boolean
    harnessNzHorseId?: boolean
    name?: boolean
    normalizedName?: boolean
    sire?: boolean
    dam?: boolean
    damSire?: boolean
    sex?: boolean
    colour?: boolean
    country?: boolean
    firstSeen?: boolean
    lastSeen?: boolean
    raceCount?: boolean
  }, ExtArgs["result"]["horse"]>

  export type HorseSelectScalar = {
    id?: boolean
    tabEntrantId?: boolean
    tabHorseId?: boolean
    harnessNzHorseId?: boolean
    name?: boolean
    normalizedName?: boolean
    sire?: boolean
    dam?: boolean
    damSire?: boolean
    sex?: boolean
    colour?: boolean
    country?: boolean
    firstSeen?: boolean
    lastSeen?: boolean
    raceCount?: boolean
  }

  export type HorseInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    runners?: boolean | Horse$runnersArgs<ExtArgs>
    _count?: boolean | HorseCountOutputTypeDefaultArgs<ExtArgs>
  }
  export type HorseIncludeCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {}

  export type $HorsePayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    name: "Horse"
    objects: {
      runners: Prisma.$RunnerPayload<ExtArgs>[]
    }
    scalars: $Extensions.GetPayloadResult<{
      id: string
      tabEntrantId: string | null
      tabHorseId: number | null
      harnessNzHorseId: bigint | null
      name: string
      normalizedName: string
      sire: string | null
      dam: string | null
      damSire: string | null
      sex: string | null
      colour: string | null
      country: string | null
      firstSeen: Date
      lastSeen: Date
      raceCount: number
    }, ExtArgs["result"]["horse"]>
    composites: {}
  }

  type HorseGetPayload<S extends boolean | null | undefined | HorseDefaultArgs> = $Result.GetResult<Prisma.$HorsePayload, S>

  type HorseCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = 
    Omit<HorseFindManyArgs, 'select' | 'include' | 'distinct'> & {
      select?: HorseCountAggregateInputType | true
    }

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

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

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

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

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

    /**
     * Create a Horse.
     * @param {HorseCreateArgs} args - Arguments to create a Horse.
     * @example
     * // Create one Horse
     * const Horse = await prisma.horse.create({
     *   data: {
     *     // ... data to create a Horse
     *   }
     * })
     * 
     */
    create<T extends HorseCreateArgs>(args: SelectSubset<T, HorseCreateArgs<ExtArgs>>): Prisma__HorseClient<$Result.GetResult<Prisma.$HorsePayload<ExtArgs>, T, "create">, never, ExtArgs>

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

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

    /**
     * Delete a Horse.
     * @param {HorseDeleteArgs} args - Arguments to delete one Horse.
     * @example
     * // Delete one Horse
     * const Horse = await prisma.horse.delete({
     *   where: {
     *     // ... filter to delete one Horse
     *   }
     * })
     * 
     */
    delete<T extends HorseDeleteArgs>(args: SelectSubset<T, HorseDeleteArgs<ExtArgs>>): Prisma__HorseClient<$Result.GetResult<Prisma.$HorsePayload<ExtArgs>, T, "delete">, never, ExtArgs>

    /**
     * Update one Horse.
     * @param {HorseUpdateArgs} args - Arguments to update one Horse.
     * @example
     * // Update one Horse
     * const horse = await prisma.horse.update({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    update<T extends HorseUpdateArgs>(args: SelectSubset<T, HorseUpdateArgs<ExtArgs>>): Prisma__HorseClient<$Result.GetResult<Prisma.$HorsePayload<ExtArgs>, T, "update">, never, ExtArgs>

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

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

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


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

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

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

  /**
   * The delegate class that acts as a "Promise-like" for Horse.
   * 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__HorseClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> extends Prisma.PrismaPromise<T> {
    readonly [Symbol.toStringTag]: "PrismaPromise"
    runners<T extends Horse$runnersArgs<ExtArgs> = {}>(args?: Subset<T, Horse$runnersArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$RunnerPayload<ExtArgs>, T, "findMany"> | 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 Horse model
   */ 
  interface HorseFieldRefs {
    readonly id: FieldRef<"Horse", 'String'>
    readonly tabEntrantId: FieldRef<"Horse", 'String'>
    readonly tabHorseId: FieldRef<"Horse", 'Int'>
    readonly harnessNzHorseId: FieldRef<"Horse", 'BigInt'>
    readonly name: FieldRef<"Horse", 'String'>
    readonly normalizedName: FieldRef<"Horse", 'String'>
    readonly sire: FieldRef<"Horse", 'String'>
    readonly dam: FieldRef<"Horse", 'String'>
    readonly damSire: FieldRef<"Horse", 'String'>
    readonly sex: FieldRef<"Horse", 'String'>
    readonly colour: FieldRef<"Horse", 'String'>
    readonly country: FieldRef<"Horse", 'String'>
    readonly firstSeen: FieldRef<"Horse", 'DateTime'>
    readonly lastSeen: FieldRef<"Horse", 'DateTime'>
    readonly raceCount: FieldRef<"Horse", 'Int'>
  }
    

  // Custom InputTypes
  /**
   * Horse findUnique
   */
  export type HorseFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Horse
     */
    select?: HorseSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: HorseInclude<ExtArgs> | null
    /**
     * Filter, which Horse to fetch.
     */
    where: HorseWhereUniqueInput
  }

  /**
   * Horse findUniqueOrThrow
   */
  export type HorseFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Horse
     */
    select?: HorseSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: HorseInclude<ExtArgs> | null
    /**
     * Filter, which Horse to fetch.
     */
    where: HorseWhereUniqueInput
  }

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

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

  /**
   * Horse findMany
   */
  export type HorseFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Horse
     */
    select?: HorseSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: HorseInclude<ExtArgs> | null
    /**
     * Filter, which Horses to fetch.
     */
    where?: HorseWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Horses to fetch.
     */
    orderBy?: HorseOrderByWithRelationInput | HorseOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for listing Horses.
     */
    cursor?: HorseWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Horses 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` Horses.
     */
    skip?: number
    distinct?: HorseScalarFieldEnum | HorseScalarFieldEnum[]
  }

  /**
   * Horse create
   */
  export type HorseCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Horse
     */
    select?: HorseSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: HorseInclude<ExtArgs> | null
    /**
     * The data needed to create a Horse.
     */
    data: XOR<HorseCreateInput, HorseUncheckedCreateInput>
  }

  /**
   * Horse createMany
   */
  export type HorseCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to create many Horses.
     */
    data: HorseCreateManyInput | HorseCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * Horse createManyAndReturn
   */
  export type HorseCreateManyAndReturnArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Horse
     */
    select?: HorseSelectCreateManyAndReturn<ExtArgs> | null
    /**
     * The data used to create many Horses.
     */
    data: HorseCreateManyInput | HorseCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * Horse update
   */
  export type HorseUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Horse
     */
    select?: HorseSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: HorseInclude<ExtArgs> | null
    /**
     * The data needed to update a Horse.
     */
    data: XOR<HorseUpdateInput, HorseUncheckedUpdateInput>
    /**
     * Choose, which Horse to update.
     */
    where: HorseWhereUniqueInput
  }

  /**
   * Horse updateMany
   */
  export type HorseUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to update Horses.
     */
    data: XOR<HorseUpdateManyMutationInput, HorseUncheckedUpdateManyInput>
    /**
     * Filter which Horses to update
     */
    where?: HorseWhereInput
  }

  /**
   * Horse upsert
   */
  export type HorseUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Horse
     */
    select?: HorseSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: HorseInclude<ExtArgs> | null
    /**
     * The filter to search for the Horse to update in case it exists.
     */
    where: HorseWhereUniqueInput
    /**
     * In case the Horse found by the `where` argument doesn't exist, create a new Horse with this data.
     */
    create: XOR<HorseCreateInput, HorseUncheckedCreateInput>
    /**
     * In case the Horse was found with the provided `where` argument, update it with this data.
     */
    update: XOR<HorseUpdateInput, HorseUncheckedUpdateInput>
  }

  /**
   * Horse delete
   */
  export type HorseDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Horse
     */
    select?: HorseSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: HorseInclude<ExtArgs> | null
    /**
     * Filter which Horse to delete.
     */
    where: HorseWhereUniqueInput
  }

  /**
   * Horse deleteMany
   */
  export type HorseDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which Horses to delete
     */
    where?: HorseWhereInput
  }

  /**
   * Horse.runners
   */
  export type Horse$runnersArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Runner
     */
    select?: RunnerSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RunnerInclude<ExtArgs> | null
    where?: RunnerWhereInput
    orderBy?: RunnerOrderByWithRelationInput | RunnerOrderByWithRelationInput[]
    cursor?: RunnerWhereUniqueInput
    take?: number
    skip?: number
    distinct?: RunnerScalarFieldEnum | RunnerScalarFieldEnum[]
  }

  /**
   * Horse without action
   */
  export type HorseDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Horse
     */
    select?: HorseSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: HorseInclude<ExtArgs> | null
  }


  /**
   * Model Runner
   */

  export type AggregateRunner = {
    _count: RunnerCountAggregateOutputType | null
    _avg: RunnerAvgAggregateOutputType | null
    _sum: RunnerSumAggregateOutputType | null
    _min: RunnerMinAggregateOutputType | null
    _max: RunnerMaxAggregateOutputType | null
  }

  export type RunnerAvgAggregateOutputType = {
    runnerNumber: number | null
    barrier: number | null
    weight: Decimal | null
    jockeyWeightAllowance: Decimal | null
    age: number | null
    openingOdds: Decimal | null
    currentOdds: Decimal | null
  }

  export type RunnerSumAggregateOutputType = {
    runnerNumber: number | null
    barrier: number | null
    weight: Decimal | null
    jockeyWeightAllowance: Decimal | null
    age: number | null
    openingOdds: Decimal | null
    currentOdds: Decimal | null
  }

  export type RunnerMinAggregateOutputType = {
    id: string | null
    raceId: string | null
    runnerNumber: number | null
    entrantId: string | null
    horseName: string | null
    tabHorseIdLegacy: string | null
    horseId: string | null
    barrier: number | null
    weight: Decimal | null
    jockeyName: string | null
    jockeyId: string | null
    jockeyWeightAllowance: Decimal | null
    trainerName: string | null
    trainerId: string | null
    trainerLocation: string | null
    form: string | null
    lastTwentyStarts: string | null
    age: number | null
    silkColours: string | null
    scratched: boolean | null
    scratchedAt: Date | null
    openingOdds: Decimal | null
    currentOdds: Decimal | null
    createdAt: Date | null
    updatedAt: Date | null
  }

  export type RunnerMaxAggregateOutputType = {
    id: string | null
    raceId: string | null
    runnerNumber: number | null
    entrantId: string | null
    horseName: string | null
    tabHorseIdLegacy: string | null
    horseId: string | null
    barrier: number | null
    weight: Decimal | null
    jockeyName: string | null
    jockeyId: string | null
    jockeyWeightAllowance: Decimal | null
    trainerName: string | null
    trainerId: string | null
    trainerLocation: string | null
    form: string | null
    lastTwentyStarts: string | null
    age: number | null
    silkColours: string | null
    scratched: boolean | null
    scratchedAt: Date | null
    openingOdds: Decimal | null
    currentOdds: Decimal | null
    createdAt: Date | null
    updatedAt: Date | null
  }

  export type RunnerCountAggregateOutputType = {
    id: number
    raceId: number
    runnerNumber: number
    entrantId: number
    horseName: number
    tabHorseIdLegacy: number
    horseId: number
    barrier: number
    weight: number
    jockeyName: number
    jockeyId: number
    jockeyWeightAllowance: number
    trainerName: number
    trainerId: number
    trainerLocation: number
    form: number
    lastStarts: number
    lastTwentyStarts: number
    age: number
    silkColours: number
    scratched: number
    scratchedAt: number
    openingOdds: number
    currentOdds: number
    metadata: number
    createdAt: number
    updatedAt: number
    _all: number
  }


  export type RunnerAvgAggregateInputType = {
    runnerNumber?: true
    barrier?: true
    weight?: true
    jockeyWeightAllowance?: true
    age?: true
    openingOdds?: true
    currentOdds?: true
  }

  export type RunnerSumAggregateInputType = {
    runnerNumber?: true
    barrier?: true
    weight?: true
    jockeyWeightAllowance?: true
    age?: true
    openingOdds?: true
    currentOdds?: true
  }

  export type RunnerMinAggregateInputType = {
    id?: true
    raceId?: true
    runnerNumber?: true
    entrantId?: true
    horseName?: true
    tabHorseIdLegacy?: true
    horseId?: true
    barrier?: true
    weight?: true
    jockeyName?: true
    jockeyId?: true
    jockeyWeightAllowance?: true
    trainerName?: true
    trainerId?: true
    trainerLocation?: true
    form?: true
    lastTwentyStarts?: true
    age?: true
    silkColours?: true
    scratched?: true
    scratchedAt?: true
    openingOdds?: true
    currentOdds?: true
    createdAt?: true
    updatedAt?: true
  }

  export type RunnerMaxAggregateInputType = {
    id?: true
    raceId?: true
    runnerNumber?: true
    entrantId?: true
    horseName?: true
    tabHorseIdLegacy?: true
    horseId?: true
    barrier?: true
    weight?: true
    jockeyName?: true
    jockeyId?: true
    jockeyWeightAllowance?: true
    trainerName?: true
    trainerId?: true
    trainerLocation?: true
    form?: true
    lastTwentyStarts?: true
    age?: true
    silkColours?: true
    scratched?: true
    scratchedAt?: true
    openingOdds?: true
    currentOdds?: true
    createdAt?: true
    updatedAt?: true
  }

  export type RunnerCountAggregateInputType = {
    id?: true
    raceId?: true
    runnerNumber?: true
    entrantId?: true
    horseName?: true
    tabHorseIdLegacy?: true
    horseId?: true
    barrier?: true
    weight?: true
    jockeyName?: true
    jockeyId?: true
    jockeyWeightAllowance?: true
    trainerName?: true
    trainerId?: true
    trainerLocation?: true
    form?: true
    lastStarts?: true
    lastTwentyStarts?: true
    age?: true
    silkColours?: true
    scratched?: true
    scratchedAt?: true
    openingOdds?: true
    currentOdds?: true
    metadata?: true
    createdAt?: true
    updatedAt?: true
    _all?: true
  }

  export type RunnerAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which Runner to aggregate.
     */
    where?: RunnerWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Runners to fetch.
     */
    orderBy?: RunnerOrderByWithRelationInput | RunnerOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the start position
     */
    cursor?: RunnerWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Runners 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` Runners.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Count returned Runners
    **/
    _count?: true | RunnerCountAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to average
    **/
    _avg?: RunnerAvgAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to sum
    **/
    _sum?: RunnerSumAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the minimum value
    **/
    _min?: RunnerMinAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the maximum value
    **/
    _max?: RunnerMaxAggregateInputType
  }

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




  export type RunnerGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: RunnerWhereInput
    orderBy?: RunnerOrderByWithAggregationInput | RunnerOrderByWithAggregationInput[]
    by: RunnerScalarFieldEnum[] | RunnerScalarFieldEnum
    having?: RunnerScalarWhereWithAggregatesInput
    take?: number
    skip?: number
    _count?: RunnerCountAggregateInputType | true
    _avg?: RunnerAvgAggregateInputType
    _sum?: RunnerSumAggregateInputType
    _min?: RunnerMinAggregateInputType
    _max?: RunnerMaxAggregateInputType
  }

  export type RunnerGroupByOutputType = {
    id: string
    raceId: string
    runnerNumber: number
    entrantId: string | null
    horseName: string
    tabHorseIdLegacy: string | null
    horseId: string | null
    barrier: number | null
    weight: Decimal | null
    jockeyName: string | null
    jockeyId: string | null
    jockeyWeightAllowance: Decimal | null
    trainerName: string | null
    trainerId: string | null
    trainerLocation: string | null
    form: string | null
    lastStarts: JsonValue | null
    lastTwentyStarts: string | null
    age: number | null
    silkColours: string | null
    scratched: boolean
    scratchedAt: Date | null
    openingOdds: Decimal | null
    currentOdds: Decimal | null
    metadata: JsonValue | null
    createdAt: Date
    updatedAt: Date
    _count: RunnerCountAggregateOutputType | null
    _avg: RunnerAvgAggregateOutputType | null
    _sum: RunnerSumAggregateOutputType | null
    _min: RunnerMinAggregateOutputType | null
    _max: RunnerMaxAggregateOutputType | null
  }

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


  export type RunnerSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    raceId?: boolean
    runnerNumber?: boolean
    entrantId?: boolean
    horseName?: boolean
    tabHorseIdLegacy?: boolean
    horseId?: boolean
    barrier?: boolean
    weight?: boolean
    jockeyName?: boolean
    jockeyId?: boolean
    jockeyWeightAllowance?: boolean
    trainerName?: boolean
    trainerId?: boolean
    trainerLocation?: boolean
    form?: boolean
    lastStarts?: boolean
    lastTwentyStarts?: boolean
    age?: boolean
    silkColours?: boolean
    scratched?: boolean
    scratchedAt?: boolean
    openingOdds?: boolean
    currentOdds?: boolean
    metadata?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    race?: boolean | RaceDefaultArgs<ExtArgs>
    horse?: boolean | Runner$horseArgs<ExtArgs>
    results?: boolean | Runner$resultsArgs<ExtArgs>
    oddsSnapshots?: boolean | Runner$oddsSnapshotsArgs<ExtArgs>
    _count?: boolean | RunnerCountOutputTypeDefaultArgs<ExtArgs>
  }, ExtArgs["result"]["runner"]>

  export type RunnerSelectCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    raceId?: boolean
    runnerNumber?: boolean
    entrantId?: boolean
    horseName?: boolean
    tabHorseIdLegacy?: boolean
    horseId?: boolean
    barrier?: boolean
    weight?: boolean
    jockeyName?: boolean
    jockeyId?: boolean
    jockeyWeightAllowance?: boolean
    trainerName?: boolean
    trainerId?: boolean
    trainerLocation?: boolean
    form?: boolean
    lastStarts?: boolean
    lastTwentyStarts?: boolean
    age?: boolean
    silkColours?: boolean
    scratched?: boolean
    scratchedAt?: boolean
    openingOdds?: boolean
    currentOdds?: boolean
    metadata?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    race?: boolean | RaceDefaultArgs<ExtArgs>
    horse?: boolean | Runner$horseArgs<ExtArgs>
  }, ExtArgs["result"]["runner"]>

  export type RunnerSelectScalar = {
    id?: boolean
    raceId?: boolean
    runnerNumber?: boolean
    entrantId?: boolean
    horseName?: boolean
    tabHorseIdLegacy?: boolean
    horseId?: boolean
    barrier?: boolean
    weight?: boolean
    jockeyName?: boolean
    jockeyId?: boolean
    jockeyWeightAllowance?: boolean
    trainerName?: boolean
    trainerId?: boolean
    trainerLocation?: boolean
    form?: boolean
    lastStarts?: boolean
    lastTwentyStarts?: boolean
    age?: boolean
    silkColours?: boolean
    scratched?: boolean
    scratchedAt?: boolean
    openingOdds?: boolean
    currentOdds?: boolean
    metadata?: boolean
    createdAt?: boolean
    updatedAt?: boolean
  }

  export type RunnerInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    race?: boolean | RaceDefaultArgs<ExtArgs>
    horse?: boolean | Runner$horseArgs<ExtArgs>
    results?: boolean | Runner$resultsArgs<ExtArgs>
    oddsSnapshots?: boolean | Runner$oddsSnapshotsArgs<ExtArgs>
    _count?: boolean | RunnerCountOutputTypeDefaultArgs<ExtArgs>
  }
  export type RunnerIncludeCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    race?: boolean | RaceDefaultArgs<ExtArgs>
    horse?: boolean | Runner$horseArgs<ExtArgs>
  }

  export type $RunnerPayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    name: "Runner"
    objects: {
      race: Prisma.$RacePayload<ExtArgs>
      horse: Prisma.$HorsePayload<ExtArgs> | null
      results: Prisma.$ResultPayload<ExtArgs>[]
      oddsSnapshots: Prisma.$OddsSnapshotPayload<ExtArgs>[]
    }
    scalars: $Extensions.GetPayloadResult<{
      id: string
      raceId: string
      runnerNumber: number
      entrantId: string | null
      horseName: string
      tabHorseIdLegacy: string | null
      horseId: string | null
      barrier: number | null
      weight: Prisma.Decimal | null
      jockeyName: string | null
      jockeyId: string | null
      jockeyWeightAllowance: Prisma.Decimal | null
      trainerName: string | null
      trainerId: string | null
      trainerLocation: string | null
      form: string | null
      lastStarts: Prisma.JsonValue | null
      lastTwentyStarts: string | null
      age: number | null
      silkColours: string | null
      scratched: boolean
      scratchedAt: Date | null
      openingOdds: Prisma.Decimal | null
      currentOdds: Prisma.Decimal | null
      metadata: Prisma.JsonValue | null
      createdAt: Date
      updatedAt: Date
    }, ExtArgs["result"]["runner"]>
    composites: {}
  }

  type RunnerGetPayload<S extends boolean | null | undefined | RunnerDefaultArgs> = $Result.GetResult<Prisma.$RunnerPayload, S>

  type RunnerCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = 
    Omit<RunnerFindManyArgs, 'select' | 'include' | 'distinct'> & {
      select?: RunnerCountAggregateInputType | true
    }

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

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

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

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

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

    /**
     * Create a Runner.
     * @param {RunnerCreateArgs} args - Arguments to create a Runner.
     * @example
     * // Create one Runner
     * const Runner = await prisma.runner.create({
     *   data: {
     *     // ... data to create a Runner
     *   }
     * })
     * 
     */
    create<T extends RunnerCreateArgs>(args: SelectSubset<T, RunnerCreateArgs<ExtArgs>>): Prisma__RunnerClient<$Result.GetResult<Prisma.$RunnerPayload<ExtArgs>, T, "create">, never, ExtArgs>

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

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

    /**
     * Delete a Runner.
     * @param {RunnerDeleteArgs} args - Arguments to delete one Runner.
     * @example
     * // Delete one Runner
     * const Runner = await prisma.runner.delete({
     *   where: {
     *     // ... filter to delete one Runner
     *   }
     * })
     * 
     */
    delete<T extends RunnerDeleteArgs>(args: SelectSubset<T, RunnerDeleteArgs<ExtArgs>>): Prisma__RunnerClient<$Result.GetResult<Prisma.$RunnerPayload<ExtArgs>, T, "delete">, never, ExtArgs>

    /**
     * Update one Runner.
     * @param {RunnerUpdateArgs} args - Arguments to update one Runner.
     * @example
     * // Update one Runner
     * const runner = await prisma.runner.update({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    update<T extends RunnerUpdateArgs>(args: SelectSubset<T, RunnerUpdateArgs<ExtArgs>>): Prisma__RunnerClient<$Result.GetResult<Prisma.$RunnerPayload<ExtArgs>, T, "update">, never, ExtArgs>

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

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

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


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

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

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

  /**
   * The delegate class that acts as a "Promise-like" for Runner.
   * 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__RunnerClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> extends Prisma.PrismaPromise<T> {
    readonly [Symbol.toStringTag]: "PrismaPromise"
    race<T extends RaceDefaultArgs<ExtArgs> = {}>(args?: Subset<T, RaceDefaultArgs<ExtArgs>>): Prisma__RaceClient<$Result.GetResult<Prisma.$RacePayload<ExtArgs>, T, "findUniqueOrThrow"> | Null, Null, ExtArgs>
    horse<T extends Runner$horseArgs<ExtArgs> = {}>(args?: Subset<T, Runner$horseArgs<ExtArgs>>): Prisma__HorseClient<$Result.GetResult<Prisma.$HorsePayload<ExtArgs>, T, "findUniqueOrThrow"> | null, null, ExtArgs>
    results<T extends Runner$resultsArgs<ExtArgs> = {}>(args?: Subset<T, Runner$resultsArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$ResultPayload<ExtArgs>, T, "findMany"> | Null>
    oddsSnapshots<T extends Runner$oddsSnapshotsArgs<ExtArgs> = {}>(args?: Subset<T, Runner$oddsSnapshotsArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$OddsSnapshotPayload<ExtArgs>, T, "findMany"> | 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 Runner model
   */ 
  interface RunnerFieldRefs {
    readonly id: FieldRef<"Runner", 'String'>
    readonly raceId: FieldRef<"Runner", 'String'>
    readonly runnerNumber: FieldRef<"Runner", 'Int'>
    readonly entrantId: FieldRef<"Runner", 'String'>
    readonly horseName: FieldRef<"Runner", 'String'>
    readonly tabHorseIdLegacy: FieldRef<"Runner", 'String'>
    readonly horseId: FieldRef<"Runner", 'String'>
    readonly barrier: FieldRef<"Runner", 'Int'>
    readonly weight: FieldRef<"Runner", 'Decimal'>
    readonly jockeyName: FieldRef<"Runner", 'String'>
    readonly jockeyId: FieldRef<"Runner", 'String'>
    readonly jockeyWeightAllowance: FieldRef<"Runner", 'Decimal'>
    readonly trainerName: FieldRef<"Runner", 'String'>
    readonly trainerId: FieldRef<"Runner", 'String'>
    readonly trainerLocation: FieldRef<"Runner", 'String'>
    readonly form: FieldRef<"Runner", 'String'>
    readonly lastStarts: FieldRef<"Runner", 'Json'>
    readonly lastTwentyStarts: FieldRef<"Runner", 'String'>
    readonly age: FieldRef<"Runner", 'Int'>
    readonly silkColours: FieldRef<"Runner", 'String'>
    readonly scratched: FieldRef<"Runner", 'Boolean'>
    readonly scratchedAt: FieldRef<"Runner", 'DateTime'>
    readonly openingOdds: FieldRef<"Runner", 'Decimal'>
    readonly currentOdds: FieldRef<"Runner", 'Decimal'>
    readonly metadata: FieldRef<"Runner", 'Json'>
    readonly createdAt: FieldRef<"Runner", 'DateTime'>
    readonly updatedAt: FieldRef<"Runner", 'DateTime'>
  }
    

  // Custom InputTypes
  /**
   * Runner findUnique
   */
  export type RunnerFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Runner
     */
    select?: RunnerSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RunnerInclude<ExtArgs> | null
    /**
     * Filter, which Runner to fetch.
     */
    where: RunnerWhereUniqueInput
  }

  /**
   * Runner findUniqueOrThrow
   */
  export type RunnerFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Runner
     */
    select?: RunnerSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RunnerInclude<ExtArgs> | null
    /**
     * Filter, which Runner to fetch.
     */
    where: RunnerWhereUniqueInput
  }

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

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

  /**
   * Runner findMany
   */
  export type RunnerFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Runner
     */
    select?: RunnerSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RunnerInclude<ExtArgs> | null
    /**
     * Filter, which Runners to fetch.
     */
    where?: RunnerWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Runners to fetch.
     */
    orderBy?: RunnerOrderByWithRelationInput | RunnerOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for listing Runners.
     */
    cursor?: RunnerWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Runners 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` Runners.
     */
    skip?: number
    distinct?: RunnerScalarFieldEnum | RunnerScalarFieldEnum[]
  }

  /**
   * Runner create
   */
  export type RunnerCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Runner
     */
    select?: RunnerSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RunnerInclude<ExtArgs> | null
    /**
     * The data needed to create a Runner.
     */
    data: XOR<RunnerCreateInput, RunnerUncheckedCreateInput>
  }

  /**
   * Runner createMany
   */
  export type RunnerCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to create many Runners.
     */
    data: RunnerCreateManyInput | RunnerCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * Runner createManyAndReturn
   */
  export type RunnerCreateManyAndReturnArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Runner
     */
    select?: RunnerSelectCreateManyAndReturn<ExtArgs> | null
    /**
     * The data used to create many Runners.
     */
    data: RunnerCreateManyInput | RunnerCreateManyInput[]
    skipDuplicates?: boolean
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RunnerIncludeCreateManyAndReturn<ExtArgs> | null
  }

  /**
   * Runner update
   */
  export type RunnerUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Runner
     */
    select?: RunnerSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RunnerInclude<ExtArgs> | null
    /**
     * The data needed to update a Runner.
     */
    data: XOR<RunnerUpdateInput, RunnerUncheckedUpdateInput>
    /**
     * Choose, which Runner to update.
     */
    where: RunnerWhereUniqueInput
  }

  /**
   * Runner updateMany
   */
  export type RunnerUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to update Runners.
     */
    data: XOR<RunnerUpdateManyMutationInput, RunnerUncheckedUpdateManyInput>
    /**
     * Filter which Runners to update
     */
    where?: RunnerWhereInput
  }

  /**
   * Runner upsert
   */
  export type RunnerUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Runner
     */
    select?: RunnerSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RunnerInclude<ExtArgs> | null
    /**
     * The filter to search for the Runner to update in case it exists.
     */
    where: RunnerWhereUniqueInput
    /**
     * In case the Runner found by the `where` argument doesn't exist, create a new Runner with this data.
     */
    create: XOR<RunnerCreateInput, RunnerUncheckedCreateInput>
    /**
     * In case the Runner was found with the provided `where` argument, update it with this data.
     */
    update: XOR<RunnerUpdateInput, RunnerUncheckedUpdateInput>
  }

  /**
   * Runner delete
   */
  export type RunnerDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Runner
     */
    select?: RunnerSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RunnerInclude<ExtArgs> | null
    /**
     * Filter which Runner to delete.
     */
    where: RunnerWhereUniqueInput
  }

  /**
   * Runner deleteMany
   */
  export type RunnerDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which Runners to delete
     */
    where?: RunnerWhereInput
  }

  /**
   * Runner.horse
   */
  export type Runner$horseArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Horse
     */
    select?: HorseSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: HorseInclude<ExtArgs> | null
    where?: HorseWhereInput
  }

  /**
   * Runner.results
   */
  export type Runner$resultsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Result
     */
    select?: ResultSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ResultInclude<ExtArgs> | null
    where?: ResultWhereInput
    orderBy?: ResultOrderByWithRelationInput | ResultOrderByWithRelationInput[]
    cursor?: ResultWhereUniqueInput
    take?: number
    skip?: number
    distinct?: ResultScalarFieldEnum | ResultScalarFieldEnum[]
  }

  /**
   * Runner.oddsSnapshots
   */
  export type Runner$oddsSnapshotsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the OddsSnapshot
     */
    select?: OddsSnapshotSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: OddsSnapshotInclude<ExtArgs> | null
    where?: OddsSnapshotWhereInput
    orderBy?: OddsSnapshotOrderByWithRelationInput | OddsSnapshotOrderByWithRelationInput[]
    cursor?: OddsSnapshotWhereUniqueInput
    take?: number
    skip?: number
    distinct?: OddsSnapshotScalarFieldEnum | OddsSnapshotScalarFieldEnum[]
  }

  /**
   * Runner without action
   */
  export type RunnerDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Runner
     */
    select?: RunnerSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: RunnerInclude<ExtArgs> | null
  }


  /**
   * Model Result
   */

  export type AggregateResult = {
    _count: ResultCountAggregateOutputType | null
    _avg: ResultAvgAggregateOutputType | null
    _sum: ResultSumAggregateOutputType | null
    _min: ResultMinAggregateOutputType | null
    _max: ResultMaxAggregateOutputType | null
  }

  export type ResultAvgAggregateOutputType = {
    finishPosition: number | null
    margin: Decimal | null
    raceTime: Decimal | null
    winDividend: Decimal | null
    placeDividend: Decimal | null
  }

  export type ResultSumAggregateOutputType = {
    finishPosition: number | null
    margin: Decimal | null
    raceTime: Decimal | null
    winDividend: Decimal | null
    placeDividend: Decimal | null
  }

  export type ResultMinAggregateOutputType = {
    id: string | null
    raceId: string | null
    runnerId: string | null
    finishPosition: number | null
    margin: Decimal | null
    raceTime: Decimal | null
    winDividend: Decimal | null
    placeDividend: Decimal | null
    official: boolean | null
    disqualified: boolean | null
    createdAt: Date | null
  }

  export type ResultMaxAggregateOutputType = {
    id: string | null
    raceId: string | null
    runnerId: string | null
    finishPosition: number | null
    margin: Decimal | null
    raceTime: Decimal | null
    winDividend: Decimal | null
    placeDividend: Decimal | null
    official: boolean | null
    disqualified: boolean | null
    createdAt: Date | null
  }

  export type ResultCountAggregateOutputType = {
    id: number
    raceId: number
    runnerId: number
    finishPosition: number
    margin: number
    raceTime: number
    winDividend: number
    placeDividend: number
    official: number
    disqualified: number
    metadata: number
    createdAt: number
    _all: number
  }


  export type ResultAvgAggregateInputType = {
    finishPosition?: true
    margin?: true
    raceTime?: true
    winDividend?: true
    placeDividend?: true
  }

  export type ResultSumAggregateInputType = {
    finishPosition?: true
    margin?: true
    raceTime?: true
    winDividend?: true
    placeDividend?: true
  }

  export type ResultMinAggregateInputType = {
    id?: true
    raceId?: true
    runnerId?: true
    finishPosition?: true
    margin?: true
    raceTime?: true
    winDividend?: true
    placeDividend?: true
    official?: true
    disqualified?: true
    createdAt?: true
  }

  export type ResultMaxAggregateInputType = {
    id?: true
    raceId?: true
    runnerId?: true
    finishPosition?: true
    margin?: true
    raceTime?: true
    winDividend?: true
    placeDividend?: true
    official?: true
    disqualified?: true
    createdAt?: true
  }

  export type ResultCountAggregateInputType = {
    id?: true
    raceId?: true
    runnerId?: true
    finishPosition?: true
    margin?: true
    raceTime?: true
    winDividend?: true
    placeDividend?: true
    official?: true
    disqualified?: true
    metadata?: true
    createdAt?: true
    _all?: true
  }

  export type ResultAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which Result to aggregate.
     */
    where?: ResultWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Results to fetch.
     */
    orderBy?: ResultOrderByWithRelationInput | ResultOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the start position
     */
    cursor?: ResultWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Results 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` Results.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Count returned Results
    **/
    _count?: true | ResultCountAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to average
    **/
    _avg?: ResultAvgAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to sum
    **/
    _sum?: ResultSumAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the minimum value
    **/
    _min?: ResultMinAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the maximum value
    **/
    _max?: ResultMaxAggregateInputType
  }

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




  export type ResultGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: ResultWhereInput
    orderBy?: ResultOrderByWithAggregationInput | ResultOrderByWithAggregationInput[]
    by: ResultScalarFieldEnum[] | ResultScalarFieldEnum
    having?: ResultScalarWhereWithAggregatesInput
    take?: number
    skip?: number
    _count?: ResultCountAggregateInputType | true
    _avg?: ResultAvgAggregateInputType
    _sum?: ResultSumAggregateInputType
    _min?: ResultMinAggregateInputType
    _max?: ResultMaxAggregateInputType
  }

  export type ResultGroupByOutputType = {
    id: string
    raceId: string
    runnerId: string
    finishPosition: number | null
    margin: Decimal | null
    raceTime: Decimal | null
    winDividend: Decimal | null
    placeDividend: Decimal | null
    official: boolean
    disqualified: boolean
    metadata: JsonValue | null
    createdAt: Date
    _count: ResultCountAggregateOutputType | null
    _avg: ResultAvgAggregateOutputType | null
    _sum: ResultSumAggregateOutputType | null
    _min: ResultMinAggregateOutputType | null
    _max: ResultMaxAggregateOutputType | null
  }

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


  export type ResultSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    raceId?: boolean
    runnerId?: boolean
    finishPosition?: boolean
    margin?: boolean
    raceTime?: boolean
    winDividend?: boolean
    placeDividend?: boolean
    official?: boolean
    disqualified?: boolean
    metadata?: boolean
    createdAt?: boolean
    race?: boolean | RaceDefaultArgs<ExtArgs>
    runner?: boolean | RunnerDefaultArgs<ExtArgs>
  }, ExtArgs["result"]["result"]>

  export type ResultSelectCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    raceId?: boolean
    runnerId?: boolean
    finishPosition?: boolean
    margin?: boolean
    raceTime?: boolean
    winDividend?: boolean
    placeDividend?: boolean
    official?: boolean
    disqualified?: boolean
    metadata?: boolean
    createdAt?: boolean
    race?: boolean | RaceDefaultArgs<ExtArgs>
    runner?: boolean | RunnerDefaultArgs<ExtArgs>
  }, ExtArgs["result"]["result"]>

  export type ResultSelectScalar = {
    id?: boolean
    raceId?: boolean
    runnerId?: boolean
    finishPosition?: boolean
    margin?: boolean
    raceTime?: boolean
    winDividend?: boolean
    placeDividend?: boolean
    official?: boolean
    disqualified?: boolean
    metadata?: boolean
    createdAt?: boolean
  }

  export type ResultInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    race?: boolean | RaceDefaultArgs<ExtArgs>
    runner?: boolean | RunnerDefaultArgs<ExtArgs>
  }
  export type ResultIncludeCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    race?: boolean | RaceDefaultArgs<ExtArgs>
    runner?: boolean | RunnerDefaultArgs<ExtArgs>
  }

  export type $ResultPayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    name: "Result"
    objects: {
      race: Prisma.$RacePayload<ExtArgs>
      runner: Prisma.$RunnerPayload<ExtArgs>
    }
    scalars: $Extensions.GetPayloadResult<{
      id: string
      raceId: string
      runnerId: string
      finishPosition: number | null
      margin: Prisma.Decimal | null
      raceTime: Prisma.Decimal | null
      winDividend: Prisma.Decimal | null
      placeDividend: Prisma.Decimal | null
      official: boolean
      disqualified: boolean
      metadata: Prisma.JsonValue | null
      createdAt: Date
    }, ExtArgs["result"]["result"]>
    composites: {}
  }

  type ResultGetPayload<S extends boolean | null | undefined | ResultDefaultArgs> = $Result.GetResult<Prisma.$ResultPayload, S>

  type ResultCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = 
    Omit<ResultFindManyArgs, 'select' | 'include' | 'distinct'> & {
      select?: ResultCountAggregateInputType | true
    }

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

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

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

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

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

    /**
     * Create a Result.
     * @param {ResultCreateArgs} args - Arguments to create a Result.
     * @example
     * // Create one Result
     * const Result = await prisma.result.create({
     *   data: {
     *     // ... data to create a Result
     *   }
     * })
     * 
     */
    create<T extends ResultCreateArgs>(args: SelectSubset<T, ResultCreateArgs<ExtArgs>>): Prisma__ResultClient<$Result.GetResult<Prisma.$ResultPayload<ExtArgs>, T, "create">, never, ExtArgs>

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

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

    /**
     * Delete a Result.
     * @param {ResultDeleteArgs} args - Arguments to delete one Result.
     * @example
     * // Delete one Result
     * const Result = await prisma.result.delete({
     *   where: {
     *     // ... filter to delete one Result
     *   }
     * })
     * 
     */
    delete<T extends ResultDeleteArgs>(args: SelectSubset<T, ResultDeleteArgs<ExtArgs>>): Prisma__ResultClient<$Result.GetResult<Prisma.$ResultPayload<ExtArgs>, T, "delete">, never, ExtArgs>

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

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

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

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


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

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

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

  /**
   * The delegate class that acts as a "Promise-like" for Result.
   * 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__ResultClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> extends Prisma.PrismaPromise<T> {
    readonly [Symbol.toStringTag]: "PrismaPromise"
    race<T extends RaceDefaultArgs<ExtArgs> = {}>(args?: Subset<T, RaceDefaultArgs<ExtArgs>>): Prisma__RaceClient<$Result.GetResult<Prisma.$RacePayload<ExtArgs>, T, "findUniqueOrThrow"> | Null, Null, ExtArgs>
    runner<T extends RunnerDefaultArgs<ExtArgs> = {}>(args?: Subset<T, RunnerDefaultArgs<ExtArgs>>): Prisma__RunnerClient<$Result.GetResult<Prisma.$RunnerPayload<ExtArgs>, T, "findUniqueOrThrow"> | Null, Null, ExtArgs>
    /**
     * 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 Result model
   */ 
  interface ResultFieldRefs {
    readonly id: FieldRef<"Result", 'String'>
    readonly raceId: FieldRef<"Result", 'String'>
    readonly runnerId: FieldRef<"Result", 'String'>
    readonly finishPosition: FieldRef<"Result", 'Int'>
    readonly margin: FieldRef<"Result", 'Decimal'>
    readonly raceTime: FieldRef<"Result", 'Decimal'>
    readonly winDividend: FieldRef<"Result", 'Decimal'>
    readonly placeDividend: FieldRef<"Result", 'Decimal'>
    readonly official: FieldRef<"Result", 'Boolean'>
    readonly disqualified: FieldRef<"Result", 'Boolean'>
    readonly metadata: FieldRef<"Result", 'Json'>
    readonly createdAt: FieldRef<"Result", 'DateTime'>
  }
    

  // Custom InputTypes
  /**
   * Result findUnique
   */
  export type ResultFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Result
     */
    select?: ResultSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ResultInclude<ExtArgs> | null
    /**
     * Filter, which Result to fetch.
     */
    where: ResultWhereUniqueInput
  }

  /**
   * Result findUniqueOrThrow
   */
  export type ResultFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Result
     */
    select?: ResultSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ResultInclude<ExtArgs> | null
    /**
     * Filter, which Result to fetch.
     */
    where: ResultWhereUniqueInput
  }

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

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

  /**
   * Result findMany
   */
  export type ResultFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Result
     */
    select?: ResultSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ResultInclude<ExtArgs> | null
    /**
     * Filter, which Results to fetch.
     */
    where?: ResultWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Results to fetch.
     */
    orderBy?: ResultOrderByWithRelationInput | ResultOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for listing Results.
     */
    cursor?: ResultWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Results 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` Results.
     */
    skip?: number
    distinct?: ResultScalarFieldEnum | ResultScalarFieldEnum[]
  }

  /**
   * Result create
   */
  export type ResultCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Result
     */
    select?: ResultSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ResultInclude<ExtArgs> | null
    /**
     * The data needed to create a Result.
     */
    data: XOR<ResultCreateInput, ResultUncheckedCreateInput>
  }

  /**
   * Result createMany
   */
  export type ResultCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to create many Results.
     */
    data: ResultCreateManyInput | ResultCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * Result createManyAndReturn
   */
  export type ResultCreateManyAndReturnArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Result
     */
    select?: ResultSelectCreateManyAndReturn<ExtArgs> | null
    /**
     * The data used to create many Results.
     */
    data: ResultCreateManyInput | ResultCreateManyInput[]
    skipDuplicates?: boolean
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ResultIncludeCreateManyAndReturn<ExtArgs> | null
  }

  /**
   * Result update
   */
  export type ResultUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Result
     */
    select?: ResultSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ResultInclude<ExtArgs> | null
    /**
     * The data needed to update a Result.
     */
    data: XOR<ResultUpdateInput, ResultUncheckedUpdateInput>
    /**
     * Choose, which Result to update.
     */
    where: ResultWhereUniqueInput
  }

  /**
   * Result updateMany
   */
  export type ResultUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to update Results.
     */
    data: XOR<ResultUpdateManyMutationInput, ResultUncheckedUpdateManyInput>
    /**
     * Filter which Results to update
     */
    where?: ResultWhereInput
  }

  /**
   * Result upsert
   */
  export type ResultUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Result
     */
    select?: ResultSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ResultInclude<ExtArgs> | null
    /**
     * The filter to search for the Result to update in case it exists.
     */
    where: ResultWhereUniqueInput
    /**
     * In case the Result found by the `where` argument doesn't exist, create a new Result with this data.
     */
    create: XOR<ResultCreateInput, ResultUncheckedCreateInput>
    /**
     * In case the Result was found with the provided `where` argument, update it with this data.
     */
    update: XOR<ResultUpdateInput, ResultUncheckedUpdateInput>
  }

  /**
   * Result delete
   */
  export type ResultDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Result
     */
    select?: ResultSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ResultInclude<ExtArgs> | null
    /**
     * Filter which Result to delete.
     */
    where: ResultWhereUniqueInput
  }

  /**
   * Result deleteMany
   */
  export type ResultDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which Results to delete
     */
    where?: ResultWhereInput
  }

  /**
   * Result without action
   */
  export type ResultDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Result
     */
    select?: ResultSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ResultInclude<ExtArgs> | null
  }


  /**
   * Model Scrape
   */

  export type AggregateScrape = {
    _count: ScrapeCountAggregateOutputType | null
    _min: ScrapeMinAggregateOutputType | null
    _max: ScrapeMaxAggregateOutputType | null
  }

  export type ScrapeMinAggregateOutputType = {
    id: string | null
    raceId: string | null
    scrapeType: string | null
    scrapedAt: Date | null
    success: boolean | null
    errorMessage: string | null
    jobRunId: string | null
  }

  export type ScrapeMaxAggregateOutputType = {
    id: string | null
    raceId: string | null
    scrapeType: string | null
    scrapedAt: Date | null
    success: boolean | null
    errorMessage: string | null
    jobRunId: string | null
  }

  export type ScrapeCountAggregateOutputType = {
    id: number
    raceId: number
    scrapeType: number
    scrapedAt: number
    changesDetected: number
    success: number
    errorMessage: number
    jobRunId: number
    _all: number
  }


  export type ScrapeMinAggregateInputType = {
    id?: true
    raceId?: true
    scrapeType?: true
    scrapedAt?: true
    success?: true
    errorMessage?: true
    jobRunId?: true
  }

  export type ScrapeMaxAggregateInputType = {
    id?: true
    raceId?: true
    scrapeType?: true
    scrapedAt?: true
    success?: true
    errorMessage?: true
    jobRunId?: true
  }

  export type ScrapeCountAggregateInputType = {
    id?: true
    raceId?: true
    scrapeType?: true
    scrapedAt?: true
    changesDetected?: true
    success?: true
    errorMessage?: true
    jobRunId?: true
    _all?: true
  }

  export type ScrapeAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which Scrape to aggregate.
     */
    where?: ScrapeWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Scrapes to fetch.
     */
    orderBy?: ScrapeOrderByWithRelationInput | ScrapeOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the start position
     */
    cursor?: ScrapeWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Scrapes 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` Scrapes.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Count returned Scrapes
    **/
    _count?: true | ScrapeCountAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the minimum value
    **/
    _min?: ScrapeMinAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the maximum value
    **/
    _max?: ScrapeMaxAggregateInputType
  }

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




  export type ScrapeGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: ScrapeWhereInput
    orderBy?: ScrapeOrderByWithAggregationInput | ScrapeOrderByWithAggregationInput[]
    by: ScrapeScalarFieldEnum[] | ScrapeScalarFieldEnum
    having?: ScrapeScalarWhereWithAggregatesInput
    take?: number
    skip?: number
    _count?: ScrapeCountAggregateInputType | true
    _min?: ScrapeMinAggregateInputType
    _max?: ScrapeMaxAggregateInputType
  }

  export type ScrapeGroupByOutputType = {
    id: string
    raceId: string
    scrapeType: string
    scrapedAt: Date
    changesDetected: JsonValue | null
    success: boolean
    errorMessage: string | null
    jobRunId: string | null
    _count: ScrapeCountAggregateOutputType | null
    _min: ScrapeMinAggregateOutputType | null
    _max: ScrapeMaxAggregateOutputType | null
  }

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


  export type ScrapeSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    raceId?: boolean
    scrapeType?: boolean
    scrapedAt?: boolean
    changesDetected?: boolean
    success?: boolean
    errorMessage?: boolean
    jobRunId?: boolean
    race?: boolean | RaceDefaultArgs<ExtArgs>
    jobRun?: boolean | Scrape$jobRunArgs<ExtArgs>
  }, ExtArgs["result"]["scrape"]>

  export type ScrapeSelectCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    raceId?: boolean
    scrapeType?: boolean
    scrapedAt?: boolean
    changesDetected?: boolean
    success?: boolean
    errorMessage?: boolean
    jobRunId?: boolean
    race?: boolean | RaceDefaultArgs<ExtArgs>
    jobRun?: boolean | Scrape$jobRunArgs<ExtArgs>
  }, ExtArgs["result"]["scrape"]>

  export type ScrapeSelectScalar = {
    id?: boolean
    raceId?: boolean
    scrapeType?: boolean
    scrapedAt?: boolean
    changesDetected?: boolean
    success?: boolean
    errorMessage?: boolean
    jobRunId?: boolean
  }

  export type ScrapeInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    race?: boolean | RaceDefaultArgs<ExtArgs>
    jobRun?: boolean | Scrape$jobRunArgs<ExtArgs>
  }
  export type ScrapeIncludeCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    race?: boolean | RaceDefaultArgs<ExtArgs>
    jobRun?: boolean | Scrape$jobRunArgs<ExtArgs>
  }

  export type $ScrapePayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    name: "Scrape"
    objects: {
      race: Prisma.$RacePayload<ExtArgs>
      jobRun: Prisma.$JobRunPayload<ExtArgs> | null
    }
    scalars: $Extensions.GetPayloadResult<{
      id: string
      raceId: string
      scrapeType: string
      scrapedAt: Date
      changesDetected: Prisma.JsonValue | null
      success: boolean
      errorMessage: string | null
      jobRunId: string | null
    }, ExtArgs["result"]["scrape"]>
    composites: {}
  }

  type ScrapeGetPayload<S extends boolean | null | undefined | ScrapeDefaultArgs> = $Result.GetResult<Prisma.$ScrapePayload, S>

  type ScrapeCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = 
    Omit<ScrapeFindManyArgs, 'select' | 'include' | 'distinct'> & {
      select?: ScrapeCountAggregateInputType | true
    }

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

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

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

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

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

    /**
     * Create a Scrape.
     * @param {ScrapeCreateArgs} args - Arguments to create a Scrape.
     * @example
     * // Create one Scrape
     * const Scrape = await prisma.scrape.create({
     *   data: {
     *     // ... data to create a Scrape
     *   }
     * })
     * 
     */
    create<T extends ScrapeCreateArgs>(args: SelectSubset<T, ScrapeCreateArgs<ExtArgs>>): Prisma__ScrapeClient<$Result.GetResult<Prisma.$ScrapePayload<ExtArgs>, T, "create">, never, ExtArgs>

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

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

    /**
     * Delete a Scrape.
     * @param {ScrapeDeleteArgs} args - Arguments to delete one Scrape.
     * @example
     * // Delete one Scrape
     * const Scrape = await prisma.scrape.delete({
     *   where: {
     *     // ... filter to delete one Scrape
     *   }
     * })
     * 
     */
    delete<T extends ScrapeDeleteArgs>(args: SelectSubset<T, ScrapeDeleteArgs<ExtArgs>>): Prisma__ScrapeClient<$Result.GetResult<Prisma.$ScrapePayload<ExtArgs>, T, "delete">, never, ExtArgs>

    /**
     * Update one Scrape.
     * @param {ScrapeUpdateArgs} args - Arguments to update one Scrape.
     * @example
     * // Update one Scrape
     * const scrape = await prisma.scrape.update({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    update<T extends ScrapeUpdateArgs>(args: SelectSubset<T, ScrapeUpdateArgs<ExtArgs>>): Prisma__ScrapeClient<$Result.GetResult<Prisma.$ScrapePayload<ExtArgs>, T, "update">, never, ExtArgs>

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

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

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


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

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

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

  /**
   * The delegate class that acts as a "Promise-like" for Scrape.
   * 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__ScrapeClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> extends Prisma.PrismaPromise<T> {
    readonly [Symbol.toStringTag]: "PrismaPromise"
    race<T extends RaceDefaultArgs<ExtArgs> = {}>(args?: Subset<T, RaceDefaultArgs<ExtArgs>>): Prisma__RaceClient<$Result.GetResult<Prisma.$RacePayload<ExtArgs>, T, "findUniqueOrThrow"> | Null, Null, ExtArgs>
    jobRun<T extends Scrape$jobRunArgs<ExtArgs> = {}>(args?: Subset<T, Scrape$jobRunArgs<ExtArgs>>): Prisma__JobRunClient<$Result.GetResult<Prisma.$JobRunPayload<ExtArgs>, T, "findUniqueOrThrow"> | null, null, ExtArgs>
    /**
     * 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 Scrape model
   */ 
  interface ScrapeFieldRefs {
    readonly id: FieldRef<"Scrape", 'String'>
    readonly raceId: FieldRef<"Scrape", 'String'>
    readonly scrapeType: FieldRef<"Scrape", 'String'>
    readonly scrapedAt: FieldRef<"Scrape", 'DateTime'>
    readonly changesDetected: FieldRef<"Scrape", 'Json'>
    readonly success: FieldRef<"Scrape", 'Boolean'>
    readonly errorMessage: FieldRef<"Scrape", 'String'>
    readonly jobRunId: FieldRef<"Scrape", 'String'>
  }
    

  // Custom InputTypes
  /**
   * Scrape findUnique
   */
  export type ScrapeFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Scrape
     */
    select?: ScrapeSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ScrapeInclude<ExtArgs> | null
    /**
     * Filter, which Scrape to fetch.
     */
    where: ScrapeWhereUniqueInput
  }

  /**
   * Scrape findUniqueOrThrow
   */
  export type ScrapeFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Scrape
     */
    select?: ScrapeSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ScrapeInclude<ExtArgs> | null
    /**
     * Filter, which Scrape to fetch.
     */
    where: ScrapeWhereUniqueInput
  }

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

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

  /**
   * Scrape findMany
   */
  export type ScrapeFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Scrape
     */
    select?: ScrapeSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ScrapeInclude<ExtArgs> | null
    /**
     * Filter, which Scrapes to fetch.
     */
    where?: ScrapeWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Scrapes to fetch.
     */
    orderBy?: ScrapeOrderByWithRelationInput | ScrapeOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for listing Scrapes.
     */
    cursor?: ScrapeWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Scrapes 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` Scrapes.
     */
    skip?: number
    distinct?: ScrapeScalarFieldEnum | ScrapeScalarFieldEnum[]
  }

  /**
   * Scrape create
   */
  export type ScrapeCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Scrape
     */
    select?: ScrapeSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ScrapeInclude<ExtArgs> | null
    /**
     * The data needed to create a Scrape.
     */
    data: XOR<ScrapeCreateInput, ScrapeUncheckedCreateInput>
  }

  /**
   * Scrape createMany
   */
  export type ScrapeCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to create many Scrapes.
     */
    data: ScrapeCreateManyInput | ScrapeCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * Scrape createManyAndReturn
   */
  export type ScrapeCreateManyAndReturnArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Scrape
     */
    select?: ScrapeSelectCreateManyAndReturn<ExtArgs> | null
    /**
     * The data used to create many Scrapes.
     */
    data: ScrapeCreateManyInput | ScrapeCreateManyInput[]
    skipDuplicates?: boolean
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ScrapeIncludeCreateManyAndReturn<ExtArgs> | null
  }

  /**
   * Scrape update
   */
  export type ScrapeUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Scrape
     */
    select?: ScrapeSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ScrapeInclude<ExtArgs> | null
    /**
     * The data needed to update a Scrape.
     */
    data: XOR<ScrapeUpdateInput, ScrapeUncheckedUpdateInput>
    /**
     * Choose, which Scrape to update.
     */
    where: ScrapeWhereUniqueInput
  }

  /**
   * Scrape updateMany
   */
  export type ScrapeUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to update Scrapes.
     */
    data: XOR<ScrapeUpdateManyMutationInput, ScrapeUncheckedUpdateManyInput>
    /**
     * Filter which Scrapes to update
     */
    where?: ScrapeWhereInput
  }

  /**
   * Scrape upsert
   */
  export type ScrapeUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Scrape
     */
    select?: ScrapeSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ScrapeInclude<ExtArgs> | null
    /**
     * The filter to search for the Scrape to update in case it exists.
     */
    where: ScrapeWhereUniqueInput
    /**
     * In case the Scrape found by the `where` argument doesn't exist, create a new Scrape with this data.
     */
    create: XOR<ScrapeCreateInput, ScrapeUncheckedCreateInput>
    /**
     * In case the Scrape was found with the provided `where` argument, update it with this data.
     */
    update: XOR<ScrapeUpdateInput, ScrapeUncheckedUpdateInput>
  }

  /**
   * Scrape delete
   */
  export type ScrapeDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Scrape
     */
    select?: ScrapeSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ScrapeInclude<ExtArgs> | null
    /**
     * Filter which Scrape to delete.
     */
    where: ScrapeWhereUniqueInput
  }

  /**
   * Scrape deleteMany
   */
  export type ScrapeDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which Scrapes to delete
     */
    where?: ScrapeWhereInput
  }

  /**
   * Scrape.jobRun
   */
  export type Scrape$jobRunArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the JobRun
     */
    select?: JobRunSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: JobRunInclude<ExtArgs> | null
    where?: JobRunWhereInput
  }

  /**
   * Scrape without action
   */
  export type ScrapeDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Scrape
     */
    select?: ScrapeSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ScrapeInclude<ExtArgs> | null
  }


  /**
   * Model JobRun
   */

  export type AggregateJobRun = {
    _count: JobRunCountAggregateOutputType | null
    _avg: JobRunAvgAggregateOutputType | null
    _sum: JobRunSumAggregateOutputType | null
    _min: JobRunMinAggregateOutputType | null
    _max: JobRunMaxAggregateOutputType | null
  }

  export type JobRunAvgAggregateOutputType = {
    durationMs: number | null
    itemsProcessed: number | null
    itemsFailed: number | null
    retryCount: number | null
  }

  export type JobRunSumAggregateOutputType = {
    durationMs: number | null
    itemsProcessed: number | null
    itemsFailed: number | null
    retryCount: number | null
  }

  export type JobRunMinAggregateOutputType = {
    id: string | null
    jobType: string | null
    status: string | null
    startedAt: Date | null
    completedAt: Date | null
    durationMs: number | null
    itemsProcessed: number | null
    itemsFailed: number | null
    errorMessage: string | null
    retryCount: number | null
    parentJobRunId: string | null
  }

  export type JobRunMaxAggregateOutputType = {
    id: string | null
    jobType: string | null
    status: string | null
    startedAt: Date | null
    completedAt: Date | null
    durationMs: number | null
    itemsProcessed: number | null
    itemsFailed: number | null
    errorMessage: string | null
    retryCount: number | null
    parentJobRunId: string | null
  }

  export type JobRunCountAggregateOutputType = {
    id: number
    jobType: number
    status: number
    startedAt: number
    completedAt: number
    durationMs: number
    itemsProcessed: number
    itemsFailed: number
    errorMessage: number
    metadata: number
    retryCount: number
    parentJobRunId: number
    _all: number
  }


  export type JobRunAvgAggregateInputType = {
    durationMs?: true
    itemsProcessed?: true
    itemsFailed?: true
    retryCount?: true
  }

  export type JobRunSumAggregateInputType = {
    durationMs?: true
    itemsProcessed?: true
    itemsFailed?: true
    retryCount?: true
  }

  export type JobRunMinAggregateInputType = {
    id?: true
    jobType?: true
    status?: true
    startedAt?: true
    completedAt?: true
    durationMs?: true
    itemsProcessed?: true
    itemsFailed?: true
    errorMessage?: true
    retryCount?: true
    parentJobRunId?: true
  }

  export type JobRunMaxAggregateInputType = {
    id?: true
    jobType?: true
    status?: true
    startedAt?: true
    completedAt?: true
    durationMs?: true
    itemsProcessed?: true
    itemsFailed?: true
    errorMessage?: true
    retryCount?: true
    parentJobRunId?: true
  }

  export type JobRunCountAggregateInputType = {
    id?: true
    jobType?: true
    status?: true
    startedAt?: true
    completedAt?: true
    durationMs?: true
    itemsProcessed?: true
    itemsFailed?: true
    errorMessage?: true
    metadata?: true
    retryCount?: true
    parentJobRunId?: true
    _all?: true
  }

  export type JobRunAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which JobRun to aggregate.
     */
    where?: JobRunWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of JobRuns to fetch.
     */
    orderBy?: JobRunOrderByWithRelationInput | JobRunOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the start position
     */
    cursor?: JobRunWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` JobRuns 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` JobRuns.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Count returned JobRuns
    **/
    _count?: true | JobRunCountAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to average
    **/
    _avg?: JobRunAvgAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to sum
    **/
    _sum?: JobRunSumAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the minimum value
    **/
    _min?: JobRunMinAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the maximum value
    **/
    _max?: JobRunMaxAggregateInputType
  }

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




  export type JobRunGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: JobRunWhereInput
    orderBy?: JobRunOrderByWithAggregationInput | JobRunOrderByWithAggregationInput[]
    by: JobRunScalarFieldEnum[] | JobRunScalarFieldEnum
    having?: JobRunScalarWhereWithAggregatesInput
    take?: number
    skip?: number
    _count?: JobRunCountAggregateInputType | true
    _avg?: JobRunAvgAggregateInputType
    _sum?: JobRunSumAggregateInputType
    _min?: JobRunMinAggregateInputType
    _max?: JobRunMaxAggregateInputType
  }

  export type JobRunGroupByOutputType = {
    id: string
    jobType: string
    status: string
    startedAt: Date
    completedAt: Date | null
    durationMs: number | null
    itemsProcessed: number
    itemsFailed: number
    errorMessage: string | null
    metadata: JsonValue | null
    retryCount: number
    parentJobRunId: string | null
    _count: JobRunCountAggregateOutputType | null
    _avg: JobRunAvgAggregateOutputType | null
    _sum: JobRunSumAggregateOutputType | null
    _min: JobRunMinAggregateOutputType | null
    _max: JobRunMaxAggregateOutputType | null
  }

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


  export type JobRunSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    jobType?: boolean
    status?: boolean
    startedAt?: boolean
    completedAt?: boolean
    durationMs?: boolean
    itemsProcessed?: boolean
    itemsFailed?: boolean
    errorMessage?: boolean
    metadata?: boolean
    retryCount?: boolean
    parentJobRunId?: boolean
    scrapes?: boolean | JobRun$scrapesArgs<ExtArgs>
    parentJobRun?: boolean | JobRun$parentJobRunArgs<ExtArgs>
    retryJobRuns?: boolean | JobRun$retryJobRunsArgs<ExtArgs>
    _count?: boolean | JobRunCountOutputTypeDefaultArgs<ExtArgs>
  }, ExtArgs["result"]["jobRun"]>

  export type JobRunSelectCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    jobType?: boolean
    status?: boolean
    startedAt?: boolean
    completedAt?: boolean
    durationMs?: boolean
    itemsProcessed?: boolean
    itemsFailed?: boolean
    errorMessage?: boolean
    metadata?: boolean
    retryCount?: boolean
    parentJobRunId?: boolean
    parentJobRun?: boolean | JobRun$parentJobRunArgs<ExtArgs>
  }, ExtArgs["result"]["jobRun"]>

  export type JobRunSelectScalar = {
    id?: boolean
    jobType?: boolean
    status?: boolean
    startedAt?: boolean
    completedAt?: boolean
    durationMs?: boolean
    itemsProcessed?: boolean
    itemsFailed?: boolean
    errorMessage?: boolean
    metadata?: boolean
    retryCount?: boolean
    parentJobRunId?: boolean
  }

  export type JobRunInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    scrapes?: boolean | JobRun$scrapesArgs<ExtArgs>
    parentJobRun?: boolean | JobRun$parentJobRunArgs<ExtArgs>
    retryJobRuns?: boolean | JobRun$retryJobRunsArgs<ExtArgs>
    _count?: boolean | JobRunCountOutputTypeDefaultArgs<ExtArgs>
  }
  export type JobRunIncludeCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    parentJobRun?: boolean | JobRun$parentJobRunArgs<ExtArgs>
  }

  export type $JobRunPayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    name: "JobRun"
    objects: {
      scrapes: Prisma.$ScrapePayload<ExtArgs>[]
      parentJobRun: Prisma.$JobRunPayload<ExtArgs> | null
      retryJobRuns: Prisma.$JobRunPayload<ExtArgs>[]
    }
    scalars: $Extensions.GetPayloadResult<{
      id: string
      jobType: string
      status: string
      startedAt: Date
      completedAt: Date | null
      durationMs: number | null
      itemsProcessed: number
      itemsFailed: number
      errorMessage: string | null
      metadata: Prisma.JsonValue | null
      retryCount: number
      parentJobRunId: string | null
    }, ExtArgs["result"]["jobRun"]>
    composites: {}
  }

  type JobRunGetPayload<S extends boolean | null | undefined | JobRunDefaultArgs> = $Result.GetResult<Prisma.$JobRunPayload, S>

  type JobRunCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = 
    Omit<JobRunFindManyArgs, 'select' | 'include' | 'distinct'> & {
      select?: JobRunCountAggregateInputType | true
    }

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

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

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

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

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

    /**
     * Create a JobRun.
     * @param {JobRunCreateArgs} args - Arguments to create a JobRun.
     * @example
     * // Create one JobRun
     * const JobRun = await prisma.jobRun.create({
     *   data: {
     *     // ... data to create a JobRun
     *   }
     * })
     * 
     */
    create<T extends JobRunCreateArgs>(args: SelectSubset<T, JobRunCreateArgs<ExtArgs>>): Prisma__JobRunClient<$Result.GetResult<Prisma.$JobRunPayload<ExtArgs>, T, "create">, never, ExtArgs>

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

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

    /**
     * Delete a JobRun.
     * @param {JobRunDeleteArgs} args - Arguments to delete one JobRun.
     * @example
     * // Delete one JobRun
     * const JobRun = await prisma.jobRun.delete({
     *   where: {
     *     // ... filter to delete one JobRun
     *   }
     * })
     * 
     */
    delete<T extends JobRunDeleteArgs>(args: SelectSubset<T, JobRunDeleteArgs<ExtArgs>>): Prisma__JobRunClient<$Result.GetResult<Prisma.$JobRunPayload<ExtArgs>, T, "delete">, never, ExtArgs>

    /**
     * Update one JobRun.
     * @param {JobRunUpdateArgs} args - Arguments to update one JobRun.
     * @example
     * // Update one JobRun
     * const jobRun = await prisma.jobRun.update({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    update<T extends JobRunUpdateArgs>(args: SelectSubset<T, JobRunUpdateArgs<ExtArgs>>): Prisma__JobRunClient<$Result.GetResult<Prisma.$JobRunPayload<ExtArgs>, T, "update">, never, ExtArgs>

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

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

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


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

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

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

  /**
   * The delegate class that acts as a "Promise-like" for JobRun.
   * 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__JobRunClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> extends Prisma.PrismaPromise<T> {
    readonly [Symbol.toStringTag]: "PrismaPromise"
    scrapes<T extends JobRun$scrapesArgs<ExtArgs> = {}>(args?: Subset<T, JobRun$scrapesArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$ScrapePayload<ExtArgs>, T, "findMany"> | Null>
    parentJobRun<T extends JobRun$parentJobRunArgs<ExtArgs> = {}>(args?: Subset<T, JobRun$parentJobRunArgs<ExtArgs>>): Prisma__JobRunClient<$Result.GetResult<Prisma.$JobRunPayload<ExtArgs>, T, "findUniqueOrThrow"> | null, null, ExtArgs>
    retryJobRuns<T extends JobRun$retryJobRunsArgs<ExtArgs> = {}>(args?: Subset<T, JobRun$retryJobRunsArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$JobRunPayload<ExtArgs>, T, "findMany"> | 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 JobRun model
   */ 
  interface JobRunFieldRefs {
    readonly id: FieldRef<"JobRun", 'String'>
    readonly jobType: FieldRef<"JobRun", 'String'>
    readonly status: FieldRef<"JobRun", 'String'>
    readonly startedAt: FieldRef<"JobRun", 'DateTime'>
    readonly completedAt: FieldRef<"JobRun", 'DateTime'>
    readonly durationMs: FieldRef<"JobRun", 'Int'>
    readonly itemsProcessed: FieldRef<"JobRun", 'Int'>
    readonly itemsFailed: FieldRef<"JobRun", 'Int'>
    readonly errorMessage: FieldRef<"JobRun", 'String'>
    readonly metadata: FieldRef<"JobRun", 'Json'>
    readonly retryCount: FieldRef<"JobRun", 'Int'>
    readonly parentJobRunId: FieldRef<"JobRun", 'String'>
  }
    

  // Custom InputTypes
  /**
   * JobRun findUnique
   */
  export type JobRunFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the JobRun
     */
    select?: JobRunSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: JobRunInclude<ExtArgs> | null
    /**
     * Filter, which JobRun to fetch.
     */
    where: JobRunWhereUniqueInput
  }

  /**
   * JobRun findUniqueOrThrow
   */
  export type JobRunFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the JobRun
     */
    select?: JobRunSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: JobRunInclude<ExtArgs> | null
    /**
     * Filter, which JobRun to fetch.
     */
    where: JobRunWhereUniqueInput
  }

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

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

  /**
   * JobRun findMany
   */
  export type JobRunFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the JobRun
     */
    select?: JobRunSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: JobRunInclude<ExtArgs> | null
    /**
     * Filter, which JobRuns to fetch.
     */
    where?: JobRunWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of JobRuns to fetch.
     */
    orderBy?: JobRunOrderByWithRelationInput | JobRunOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for listing JobRuns.
     */
    cursor?: JobRunWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` JobRuns 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` JobRuns.
     */
    skip?: number
    distinct?: JobRunScalarFieldEnum | JobRunScalarFieldEnum[]
  }

  /**
   * JobRun create
   */
  export type JobRunCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the JobRun
     */
    select?: JobRunSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: JobRunInclude<ExtArgs> | null
    /**
     * The data needed to create a JobRun.
     */
    data: XOR<JobRunCreateInput, JobRunUncheckedCreateInput>
  }

  /**
   * JobRun createMany
   */
  export type JobRunCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to create many JobRuns.
     */
    data: JobRunCreateManyInput | JobRunCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * JobRun createManyAndReturn
   */
  export type JobRunCreateManyAndReturnArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the JobRun
     */
    select?: JobRunSelectCreateManyAndReturn<ExtArgs> | null
    /**
     * The data used to create many JobRuns.
     */
    data: JobRunCreateManyInput | JobRunCreateManyInput[]
    skipDuplicates?: boolean
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: JobRunIncludeCreateManyAndReturn<ExtArgs> | null
  }

  /**
   * JobRun update
   */
  export type JobRunUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the JobRun
     */
    select?: JobRunSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: JobRunInclude<ExtArgs> | null
    /**
     * The data needed to update a JobRun.
     */
    data: XOR<JobRunUpdateInput, JobRunUncheckedUpdateInput>
    /**
     * Choose, which JobRun to update.
     */
    where: JobRunWhereUniqueInput
  }

  /**
   * JobRun updateMany
   */
  export type JobRunUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to update JobRuns.
     */
    data: XOR<JobRunUpdateManyMutationInput, JobRunUncheckedUpdateManyInput>
    /**
     * Filter which JobRuns to update
     */
    where?: JobRunWhereInput
  }

  /**
   * JobRun upsert
   */
  export type JobRunUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the JobRun
     */
    select?: JobRunSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: JobRunInclude<ExtArgs> | null
    /**
     * The filter to search for the JobRun to update in case it exists.
     */
    where: JobRunWhereUniqueInput
    /**
     * In case the JobRun found by the `where` argument doesn't exist, create a new JobRun with this data.
     */
    create: XOR<JobRunCreateInput, JobRunUncheckedCreateInput>
    /**
     * In case the JobRun was found with the provided `where` argument, update it with this data.
     */
    update: XOR<JobRunUpdateInput, JobRunUncheckedUpdateInput>
  }

  /**
   * JobRun delete
   */
  export type JobRunDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the JobRun
     */
    select?: JobRunSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: JobRunInclude<ExtArgs> | null
    /**
     * Filter which JobRun to delete.
     */
    where: JobRunWhereUniqueInput
  }

  /**
   * JobRun deleteMany
   */
  export type JobRunDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which JobRuns to delete
     */
    where?: JobRunWhereInput
  }

  /**
   * JobRun.scrapes
   */
  export type JobRun$scrapesArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Scrape
     */
    select?: ScrapeSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ScrapeInclude<ExtArgs> | null
    where?: ScrapeWhereInput
    orderBy?: ScrapeOrderByWithRelationInput | ScrapeOrderByWithRelationInput[]
    cursor?: ScrapeWhereUniqueInput
    take?: number
    skip?: number
    distinct?: ScrapeScalarFieldEnum | ScrapeScalarFieldEnum[]
  }

  /**
   * JobRun.parentJobRun
   */
  export type JobRun$parentJobRunArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the JobRun
     */
    select?: JobRunSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: JobRunInclude<ExtArgs> | null
    where?: JobRunWhereInput
  }

  /**
   * JobRun.retryJobRuns
   */
  export type JobRun$retryJobRunsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the JobRun
     */
    select?: JobRunSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: JobRunInclude<ExtArgs> | null
    where?: JobRunWhereInput
    orderBy?: JobRunOrderByWithRelationInput | JobRunOrderByWithRelationInput[]
    cursor?: JobRunWhereUniqueInput
    take?: number
    skip?: number
    distinct?: JobRunScalarFieldEnum | JobRunScalarFieldEnum[]
  }

  /**
   * JobRun without action
   */
  export type JobRunDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the JobRun
     */
    select?: JobRunSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: JobRunInclude<ExtArgs> | null
  }


  /**
   * Model Dividend
   */

  export type AggregateDividend = {
    _count: DividendCountAggregateOutputType | null
    _avg: DividendAvgAggregateOutputType | null
    _sum: DividendSumAggregateOutputType | null
    _min: DividendMinAggregateOutputType | null
    _max: DividendMaxAggregateOutputType | null
  }

  export type DividendAvgAggregateOutputType = {
    dividend: Decimal | null
    poolSize: Decimal | null
    jackpotSize: Decimal | null
  }

  export type DividendSumAggregateOutputType = {
    dividend: Decimal | null
    poolSize: Decimal | null
    jackpotSize: Decimal | null
  }

  export type DividendMinAggregateOutputType = {
    id: string | null
    raceId: string | null
    tote: string | null
    productName: string | null
    status: string | null
    dividend: Decimal | null
    poolSize: Decimal | null
    jackpotSize: Decimal | null
    description: string | null
    createdAt: Date | null
  }

  export type DividendMaxAggregateOutputType = {
    id: string | null
    raceId: string | null
    tote: string | null
    productName: string | null
    status: string | null
    dividend: Decimal | null
    poolSize: Decimal | null
    jackpotSize: Decimal | null
    description: string | null
    createdAt: Date | null
  }

  export type DividendCountAggregateOutputType = {
    id: number
    raceId: number
    tote: number
    productName: number
    status: number
    dividend: number
    poolSize: number
    jackpotSize: number
    positions: number
    description: number
    createdAt: number
    _all: number
  }


  export type DividendAvgAggregateInputType = {
    dividend?: true
    poolSize?: true
    jackpotSize?: true
  }

  export type DividendSumAggregateInputType = {
    dividend?: true
    poolSize?: true
    jackpotSize?: true
  }

  export type DividendMinAggregateInputType = {
    id?: true
    raceId?: true
    tote?: true
    productName?: true
    status?: true
    dividend?: true
    poolSize?: true
    jackpotSize?: true
    description?: true
    createdAt?: true
  }

  export type DividendMaxAggregateInputType = {
    id?: true
    raceId?: true
    tote?: true
    productName?: true
    status?: true
    dividend?: true
    poolSize?: true
    jackpotSize?: true
    description?: true
    createdAt?: true
  }

  export type DividendCountAggregateInputType = {
    id?: true
    raceId?: true
    tote?: true
    productName?: true
    status?: true
    dividend?: true
    poolSize?: true
    jackpotSize?: true
    positions?: true
    description?: true
    createdAt?: true
    _all?: true
  }

  export type DividendAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which Dividend to aggregate.
     */
    where?: DividendWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Dividends to fetch.
     */
    orderBy?: DividendOrderByWithRelationInput | DividendOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the start position
     */
    cursor?: DividendWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Dividends 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` Dividends.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Count returned Dividends
    **/
    _count?: true | DividendCountAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to average
    **/
    _avg?: DividendAvgAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to sum
    **/
    _sum?: DividendSumAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the minimum value
    **/
    _min?: DividendMinAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the maximum value
    **/
    _max?: DividendMaxAggregateInputType
  }

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




  export type DividendGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: DividendWhereInput
    orderBy?: DividendOrderByWithAggregationInput | DividendOrderByWithAggregationInput[]
    by: DividendScalarFieldEnum[] | DividendScalarFieldEnum
    having?: DividendScalarWhereWithAggregatesInput
    take?: number
    skip?: number
    _count?: DividendCountAggregateInputType | true
    _avg?: DividendAvgAggregateInputType
    _sum?: DividendSumAggregateInputType
    _min?: DividendMinAggregateInputType
    _max?: DividendMaxAggregateInputType
  }

  export type DividendGroupByOutputType = {
    id: string
    raceId: string
    tote: string
    productName: string
    status: string
    dividend: Decimal
    poolSize: Decimal | null
    jackpotSize: Decimal | null
    positions: JsonValue
    description: string | null
    createdAt: Date
    _count: DividendCountAggregateOutputType | null
    _avg: DividendAvgAggregateOutputType | null
    _sum: DividendSumAggregateOutputType | null
    _min: DividendMinAggregateOutputType | null
    _max: DividendMaxAggregateOutputType | null
  }

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


  export type DividendSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    raceId?: boolean
    tote?: boolean
    productName?: boolean
    status?: boolean
    dividend?: boolean
    poolSize?: boolean
    jackpotSize?: boolean
    positions?: boolean
    description?: boolean
    createdAt?: boolean
    race?: boolean | RaceDefaultArgs<ExtArgs>
  }, ExtArgs["result"]["dividend"]>

  export type DividendSelectCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    raceId?: boolean
    tote?: boolean
    productName?: boolean
    status?: boolean
    dividend?: boolean
    poolSize?: boolean
    jackpotSize?: boolean
    positions?: boolean
    description?: boolean
    createdAt?: boolean
    race?: boolean | RaceDefaultArgs<ExtArgs>
  }, ExtArgs["result"]["dividend"]>

  export type DividendSelectScalar = {
    id?: boolean
    raceId?: boolean
    tote?: boolean
    productName?: boolean
    status?: boolean
    dividend?: boolean
    poolSize?: boolean
    jackpotSize?: boolean
    positions?: boolean
    description?: boolean
    createdAt?: boolean
  }

  export type DividendInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    race?: boolean | RaceDefaultArgs<ExtArgs>
  }
  export type DividendIncludeCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    race?: boolean | RaceDefaultArgs<ExtArgs>
  }

  export type $DividendPayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    name: "Dividend"
    objects: {
      race: Prisma.$RacePayload<ExtArgs>
    }
    scalars: $Extensions.GetPayloadResult<{
      id: string
      raceId: string
      tote: string
      productName: string
      status: string
      dividend: Prisma.Decimal
      poolSize: Prisma.Decimal | null
      jackpotSize: Prisma.Decimal | null
      positions: Prisma.JsonValue
      description: string | null
      createdAt: Date
    }, ExtArgs["result"]["dividend"]>
    composites: {}
  }

  type DividendGetPayload<S extends boolean | null | undefined | DividendDefaultArgs> = $Result.GetResult<Prisma.$DividendPayload, S>

  type DividendCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = 
    Omit<DividendFindManyArgs, 'select' | 'include' | 'distinct'> & {
      select?: DividendCountAggregateInputType | true
    }

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

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

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

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

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

    /**
     * Create a Dividend.
     * @param {DividendCreateArgs} args - Arguments to create a Dividend.
     * @example
     * // Create one Dividend
     * const Dividend = await prisma.dividend.create({
     *   data: {
     *     // ... data to create a Dividend
     *   }
     * })
     * 
     */
    create<T extends DividendCreateArgs>(args: SelectSubset<T, DividendCreateArgs<ExtArgs>>): Prisma__DividendClient<$Result.GetResult<Prisma.$DividendPayload<ExtArgs>, T, "create">, never, ExtArgs>

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

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

    /**
     * Delete a Dividend.
     * @param {DividendDeleteArgs} args - Arguments to delete one Dividend.
     * @example
     * // Delete one Dividend
     * const Dividend = await prisma.dividend.delete({
     *   where: {
     *     // ... filter to delete one Dividend
     *   }
     * })
     * 
     */
    delete<T extends DividendDeleteArgs>(args: SelectSubset<T, DividendDeleteArgs<ExtArgs>>): Prisma__DividendClient<$Result.GetResult<Prisma.$DividendPayload<ExtArgs>, T, "delete">, never, ExtArgs>

    /**
     * Update one Dividend.
     * @param {DividendUpdateArgs} args - Arguments to update one Dividend.
     * @example
     * // Update one Dividend
     * const dividend = await prisma.dividend.update({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    update<T extends DividendUpdateArgs>(args: SelectSubset<T, DividendUpdateArgs<ExtArgs>>): Prisma__DividendClient<$Result.GetResult<Prisma.$DividendPayload<ExtArgs>, T, "update">, never, ExtArgs>

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

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

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


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

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

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

  /**
   * The delegate class that acts as a "Promise-like" for Dividend.
   * 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__DividendClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> extends Prisma.PrismaPromise<T> {
    readonly [Symbol.toStringTag]: "PrismaPromise"
    race<T extends RaceDefaultArgs<ExtArgs> = {}>(args?: Subset<T, RaceDefaultArgs<ExtArgs>>): Prisma__RaceClient<$Result.GetResult<Prisma.$RacePayload<ExtArgs>, T, "findUniqueOrThrow"> | Null, Null, ExtArgs>
    /**
     * 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 Dividend model
   */ 
  interface DividendFieldRefs {
    readonly id: FieldRef<"Dividend", 'String'>
    readonly raceId: FieldRef<"Dividend", 'String'>
    readonly tote: FieldRef<"Dividend", 'String'>
    readonly productName: FieldRef<"Dividend", 'String'>
    readonly status: FieldRef<"Dividend", 'String'>
    readonly dividend: FieldRef<"Dividend", 'Decimal'>
    readonly poolSize: FieldRef<"Dividend", 'Decimal'>
    readonly jackpotSize: FieldRef<"Dividend", 'Decimal'>
    readonly positions: FieldRef<"Dividend", 'Json'>
    readonly description: FieldRef<"Dividend", 'String'>
    readonly createdAt: FieldRef<"Dividend", 'DateTime'>
  }
    

  // Custom InputTypes
  /**
   * Dividend findUnique
   */
  export type DividendFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Dividend
     */
    select?: DividendSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: DividendInclude<ExtArgs> | null
    /**
     * Filter, which Dividend to fetch.
     */
    where: DividendWhereUniqueInput
  }

  /**
   * Dividend findUniqueOrThrow
   */
  export type DividendFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Dividend
     */
    select?: DividendSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: DividendInclude<ExtArgs> | null
    /**
     * Filter, which Dividend to fetch.
     */
    where: DividendWhereUniqueInput
  }

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

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

  /**
   * Dividend findMany
   */
  export type DividendFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Dividend
     */
    select?: DividendSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: DividendInclude<ExtArgs> | null
    /**
     * Filter, which Dividends to fetch.
     */
    where?: DividendWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Dividends to fetch.
     */
    orderBy?: DividendOrderByWithRelationInput | DividendOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for listing Dividends.
     */
    cursor?: DividendWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Dividends 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` Dividends.
     */
    skip?: number
    distinct?: DividendScalarFieldEnum | DividendScalarFieldEnum[]
  }

  /**
   * Dividend create
   */
  export type DividendCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Dividend
     */
    select?: DividendSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: DividendInclude<ExtArgs> | null
    /**
     * The data needed to create a Dividend.
     */
    data: XOR<DividendCreateInput, DividendUncheckedCreateInput>
  }

  /**
   * Dividend createMany
   */
  export type DividendCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to create many Dividends.
     */
    data: DividendCreateManyInput | DividendCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * Dividend createManyAndReturn
   */
  export type DividendCreateManyAndReturnArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Dividend
     */
    select?: DividendSelectCreateManyAndReturn<ExtArgs> | null
    /**
     * The data used to create many Dividends.
     */
    data: DividendCreateManyInput | DividendCreateManyInput[]
    skipDuplicates?: boolean
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: DividendIncludeCreateManyAndReturn<ExtArgs> | null
  }

  /**
   * Dividend update
   */
  export type DividendUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Dividend
     */
    select?: DividendSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: DividendInclude<ExtArgs> | null
    /**
     * The data needed to update a Dividend.
     */
    data: XOR<DividendUpdateInput, DividendUncheckedUpdateInput>
    /**
     * Choose, which Dividend to update.
     */
    where: DividendWhereUniqueInput
  }

  /**
   * Dividend updateMany
   */
  export type DividendUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to update Dividends.
     */
    data: XOR<DividendUpdateManyMutationInput, DividendUncheckedUpdateManyInput>
    /**
     * Filter which Dividends to update
     */
    where?: DividendWhereInput
  }

  /**
   * Dividend upsert
   */
  export type DividendUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Dividend
     */
    select?: DividendSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: DividendInclude<ExtArgs> | null
    /**
     * The filter to search for the Dividend to update in case it exists.
     */
    where: DividendWhereUniqueInput
    /**
     * In case the Dividend found by the `where` argument doesn't exist, create a new Dividend with this data.
     */
    create: XOR<DividendCreateInput, DividendUncheckedCreateInput>
    /**
     * In case the Dividend was found with the provided `where` argument, update it with this data.
     */
    update: XOR<DividendUpdateInput, DividendUncheckedUpdateInput>
  }

  /**
   * Dividend delete
   */
  export type DividendDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Dividend
     */
    select?: DividendSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: DividendInclude<ExtArgs> | null
    /**
     * Filter which Dividend to delete.
     */
    where: DividendWhereUniqueInput
  }

  /**
   * Dividend deleteMany
   */
  export type DividendDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which Dividends to delete
     */
    where?: DividendWhereInput
  }

  /**
   * Dividend without action
   */
  export type DividendDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Dividend
     */
    select?: DividendSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: DividendInclude<ExtArgs> | null
  }


  /**
   * Model OddsSnapshot
   */

  export type AggregateOddsSnapshot = {
    _count: OddsSnapshotCountAggregateOutputType | null
    _avg: OddsSnapshotAvgAggregateOutputType | null
    _sum: OddsSnapshotSumAggregateOutputType | null
    _min: OddsSnapshotMinAggregateOutputType | null
    _max: OddsSnapshotMaxAggregateOutputType | null
  }

  export type OddsSnapshotAvgAggregateOutputType = {
    fixedWin: Decimal | null
    fixedPlace: Decimal | null
    poolWin: Decimal | null
    poolPlace: Decimal | null
  }

  export type OddsSnapshotSumAggregateOutputType = {
    fixedWin: Decimal | null
    fixedPlace: Decimal | null
    poolWin: Decimal | null
    poolPlace: Decimal | null
  }

  export type OddsSnapshotMinAggregateOutputType = {
    id: string | null
    runnerId: string | null
    snapshotType: string | null
    fixedWin: Decimal | null
    fixedPlace: Decimal | null
    poolWin: Decimal | null
    poolPlace: Decimal | null
    capturedAt: Date | null
  }

  export type OddsSnapshotMaxAggregateOutputType = {
    id: string | null
    runnerId: string | null
    snapshotType: string | null
    fixedWin: Decimal | null
    fixedPlace: Decimal | null
    poolWin: Decimal | null
    poolPlace: Decimal | null
    capturedAt: Date | null
  }

  export type OddsSnapshotCountAggregateOutputType = {
    id: number
    runnerId: number
    snapshotType: number
    fixedWin: number
    fixedPlace: number
    poolWin: number
    poolPlace: number
    capturedAt: number
    _all: number
  }


  export type OddsSnapshotAvgAggregateInputType = {
    fixedWin?: true
    fixedPlace?: true
    poolWin?: true
    poolPlace?: true
  }

  export type OddsSnapshotSumAggregateInputType = {
    fixedWin?: true
    fixedPlace?: true
    poolWin?: true
    poolPlace?: true
  }

  export type OddsSnapshotMinAggregateInputType = {
    id?: true
    runnerId?: true
    snapshotType?: true
    fixedWin?: true
    fixedPlace?: true
    poolWin?: true
    poolPlace?: true
    capturedAt?: true
  }

  export type OddsSnapshotMaxAggregateInputType = {
    id?: true
    runnerId?: true
    snapshotType?: true
    fixedWin?: true
    fixedPlace?: true
    poolWin?: true
    poolPlace?: true
    capturedAt?: true
  }

  export type OddsSnapshotCountAggregateInputType = {
    id?: true
    runnerId?: true
    snapshotType?: true
    fixedWin?: true
    fixedPlace?: true
    poolWin?: true
    poolPlace?: true
    capturedAt?: true
    _all?: true
  }

  export type OddsSnapshotAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which OddsSnapshot to aggregate.
     */
    where?: OddsSnapshotWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of OddsSnapshots to fetch.
     */
    orderBy?: OddsSnapshotOrderByWithRelationInput | OddsSnapshotOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the start position
     */
    cursor?: OddsSnapshotWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` OddsSnapshots 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` OddsSnapshots.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Count returned OddsSnapshots
    **/
    _count?: true | OddsSnapshotCountAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to average
    **/
    _avg?: OddsSnapshotAvgAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to sum
    **/
    _sum?: OddsSnapshotSumAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the minimum value
    **/
    _min?: OddsSnapshotMinAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the maximum value
    **/
    _max?: OddsSnapshotMaxAggregateInputType
  }

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




  export type OddsSnapshotGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: OddsSnapshotWhereInput
    orderBy?: OddsSnapshotOrderByWithAggregationInput | OddsSnapshotOrderByWithAggregationInput[]
    by: OddsSnapshotScalarFieldEnum[] | OddsSnapshotScalarFieldEnum
    having?: OddsSnapshotScalarWhereWithAggregatesInput
    take?: number
    skip?: number
    _count?: OddsSnapshotCountAggregateInputType | true
    _avg?: OddsSnapshotAvgAggregateInputType
    _sum?: OddsSnapshotSumAggregateInputType
    _min?: OddsSnapshotMinAggregateInputType
    _max?: OddsSnapshotMaxAggregateInputType
  }

  export type OddsSnapshotGroupByOutputType = {
    id: string
    runnerId: string
    snapshotType: string
    fixedWin: Decimal | null
    fixedPlace: Decimal | null
    poolWin: Decimal | null
    poolPlace: Decimal | null
    capturedAt: Date
    _count: OddsSnapshotCountAggregateOutputType | null
    _avg: OddsSnapshotAvgAggregateOutputType | null
    _sum: OddsSnapshotSumAggregateOutputType | null
    _min: OddsSnapshotMinAggregateOutputType | null
    _max: OddsSnapshotMaxAggregateOutputType | null
  }

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


  export type OddsSnapshotSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    runnerId?: boolean
    snapshotType?: boolean
    fixedWin?: boolean
    fixedPlace?: boolean
    poolWin?: boolean
    poolPlace?: boolean
    capturedAt?: boolean
    runner?: boolean | RunnerDefaultArgs<ExtArgs>
  }, ExtArgs["result"]["oddsSnapshot"]>

  export type OddsSnapshotSelectCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    runnerId?: boolean
    snapshotType?: boolean
    fixedWin?: boolean
    fixedPlace?: boolean
    poolWin?: boolean
    poolPlace?: boolean
    capturedAt?: boolean
    runner?: boolean | RunnerDefaultArgs<ExtArgs>
  }, ExtArgs["result"]["oddsSnapshot"]>

  export type OddsSnapshotSelectScalar = {
    id?: boolean
    runnerId?: boolean
    snapshotType?: boolean
    fixedWin?: boolean
    fixedPlace?: boolean
    poolWin?: boolean
    poolPlace?: boolean
    capturedAt?: boolean
  }

  export type OddsSnapshotInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    runner?: boolean | RunnerDefaultArgs<ExtArgs>
  }
  export type OddsSnapshotIncludeCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    runner?: boolean | RunnerDefaultArgs<ExtArgs>
  }

  export type $OddsSnapshotPayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    name: "OddsSnapshot"
    objects: {
      runner: Prisma.$RunnerPayload<ExtArgs>
    }
    scalars: $Extensions.GetPayloadResult<{
      id: string
      runnerId: string
      snapshotType: string
      fixedWin: Prisma.Decimal | null
      fixedPlace: Prisma.Decimal | null
      poolWin: Prisma.Decimal | null
      poolPlace: Prisma.Decimal | null
      capturedAt: Date
    }, ExtArgs["result"]["oddsSnapshot"]>
    composites: {}
  }

  type OddsSnapshotGetPayload<S extends boolean | null | undefined | OddsSnapshotDefaultArgs> = $Result.GetResult<Prisma.$OddsSnapshotPayload, S>

  type OddsSnapshotCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = 
    Omit<OddsSnapshotFindManyArgs, 'select' | 'include' | 'distinct'> & {
      select?: OddsSnapshotCountAggregateInputType | true
    }

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

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

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

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

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

    /**
     * Create a OddsSnapshot.
     * @param {OddsSnapshotCreateArgs} args - Arguments to create a OddsSnapshot.
     * @example
     * // Create one OddsSnapshot
     * const OddsSnapshot = await prisma.oddsSnapshot.create({
     *   data: {
     *     // ... data to create a OddsSnapshot
     *   }
     * })
     * 
     */
    create<T extends OddsSnapshotCreateArgs>(args: SelectSubset<T, OddsSnapshotCreateArgs<ExtArgs>>): Prisma__OddsSnapshotClient<$Result.GetResult<Prisma.$OddsSnapshotPayload<ExtArgs>, T, "create">, never, ExtArgs>

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

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

    /**
     * Delete a OddsSnapshot.
     * @param {OddsSnapshotDeleteArgs} args - Arguments to delete one OddsSnapshot.
     * @example
     * // Delete one OddsSnapshot
     * const OddsSnapshot = await prisma.oddsSnapshot.delete({
     *   where: {
     *     // ... filter to delete one OddsSnapshot
     *   }
     * })
     * 
     */
    delete<T extends OddsSnapshotDeleteArgs>(args: SelectSubset<T, OddsSnapshotDeleteArgs<ExtArgs>>): Prisma__OddsSnapshotClient<$Result.GetResult<Prisma.$OddsSnapshotPayload<ExtArgs>, T, "delete">, never, ExtArgs>

    /**
     * Update one OddsSnapshot.
     * @param {OddsSnapshotUpdateArgs} args - Arguments to update one OddsSnapshot.
     * @example
     * // Update one OddsSnapshot
     * const oddsSnapshot = await prisma.oddsSnapshot.update({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    update<T extends OddsSnapshotUpdateArgs>(args: SelectSubset<T, OddsSnapshotUpdateArgs<ExtArgs>>): Prisma__OddsSnapshotClient<$Result.GetResult<Prisma.$OddsSnapshotPayload<ExtArgs>, T, "update">, never, ExtArgs>

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

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

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


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

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

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

  /**
   * The delegate class that acts as a "Promise-like" for OddsSnapshot.
   * 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__OddsSnapshotClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> extends Prisma.PrismaPromise<T> {
    readonly [Symbol.toStringTag]: "PrismaPromise"
    runner<T extends RunnerDefaultArgs<ExtArgs> = {}>(args?: Subset<T, RunnerDefaultArgs<ExtArgs>>): Prisma__RunnerClient<$Result.GetResult<Prisma.$RunnerPayload<ExtArgs>, T, "findUniqueOrThrow"> | Null, Null, ExtArgs>
    /**
     * 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 OddsSnapshot model
   */ 
  interface OddsSnapshotFieldRefs {
    readonly id: FieldRef<"OddsSnapshot", 'String'>
    readonly runnerId: FieldRef<"OddsSnapshot", 'String'>
    readonly snapshotType: FieldRef<"OddsSnapshot", 'String'>
    readonly fixedWin: FieldRef<"OddsSnapshot", 'Decimal'>
    readonly fixedPlace: FieldRef<"OddsSnapshot", 'Decimal'>
    readonly poolWin: FieldRef<"OddsSnapshot", 'Decimal'>
    readonly poolPlace: FieldRef<"OddsSnapshot", 'Decimal'>
    readonly capturedAt: FieldRef<"OddsSnapshot", 'DateTime'>
  }
    

  // Custom InputTypes
  /**
   * OddsSnapshot findUnique
   */
  export type OddsSnapshotFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the OddsSnapshot
     */
    select?: OddsSnapshotSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: OddsSnapshotInclude<ExtArgs> | null
    /**
     * Filter, which OddsSnapshot to fetch.
     */
    where: OddsSnapshotWhereUniqueInput
  }

  /**
   * OddsSnapshot findUniqueOrThrow
   */
  export type OddsSnapshotFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the OddsSnapshot
     */
    select?: OddsSnapshotSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: OddsSnapshotInclude<ExtArgs> | null
    /**
     * Filter, which OddsSnapshot to fetch.
     */
    where: OddsSnapshotWhereUniqueInput
  }

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

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

  /**
   * OddsSnapshot findMany
   */
  export type OddsSnapshotFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the OddsSnapshot
     */
    select?: OddsSnapshotSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: OddsSnapshotInclude<ExtArgs> | null
    /**
     * Filter, which OddsSnapshots to fetch.
     */
    where?: OddsSnapshotWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of OddsSnapshots to fetch.
     */
    orderBy?: OddsSnapshotOrderByWithRelationInput | OddsSnapshotOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for listing OddsSnapshots.
     */
    cursor?: OddsSnapshotWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` OddsSnapshots 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` OddsSnapshots.
     */
    skip?: number
    distinct?: OddsSnapshotScalarFieldEnum | OddsSnapshotScalarFieldEnum[]
  }

  /**
   * OddsSnapshot create
   */
  export type OddsSnapshotCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the OddsSnapshot
     */
    select?: OddsSnapshotSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: OddsSnapshotInclude<ExtArgs> | null
    /**
     * The data needed to create a OddsSnapshot.
     */
    data: XOR<OddsSnapshotCreateInput, OddsSnapshotUncheckedCreateInput>
  }

  /**
   * OddsSnapshot createMany
   */
  export type OddsSnapshotCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to create many OddsSnapshots.
     */
    data: OddsSnapshotCreateManyInput | OddsSnapshotCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * OddsSnapshot createManyAndReturn
   */
  export type OddsSnapshotCreateManyAndReturnArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the OddsSnapshot
     */
    select?: OddsSnapshotSelectCreateManyAndReturn<ExtArgs> | null
    /**
     * The data used to create many OddsSnapshots.
     */
    data: OddsSnapshotCreateManyInput | OddsSnapshotCreateManyInput[]
    skipDuplicates?: boolean
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: OddsSnapshotIncludeCreateManyAndReturn<ExtArgs> | null
  }

  /**
   * OddsSnapshot update
   */
  export type OddsSnapshotUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the OddsSnapshot
     */
    select?: OddsSnapshotSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: OddsSnapshotInclude<ExtArgs> | null
    /**
     * The data needed to update a OddsSnapshot.
     */
    data: XOR<OddsSnapshotUpdateInput, OddsSnapshotUncheckedUpdateInput>
    /**
     * Choose, which OddsSnapshot to update.
     */
    where: OddsSnapshotWhereUniqueInput
  }

  /**
   * OddsSnapshot updateMany
   */
  export type OddsSnapshotUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to update OddsSnapshots.
     */
    data: XOR<OddsSnapshotUpdateManyMutationInput, OddsSnapshotUncheckedUpdateManyInput>
    /**
     * Filter which OddsSnapshots to update
     */
    where?: OddsSnapshotWhereInput
  }

  /**
   * OddsSnapshot upsert
   */
  export type OddsSnapshotUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the OddsSnapshot
     */
    select?: OddsSnapshotSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: OddsSnapshotInclude<ExtArgs> | null
    /**
     * The filter to search for the OddsSnapshot to update in case it exists.
     */
    where: OddsSnapshotWhereUniqueInput
    /**
     * In case the OddsSnapshot found by the `where` argument doesn't exist, create a new OddsSnapshot with this data.
     */
    create: XOR<OddsSnapshotCreateInput, OddsSnapshotUncheckedCreateInput>
    /**
     * In case the OddsSnapshot was found with the provided `where` argument, update it with this data.
     */
    update: XOR<OddsSnapshotUpdateInput, OddsSnapshotUncheckedUpdateInput>
  }

  /**
   * OddsSnapshot delete
   */
  export type OddsSnapshotDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the OddsSnapshot
     */
    select?: OddsSnapshotSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: OddsSnapshotInclude<ExtArgs> | null
    /**
     * Filter which OddsSnapshot to delete.
     */
    where: OddsSnapshotWhereUniqueInput
  }

  /**
   * OddsSnapshot deleteMany
   */
  export type OddsSnapshotDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which OddsSnapshots to delete
     */
    where?: OddsSnapshotWhereInput
  }

  /**
   * OddsSnapshot without action
   */
  export type OddsSnapshotDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the OddsSnapshot
     */
    select?: OddsSnapshotSelect<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: OddsSnapshotInclude<ExtArgs> | null
  }


  /**
   * Enums
   */

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

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


  export const MeetingScalarFieldEnum: {
    id: 'id',
    name: 'name',
    date: 'date',
    country: 'country',
    state: 'state',
    category: 'category',
    categoryName: 'categoryName',
    trackCondition: 'trackCondition',
    weather: 'weather',
    videoChannels: 'videoChannels',
    quaddie: 'quaddie',
    earlyQuaddie: 'earlyQuaddie',
    toteMeetingNumber: 'toteMeetingNumber',
    toteStatus: 'toteStatus',
    metadata: 'metadata',
    createdAt: 'createdAt',
    updatedAt: 'updatedAt'
  };

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


  export const RaceScalarFieldEnum: {
    id: 'id',
    meetingId: 'meetingId',
    raceNumber: 'raceNumber',
    name: 'name',
    startTime: 'startTime',
    toteStartTime: 'toteStartTime',
    distance: 'distance',
    trackCondition: 'trackCondition',
    weather: 'weather',
    status: 'status',
    country: 'country',
    state: 'state',
    metadata: 'metadata',
    createdAt: 'createdAt',
    updatedAt: 'updatedAt'
  };

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


  export const HorseScalarFieldEnum: {
    id: 'id',
    tabEntrantId: 'tabEntrantId',
    tabHorseId: 'tabHorseId',
    harnessNzHorseId: 'harnessNzHorseId',
    name: 'name',
    normalizedName: 'normalizedName',
    sire: 'sire',
    dam: 'dam',
    damSire: 'damSire',
    sex: 'sex',
    colour: 'colour',
    country: 'country',
    firstSeen: 'firstSeen',
    lastSeen: 'lastSeen',
    raceCount: 'raceCount'
  };

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


  export const RunnerScalarFieldEnum: {
    id: 'id',
    raceId: 'raceId',
    runnerNumber: 'runnerNumber',
    entrantId: 'entrantId',
    horseName: 'horseName',
    tabHorseIdLegacy: 'tabHorseIdLegacy',
    horseId: 'horseId',
    barrier: 'barrier',
    weight: 'weight',
    jockeyName: 'jockeyName',
    jockeyId: 'jockeyId',
    jockeyWeightAllowance: 'jockeyWeightAllowance',
    trainerName: 'trainerName',
    trainerId: 'trainerId',
    trainerLocation: 'trainerLocation',
    form: 'form',
    lastStarts: 'lastStarts',
    lastTwentyStarts: 'lastTwentyStarts',
    age: 'age',
    silkColours: 'silkColours',
    scratched: 'scratched',
    scratchedAt: 'scratchedAt',
    openingOdds: 'openingOdds',
    currentOdds: 'currentOdds',
    metadata: 'metadata',
    createdAt: 'createdAt',
    updatedAt: 'updatedAt'
  };

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


  export const ResultScalarFieldEnum: {
    id: 'id',
    raceId: 'raceId',
    runnerId: 'runnerId',
    finishPosition: 'finishPosition',
    margin: 'margin',
    raceTime: 'raceTime',
    winDividend: 'winDividend',
    placeDividend: 'placeDividend',
    official: 'official',
    disqualified: 'disqualified',
    metadata: 'metadata',
    createdAt: 'createdAt'
  };

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


  export const ScrapeScalarFieldEnum: {
    id: 'id',
    raceId: 'raceId',
    scrapeType: 'scrapeType',
    scrapedAt: 'scrapedAt',
    changesDetected: 'changesDetected',
    success: 'success',
    errorMessage: 'errorMessage',
    jobRunId: 'jobRunId'
  };

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


  export const JobRunScalarFieldEnum: {
    id: 'id',
    jobType: 'jobType',
    status: 'status',
    startedAt: 'startedAt',
    completedAt: 'completedAt',
    durationMs: 'durationMs',
    itemsProcessed: 'itemsProcessed',
    itemsFailed: 'itemsFailed',
    errorMessage: 'errorMessage',
    metadata: 'metadata',
    retryCount: 'retryCount',
    parentJobRunId: 'parentJobRunId'
  };

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


  export const DividendScalarFieldEnum: {
    id: 'id',
    raceId: 'raceId',
    tote: 'tote',
    productName: 'productName',
    status: 'status',
    dividend: 'dividend',
    poolSize: 'poolSize',
    jackpotSize: 'jackpotSize',
    positions: 'positions',
    description: 'description',
    createdAt: 'createdAt'
  };

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


  export const OddsSnapshotScalarFieldEnum: {
    id: 'id',
    runnerId: 'runnerId',
    snapshotType: 'snapshotType',
    fixedWin: 'fixedWin',
    fixedPlace: 'fixedPlace',
    poolWin: 'poolWin',
    poolPlace: 'poolPlace',
    capturedAt: 'capturedAt'
  };

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


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

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


  export const NullableJsonNullValueInput: {
    DbNull: typeof DbNull,
    JsonNull: typeof JsonNull
  };

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


  export const JsonNullValueInput: {
    JsonNull: typeof JsonNull
  };

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


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

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


  export const JsonNullValueFilter: {
    DbNull: typeof DbNull,
    JsonNull: typeof JsonNull,
    AnyNull: typeof AnyNull
  };

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


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

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


  /**
   * Field references 
   */


  /**
   * 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 'Json'
   */
  export type JsonFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Json'>
    


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


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


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


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


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


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


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


  /**
   * 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 MeetingWhereInput = {
    AND?: MeetingWhereInput | MeetingWhereInput[]
    OR?: MeetingWhereInput[]
    NOT?: MeetingWhereInput | MeetingWhereInput[]
    id?: UuidFilter<"Meeting"> | string
    name?: StringFilter<"Meeting"> | string
    date?: DateTimeFilter<"Meeting"> | Date | string
    country?: StringFilter<"Meeting"> | string
    state?: StringNullableFilter<"Meeting"> | string | null
    category?: StringFilter<"Meeting"> | string
    categoryName?: StringNullableFilter<"Meeting"> | string | null
    trackCondition?: StringNullableFilter<"Meeting"> | string | null
    weather?: StringNullableFilter<"Meeting"> | string | null
    videoChannels?: JsonNullableFilter<"Meeting">
    quaddie?: IntNullableListFilter<"Meeting">
    earlyQuaddie?: IntNullableListFilter<"Meeting">
    toteMeetingNumber?: IntNullableFilter<"Meeting"> | number | null
    toteStatus?: StringNullableFilter<"Meeting"> | string | null
    metadata?: JsonNullableFilter<"Meeting">
    createdAt?: DateTimeFilter<"Meeting"> | Date | string
    updatedAt?: DateTimeFilter<"Meeting"> | Date | string
    races?: RaceListRelationFilter
  }

  export type MeetingOrderByWithRelationInput = {
    id?: SortOrder
    name?: SortOrder
    date?: SortOrder
    country?: SortOrder
    state?: SortOrderInput | SortOrder
    category?: SortOrder
    categoryName?: SortOrderInput | SortOrder
    trackCondition?: SortOrderInput | SortOrder
    weather?: SortOrderInput | SortOrder
    videoChannels?: SortOrderInput | SortOrder
    quaddie?: SortOrder
    earlyQuaddie?: SortOrder
    toteMeetingNumber?: SortOrderInput | SortOrder
    toteStatus?: SortOrderInput | SortOrder
    metadata?: SortOrderInput | SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    races?: RaceOrderByRelationAggregateInput
  }

  export type MeetingWhereUniqueInput = Prisma.AtLeast<{
    id?: string
    AND?: MeetingWhereInput | MeetingWhereInput[]
    OR?: MeetingWhereInput[]
    NOT?: MeetingWhereInput | MeetingWhereInput[]
    name?: StringFilter<"Meeting"> | string
    date?: DateTimeFilter<"Meeting"> | Date | string
    country?: StringFilter<"Meeting"> | string
    state?: StringNullableFilter<"Meeting"> | string | null
    category?: StringFilter<"Meeting"> | string
    categoryName?: StringNullableFilter<"Meeting"> | string | null
    trackCondition?: StringNullableFilter<"Meeting"> | string | null
    weather?: StringNullableFilter<"Meeting"> | string | null
    videoChannels?: JsonNullableFilter<"Meeting">
    quaddie?: IntNullableListFilter<"Meeting">
    earlyQuaddie?: IntNullableListFilter<"Meeting">
    toteMeetingNumber?: IntNullableFilter<"Meeting"> | number | null
    toteStatus?: StringNullableFilter<"Meeting"> | string | null
    metadata?: JsonNullableFilter<"Meeting">
    createdAt?: DateTimeFilter<"Meeting"> | Date | string
    updatedAt?: DateTimeFilter<"Meeting"> | Date | string
    races?: RaceListRelationFilter
  }, "id">

  export type MeetingOrderByWithAggregationInput = {
    id?: SortOrder
    name?: SortOrder
    date?: SortOrder
    country?: SortOrder
    state?: SortOrderInput | SortOrder
    category?: SortOrder
    categoryName?: SortOrderInput | SortOrder
    trackCondition?: SortOrderInput | SortOrder
    weather?: SortOrderInput | SortOrder
    videoChannels?: SortOrderInput | SortOrder
    quaddie?: SortOrder
    earlyQuaddie?: SortOrder
    toteMeetingNumber?: SortOrderInput | SortOrder
    toteStatus?: SortOrderInput | SortOrder
    metadata?: SortOrderInput | SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    _count?: MeetingCountOrderByAggregateInput
    _avg?: MeetingAvgOrderByAggregateInput
    _max?: MeetingMaxOrderByAggregateInput
    _min?: MeetingMinOrderByAggregateInput
    _sum?: MeetingSumOrderByAggregateInput
  }

  export type MeetingScalarWhereWithAggregatesInput = {
    AND?: MeetingScalarWhereWithAggregatesInput | MeetingScalarWhereWithAggregatesInput[]
    OR?: MeetingScalarWhereWithAggregatesInput[]
    NOT?: MeetingScalarWhereWithAggregatesInput | MeetingScalarWhereWithAggregatesInput[]
    id?: UuidWithAggregatesFilter<"Meeting"> | string
    name?: StringWithAggregatesFilter<"Meeting"> | string
    date?: DateTimeWithAggregatesFilter<"Meeting"> | Date | string
    country?: StringWithAggregatesFilter<"Meeting"> | string
    state?: StringNullableWithAggregatesFilter<"Meeting"> | string | null
    category?: StringWithAggregatesFilter<"Meeting"> | string
    categoryName?: StringNullableWithAggregatesFilter<"Meeting"> | string | null
    trackCondition?: StringNullableWithAggregatesFilter<"Meeting"> | string | null
    weather?: StringNullableWithAggregatesFilter<"Meeting"> | string | null
    videoChannels?: JsonNullableWithAggregatesFilter<"Meeting">
    quaddie?: IntNullableListFilter<"Meeting">
    earlyQuaddie?: IntNullableListFilter<"Meeting">
    toteMeetingNumber?: IntNullableWithAggregatesFilter<"Meeting"> | number | null
    toteStatus?: StringNullableWithAggregatesFilter<"Meeting"> | string | null
    metadata?: JsonNullableWithAggregatesFilter<"Meeting">
    createdAt?: DateTimeWithAggregatesFilter<"Meeting"> | Date | string
    updatedAt?: DateTimeWithAggregatesFilter<"Meeting"> | Date | string
  }

  export type RaceWhereInput = {
    AND?: RaceWhereInput | RaceWhereInput[]
    OR?: RaceWhereInput[]
    NOT?: RaceWhereInput | RaceWhereInput[]
    id?: UuidFilter<"Race"> | string
    meetingId?: UuidFilter<"Race"> | string
    raceNumber?: IntFilter<"Race"> | number
    name?: StringFilter<"Race"> | string
    startTime?: DateTimeFilter<"Race"> | Date | string
    toteStartTime?: DateTimeNullableFilter<"Race"> | Date | string | null
    distance?: IntFilter<"Race"> | number
    trackCondition?: StringNullableFilter<"Race"> | string | null
    weather?: StringNullableFilter<"Race"> | string | null
    status?: StringFilter<"Race"> | string
    country?: StringFilter<"Race"> | string
    state?: StringNullableFilter<"Race"> | string | null
    metadata?: JsonNullableFilter<"Race">
    createdAt?: DateTimeFilter<"Race"> | Date | string
    updatedAt?: DateTimeFilter<"Race"> | Date | string
    meeting?: XOR<MeetingRelationFilter, MeetingWhereInput>
    runners?: RunnerListRelationFilter
    scrapes?: ScrapeListRelationFilter
    results?: ResultListRelationFilter
    dividends?: DividendListRelationFilter
  }

  export type RaceOrderByWithRelationInput = {
    id?: SortOrder
    meetingId?: SortOrder
    raceNumber?: SortOrder
    name?: SortOrder
    startTime?: SortOrder
    toteStartTime?: SortOrderInput | SortOrder
    distance?: SortOrder
    trackCondition?: SortOrderInput | SortOrder
    weather?: SortOrderInput | SortOrder
    status?: SortOrder
    country?: SortOrder
    state?: SortOrderInput | SortOrder
    metadata?: SortOrderInput | SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    meeting?: MeetingOrderByWithRelationInput
    runners?: RunnerOrderByRelationAggregateInput
    scrapes?: ScrapeOrderByRelationAggregateInput
    results?: ResultOrderByRelationAggregateInput
    dividends?: DividendOrderByRelationAggregateInput
  }

  export type RaceWhereUniqueInput = Prisma.AtLeast<{
    id?: string
    meetingId_raceNumber?: RaceMeetingIdRaceNumberCompoundUniqueInput
    AND?: RaceWhereInput | RaceWhereInput[]
    OR?: RaceWhereInput[]
    NOT?: RaceWhereInput | RaceWhereInput[]
    meetingId?: UuidFilter<"Race"> | string
    raceNumber?: IntFilter<"Race"> | number
    name?: StringFilter<"Race"> | string
    startTime?: DateTimeFilter<"Race"> | Date | string
    toteStartTime?: DateTimeNullableFilter<"Race"> | Date | string | null
    distance?: IntFilter<"Race"> | number
    trackCondition?: StringNullableFilter<"Race"> | string | null
    weather?: StringNullableFilter<"Race"> | string | null
    status?: StringFilter<"Race"> | string
    country?: StringFilter<"Race"> | string
    state?: StringNullableFilter<"Race"> | string | null
    metadata?: JsonNullableFilter<"Race">
    createdAt?: DateTimeFilter<"Race"> | Date | string
    updatedAt?: DateTimeFilter<"Race"> | Date | string
    meeting?: XOR<MeetingRelationFilter, MeetingWhereInput>
    runners?: RunnerListRelationFilter
    scrapes?: ScrapeListRelationFilter
    results?: ResultListRelationFilter
    dividends?: DividendListRelationFilter
  }, "id" | "meetingId_raceNumber">

  export type RaceOrderByWithAggregationInput = {
    id?: SortOrder
    meetingId?: SortOrder
    raceNumber?: SortOrder
    name?: SortOrder
    startTime?: SortOrder
    toteStartTime?: SortOrderInput | SortOrder
    distance?: SortOrder
    trackCondition?: SortOrderInput | SortOrder
    weather?: SortOrderInput | SortOrder
    status?: SortOrder
    country?: SortOrder
    state?: SortOrderInput | SortOrder
    metadata?: SortOrderInput | SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    _count?: RaceCountOrderByAggregateInput
    _avg?: RaceAvgOrderByAggregateInput
    _max?: RaceMaxOrderByAggregateInput
    _min?: RaceMinOrderByAggregateInput
    _sum?: RaceSumOrderByAggregateInput
  }

  export type RaceScalarWhereWithAggregatesInput = {
    AND?: RaceScalarWhereWithAggregatesInput | RaceScalarWhereWithAggregatesInput[]
    OR?: RaceScalarWhereWithAggregatesInput[]
    NOT?: RaceScalarWhereWithAggregatesInput | RaceScalarWhereWithAggregatesInput[]
    id?: UuidWithAggregatesFilter<"Race"> | string
    meetingId?: UuidWithAggregatesFilter<"Race"> | string
    raceNumber?: IntWithAggregatesFilter<"Race"> | number
    name?: StringWithAggregatesFilter<"Race"> | string
    startTime?: DateTimeWithAggregatesFilter<"Race"> | Date | string
    toteStartTime?: DateTimeNullableWithAggregatesFilter<"Race"> | Date | string | null
    distance?: IntWithAggregatesFilter<"Race"> | number
    trackCondition?: StringNullableWithAggregatesFilter<"Race"> | string | null
    weather?: StringNullableWithAggregatesFilter<"Race"> | string | null
    status?: StringWithAggregatesFilter<"Race"> | string
    country?: StringWithAggregatesFilter<"Race"> | string
    state?: StringNullableWithAggregatesFilter<"Race"> | string | null
    metadata?: JsonNullableWithAggregatesFilter<"Race">
    createdAt?: DateTimeWithAggregatesFilter<"Race"> | Date | string
    updatedAt?: DateTimeWithAggregatesFilter<"Race"> | Date | string
  }

  export type HorseWhereInput = {
    AND?: HorseWhereInput | HorseWhereInput[]
    OR?: HorseWhereInput[]
    NOT?: HorseWhereInput | HorseWhereInput[]
    id?: UuidFilter<"Horse"> | string
    tabEntrantId?: UuidNullableFilter<"Horse"> | string | null
    tabHorseId?: IntNullableFilter<"Horse"> | number | null
    harnessNzHorseId?: BigIntNullableFilter<"Horse"> | bigint | number | null
    name?: StringFilter<"Horse"> | string
    normalizedName?: StringFilter<"Horse"> | string
    sire?: StringNullableFilter<"Horse"> | string | null
    dam?: StringNullableFilter<"Horse"> | string | null
    damSire?: StringNullableFilter<"Horse"> | string | null
    sex?: StringNullableFilter<"Horse"> | string | null
    colour?: StringNullableFilter<"Horse"> | string | null
    country?: StringNullableFilter<"Horse"> | string | null
    firstSeen?: DateTimeFilter<"Horse"> | Date | string
    lastSeen?: DateTimeFilter<"Horse"> | Date | string
    raceCount?: IntFilter<"Horse"> | number
    runners?: RunnerListRelationFilter
  }

  export type HorseOrderByWithRelationInput = {
    id?: SortOrder
    tabEntrantId?: SortOrderInput | SortOrder
    tabHorseId?: SortOrderInput | SortOrder
    harnessNzHorseId?: SortOrderInput | SortOrder
    name?: SortOrder
    normalizedName?: SortOrder
    sire?: SortOrderInput | SortOrder
    dam?: SortOrderInput | SortOrder
    damSire?: SortOrderInput | SortOrder
    sex?: SortOrderInput | SortOrder
    colour?: SortOrderInput | SortOrder
    country?: SortOrderInput | SortOrder
    firstSeen?: SortOrder
    lastSeen?: SortOrder
    raceCount?: SortOrder
    runners?: RunnerOrderByRelationAggregateInput
  }

  export type HorseWhereUniqueInput = Prisma.AtLeast<{
    id?: string
    tabEntrantId?: string
    tabHorseId?: number
    harnessNzHorseId?: bigint | number
    AND?: HorseWhereInput | HorseWhereInput[]
    OR?: HorseWhereInput[]
    NOT?: HorseWhereInput | HorseWhereInput[]
    name?: StringFilter<"Horse"> | string
    normalizedName?: StringFilter<"Horse"> | string
    sire?: StringNullableFilter<"Horse"> | string | null
    dam?: StringNullableFilter<"Horse"> | string | null
    damSire?: StringNullableFilter<"Horse"> | string | null
    sex?: StringNullableFilter<"Horse"> | string | null
    colour?: StringNullableFilter<"Horse"> | string | null
    country?: StringNullableFilter<"Horse"> | string | null
    firstSeen?: DateTimeFilter<"Horse"> | Date | string
    lastSeen?: DateTimeFilter<"Horse"> | Date | string
    raceCount?: IntFilter<"Horse"> | number
    runners?: RunnerListRelationFilter
  }, "id" | "tabEntrantId" | "tabHorseId" | "harnessNzHorseId">

  export type HorseOrderByWithAggregationInput = {
    id?: SortOrder
    tabEntrantId?: SortOrderInput | SortOrder
    tabHorseId?: SortOrderInput | SortOrder
    harnessNzHorseId?: SortOrderInput | SortOrder
    name?: SortOrder
    normalizedName?: SortOrder
    sire?: SortOrderInput | SortOrder
    dam?: SortOrderInput | SortOrder
    damSire?: SortOrderInput | SortOrder
    sex?: SortOrderInput | SortOrder
    colour?: SortOrderInput | SortOrder
    country?: SortOrderInput | SortOrder
    firstSeen?: SortOrder
    lastSeen?: SortOrder
    raceCount?: SortOrder
    _count?: HorseCountOrderByAggregateInput
    _avg?: HorseAvgOrderByAggregateInput
    _max?: HorseMaxOrderByAggregateInput
    _min?: HorseMinOrderByAggregateInput
    _sum?: HorseSumOrderByAggregateInput
  }

  export type HorseScalarWhereWithAggregatesInput = {
    AND?: HorseScalarWhereWithAggregatesInput | HorseScalarWhereWithAggregatesInput[]
    OR?: HorseScalarWhereWithAggregatesInput[]
    NOT?: HorseScalarWhereWithAggregatesInput | HorseScalarWhereWithAggregatesInput[]
    id?: UuidWithAggregatesFilter<"Horse"> | string
    tabEntrantId?: UuidNullableWithAggregatesFilter<"Horse"> | string | null
    tabHorseId?: IntNullableWithAggregatesFilter<"Horse"> | number | null
    harnessNzHorseId?: BigIntNullableWithAggregatesFilter<"Horse"> | bigint | number | null
    name?: StringWithAggregatesFilter<"Horse"> | string
    normalizedName?: StringWithAggregatesFilter<"Horse"> | string
    sire?: StringNullableWithAggregatesFilter<"Horse"> | string | null
    dam?: StringNullableWithAggregatesFilter<"Horse"> | string | null
    damSire?: StringNullableWithAggregatesFilter<"Horse"> | string | null
    sex?: StringNullableWithAggregatesFilter<"Horse"> | string | null
    colour?: StringNullableWithAggregatesFilter<"Horse"> | string | null
    country?: StringNullableWithAggregatesFilter<"Horse"> | string | null
    firstSeen?: DateTimeWithAggregatesFilter<"Horse"> | Date | string
    lastSeen?: DateTimeWithAggregatesFilter<"Horse"> | Date | string
    raceCount?: IntWithAggregatesFilter<"Horse"> | number
  }

  export type RunnerWhereInput = {
    AND?: RunnerWhereInput | RunnerWhereInput[]
    OR?: RunnerWhereInput[]
    NOT?: RunnerWhereInput | RunnerWhereInput[]
    id?: UuidFilter<"Runner"> | string
    raceId?: UuidFilter<"Runner"> | string
    runnerNumber?: IntFilter<"Runner"> | number
    entrantId?: UuidNullableFilter<"Runner"> | string | null
    horseName?: StringFilter<"Runner"> | string
    tabHorseIdLegacy?: UuidNullableFilter<"Runner"> | string | null
    horseId?: UuidNullableFilter<"Runner"> | string | null
    barrier?: IntNullableFilter<"Runner"> | number | null
    weight?: DecimalNullableFilter<"Runner"> | Decimal | DecimalJsLike | number | string | null
    jockeyName?: StringNullableFilter<"Runner"> | string | null
    jockeyId?: UuidNullableFilter<"Runner"> | string | null
    jockeyWeightAllowance?: DecimalNullableFilter<"Runner"> | Decimal | DecimalJsLike | number | string | null
    trainerName?: StringNullableFilter<"Runner"> | string | null
    trainerId?: UuidNullableFilter<"Runner"> | string | null
    trainerLocation?: StringNullableFilter<"Runner"> | string | null
    form?: StringNullableFilter<"Runner"> | string | null
    lastStarts?: JsonNullableFilter<"Runner">
    lastTwentyStarts?: StringNullableFilter<"Runner"> | string | null
    age?: IntNullableFilter<"Runner"> | number | null
    silkColours?: StringNullableFilter<"Runner"> | string | null
    scratched?: BoolFilter<"Runner"> | boolean
    scratchedAt?: DateTimeNullableFilter<"Runner"> | Date | string | null
    openingOdds?: DecimalNullableFilter<"Runner"> | Decimal | DecimalJsLike | number | string | null
    currentOdds?: DecimalNullableFilter<"Runner"> | Decimal | DecimalJsLike | number | string | null
    metadata?: JsonNullableFilter<"Runner">
    createdAt?: DateTimeFilter<"Runner"> | Date | string
    updatedAt?: DateTimeFilter<"Runner"> | Date | string
    race?: XOR<RaceRelationFilter, RaceWhereInput>
    horse?: XOR<HorseNullableRelationFilter, HorseWhereInput> | null
    results?: ResultListRelationFilter
    oddsSnapshots?: OddsSnapshotListRelationFilter
  }

  export type RunnerOrderByWithRelationInput = {
    id?: SortOrder
    raceId?: SortOrder
    runnerNumber?: SortOrder
    entrantId?: SortOrderInput | SortOrder
    horseName?: SortOrder
    tabHorseIdLegacy?: SortOrderInput | SortOrder
    horseId?: SortOrderInput | SortOrder
    barrier?: SortOrderInput | SortOrder
    weight?: SortOrderInput | SortOrder
    jockeyName?: SortOrderInput | SortOrder
    jockeyId?: SortOrderInput | SortOrder
    jockeyWeightAllowance?: SortOrderInput | SortOrder
    trainerName?: SortOrderInput | SortOrder
    trainerId?: SortOrderInput | SortOrder
    trainerLocation?: SortOrderInput | SortOrder
    form?: SortOrderInput | SortOrder
    lastStarts?: SortOrderInput | SortOrder
    lastTwentyStarts?: SortOrderInput | SortOrder
    age?: SortOrderInput | SortOrder
    silkColours?: SortOrderInput | SortOrder
    scratched?: SortOrder
    scratchedAt?: SortOrderInput | SortOrder
    openingOdds?: SortOrderInput | SortOrder
    currentOdds?: SortOrderInput | SortOrder
    metadata?: SortOrderInput | SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    race?: RaceOrderByWithRelationInput
    horse?: HorseOrderByWithRelationInput
    results?: ResultOrderByRelationAggregateInput
    oddsSnapshots?: OddsSnapshotOrderByRelationAggregateInput
  }

  export type RunnerWhereUniqueInput = Prisma.AtLeast<{
    id?: string
    raceId_runnerNumber?: RunnerRaceIdRunnerNumberCompoundUniqueInput
    AND?: RunnerWhereInput | RunnerWhereInput[]
    OR?: RunnerWhereInput[]
    NOT?: RunnerWhereInput | RunnerWhereInput[]
    raceId?: UuidFilter<"Runner"> | string
    runnerNumber?: IntFilter<"Runner"> | number
    entrantId?: UuidNullableFilter<"Runner"> | string | null
    horseName?: StringFilter<"Runner"> | string
    tabHorseIdLegacy?: UuidNullableFilter<"Runner"> | string | null
    horseId?: UuidNullableFilter<"Runner"> | string | null
    barrier?: IntNullableFilter<"Runner"> | number | null
    weight?: DecimalNullableFilter<"Runner"> | Decimal | DecimalJsLike | number | string | null
    jockeyName?: StringNullableFilter<"Runner"> | string | null
    jockeyId?: UuidNullableFilter<"Runner"> | string | null
    jockeyWeightAllowance?: DecimalNullableFilter<"Runner"> | Decimal | DecimalJsLike | number | string | null
    trainerName?: StringNullableFilter<"Runner"> | string | null
    trainerId?: UuidNullableFilter<"Runner"> | string | null
    trainerLocation?: StringNullableFilter<"Runner"> | string | null
    form?: StringNullableFilter<"Runner"> | string | null
    lastStarts?: JsonNullableFilter<"Runner">
    lastTwentyStarts?: StringNullableFilter<"Runner"> | string | null
    age?: IntNullableFilter<"Runner"> | number | null
    silkColours?: StringNullableFilter<"Runner"> | string | null
    scratched?: BoolFilter<"Runner"> | boolean
    scratchedAt?: DateTimeNullableFilter<"Runner"> | Date | string | null
    openingOdds?: DecimalNullableFilter<"Runner"> | Decimal | DecimalJsLike | number | string | null
    currentOdds?: DecimalNullableFilter<"Runner"> | Decimal | DecimalJsLike | number | string | null
    metadata?: JsonNullableFilter<"Runner">
    createdAt?: DateTimeFilter<"Runner"> | Date | string
    updatedAt?: DateTimeFilter<"Runner"> | Date | string
    race?: XOR<RaceRelationFilter, RaceWhereInput>
    horse?: XOR<HorseNullableRelationFilter, HorseWhereInput> | null
    results?: ResultListRelationFilter
    oddsSnapshots?: OddsSnapshotListRelationFilter
  }, "id" | "raceId_runnerNumber">

  export type RunnerOrderByWithAggregationInput = {
    id?: SortOrder
    raceId?: SortOrder
    runnerNumber?: SortOrder
    entrantId?: SortOrderInput | SortOrder
    horseName?: SortOrder
    tabHorseIdLegacy?: SortOrderInput | SortOrder
    horseId?: SortOrderInput | SortOrder
    barrier?: SortOrderInput | SortOrder
    weight?: SortOrderInput | SortOrder
    jockeyName?: SortOrderInput | SortOrder
    jockeyId?: SortOrderInput | SortOrder
    jockeyWeightAllowance?: SortOrderInput | SortOrder
    trainerName?: SortOrderInput | SortOrder
    trainerId?: SortOrderInput | SortOrder
    trainerLocation?: SortOrderInput | SortOrder
    form?: SortOrderInput | SortOrder
    lastStarts?: SortOrderInput | SortOrder
    lastTwentyStarts?: SortOrderInput | SortOrder
    age?: SortOrderInput | SortOrder
    silkColours?: SortOrderInput | SortOrder
    scratched?: SortOrder
    scratchedAt?: SortOrderInput | SortOrder
    openingOdds?: SortOrderInput | SortOrder
    currentOdds?: SortOrderInput | SortOrder
    metadata?: SortOrderInput | SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    _count?: RunnerCountOrderByAggregateInput
    _avg?: RunnerAvgOrderByAggregateInput
    _max?: RunnerMaxOrderByAggregateInput
    _min?: RunnerMinOrderByAggregateInput
    _sum?: RunnerSumOrderByAggregateInput
  }

  export type RunnerScalarWhereWithAggregatesInput = {
    AND?: RunnerScalarWhereWithAggregatesInput | RunnerScalarWhereWithAggregatesInput[]
    OR?: RunnerScalarWhereWithAggregatesInput[]
    NOT?: RunnerScalarWhereWithAggregatesInput | RunnerScalarWhereWithAggregatesInput[]
    id?: UuidWithAggregatesFilter<"Runner"> | string
    raceId?: UuidWithAggregatesFilter<"Runner"> | string
    runnerNumber?: IntWithAggregatesFilter<"Runner"> | number
    entrantId?: UuidNullableWithAggregatesFilter<"Runner"> | string | null
    horseName?: StringWithAggregatesFilter<"Runner"> | string
    tabHorseIdLegacy?: UuidNullableWithAggregatesFilter<"Runner"> | string | null
    horseId?: UuidNullableWithAggregatesFilter<"Runner"> | string | null
    barrier?: IntNullableWithAggregatesFilter<"Runner"> | number | null
    weight?: DecimalNullableWithAggregatesFilter<"Runner"> | Decimal | DecimalJsLike | number | string | null
    jockeyName?: StringNullableWithAggregatesFilter<"Runner"> | string | null
    jockeyId?: UuidNullableWithAggregatesFilter<"Runner"> | string | null
    jockeyWeightAllowance?: DecimalNullableWithAggregatesFilter<"Runner"> | Decimal | DecimalJsLike | number | string | null
    trainerName?: StringNullableWithAggregatesFilter<"Runner"> | string | null
    trainerId?: UuidNullableWithAggregatesFilter<"Runner"> | string | null
    trainerLocation?: StringNullableWithAggregatesFilter<"Runner"> | string | null
    form?: StringNullableWithAggregatesFilter<"Runner"> | string | null
    lastStarts?: JsonNullableWithAggregatesFilter<"Runner">
    lastTwentyStarts?: StringNullableWithAggregatesFilter<"Runner"> | string | null
    age?: IntNullableWithAggregatesFilter<"Runner"> | number | null
    silkColours?: StringNullableWithAggregatesFilter<"Runner"> | string | null
    scratched?: BoolWithAggregatesFilter<"Runner"> | boolean
    scratchedAt?: DateTimeNullableWithAggregatesFilter<"Runner"> | Date | string | null
    openingOdds?: DecimalNullableWithAggregatesFilter<"Runner"> | Decimal | DecimalJsLike | number | string | null
    currentOdds?: DecimalNullableWithAggregatesFilter<"Runner"> | Decimal | DecimalJsLike | number | string | null
    metadata?: JsonNullableWithAggregatesFilter<"Runner">
    createdAt?: DateTimeWithAggregatesFilter<"Runner"> | Date | string
    updatedAt?: DateTimeWithAggregatesFilter<"Runner"> | Date | string
  }

  export type ResultWhereInput = {
    AND?: ResultWhereInput | ResultWhereInput[]
    OR?: ResultWhereInput[]
    NOT?: ResultWhereInput | ResultWhereInput[]
    id?: UuidFilter<"Result"> | string
    raceId?: UuidFilter<"Result"> | string
    runnerId?: UuidFilter<"Result"> | string
    finishPosition?: IntNullableFilter<"Result"> | number | null
    margin?: DecimalNullableFilter<"Result"> | Decimal | DecimalJsLike | number | string | null
    raceTime?: DecimalNullableFilter<"Result"> | Decimal | DecimalJsLike | number | string | null
    winDividend?: DecimalNullableFilter<"Result"> | Decimal | DecimalJsLike | number | string | null
    placeDividend?: DecimalNullableFilter<"Result"> | Decimal | DecimalJsLike | number | string | null
    official?: BoolFilter<"Result"> | boolean
    disqualified?: BoolFilter<"Result"> | boolean
    metadata?: JsonNullableFilter<"Result">
    createdAt?: DateTimeFilter<"Result"> | Date | string
    race?: XOR<RaceRelationFilter, RaceWhereInput>
    runner?: XOR<RunnerRelationFilter, RunnerWhereInput>
  }

  export type ResultOrderByWithRelationInput = {
    id?: SortOrder
    raceId?: SortOrder
    runnerId?: SortOrder
    finishPosition?: SortOrderInput | SortOrder
    margin?: SortOrderInput | SortOrder
    raceTime?: SortOrderInput | SortOrder
    winDividend?: SortOrderInput | SortOrder
    placeDividend?: SortOrderInput | SortOrder
    official?: SortOrder
    disqualified?: SortOrder
    metadata?: SortOrderInput | SortOrder
    createdAt?: SortOrder
    race?: RaceOrderByWithRelationInput
    runner?: RunnerOrderByWithRelationInput
  }

  export type ResultWhereUniqueInput = Prisma.AtLeast<{
    id?: string
    raceId_runnerId?: ResultRaceIdRunnerIdCompoundUniqueInput
    AND?: ResultWhereInput | ResultWhereInput[]
    OR?: ResultWhereInput[]
    NOT?: ResultWhereInput | ResultWhereInput[]
    raceId?: UuidFilter<"Result"> | string
    runnerId?: UuidFilter<"Result"> | string
    finishPosition?: IntNullableFilter<"Result"> | number | null
    margin?: DecimalNullableFilter<"Result"> | Decimal | DecimalJsLike | number | string | null
    raceTime?: DecimalNullableFilter<"Result"> | Decimal | DecimalJsLike | number | string | null
    winDividend?: DecimalNullableFilter<"Result"> | Decimal | DecimalJsLike | number | string | null
    placeDividend?: DecimalNullableFilter<"Result"> | Decimal | DecimalJsLike | number | string | null
    official?: BoolFilter<"Result"> | boolean
    disqualified?: BoolFilter<"Result"> | boolean
    metadata?: JsonNullableFilter<"Result">
    createdAt?: DateTimeFilter<"Result"> | Date | string
    race?: XOR<RaceRelationFilter, RaceWhereInput>
    runner?: XOR<RunnerRelationFilter, RunnerWhereInput>
  }, "id" | "raceId_runnerId">

  export type ResultOrderByWithAggregationInput = {
    id?: SortOrder
    raceId?: SortOrder
    runnerId?: SortOrder
    finishPosition?: SortOrderInput | SortOrder
    margin?: SortOrderInput | SortOrder
    raceTime?: SortOrderInput | SortOrder
    winDividend?: SortOrderInput | SortOrder
    placeDividend?: SortOrderInput | SortOrder
    official?: SortOrder
    disqualified?: SortOrder
    metadata?: SortOrderInput | SortOrder
    createdAt?: SortOrder
    _count?: ResultCountOrderByAggregateInput
    _avg?: ResultAvgOrderByAggregateInput
    _max?: ResultMaxOrderByAggregateInput
    _min?: ResultMinOrderByAggregateInput
    _sum?: ResultSumOrderByAggregateInput
  }

  export type ResultScalarWhereWithAggregatesInput = {
    AND?: ResultScalarWhereWithAggregatesInput | ResultScalarWhereWithAggregatesInput[]
    OR?: ResultScalarWhereWithAggregatesInput[]
    NOT?: ResultScalarWhereWithAggregatesInput | ResultScalarWhereWithAggregatesInput[]
    id?: UuidWithAggregatesFilter<"Result"> | string
    raceId?: UuidWithAggregatesFilter<"Result"> | string
    runnerId?: UuidWithAggregatesFilter<"Result"> | string
    finishPosition?: IntNullableWithAggregatesFilter<"Result"> | number | null
    margin?: DecimalNullableWithAggregatesFilter<"Result"> | Decimal | DecimalJsLike | number | string | null
    raceTime?: DecimalNullableWithAggregatesFilter<"Result"> | Decimal | DecimalJsLike | number | string | null
    winDividend?: DecimalNullableWithAggregatesFilter<"Result"> | Decimal | DecimalJsLike | number | string | null
    placeDividend?: DecimalNullableWithAggregatesFilter<"Result"> | Decimal | DecimalJsLike | number | string | null
    official?: BoolWithAggregatesFilter<"Result"> | boolean
    disqualified?: BoolWithAggregatesFilter<"Result"> | boolean
    metadata?: JsonNullableWithAggregatesFilter<"Result">
    createdAt?: DateTimeWithAggregatesFilter<"Result"> | Date | string
  }

  export type ScrapeWhereInput = {
    AND?: ScrapeWhereInput | ScrapeWhereInput[]
    OR?: ScrapeWhereInput[]
    NOT?: ScrapeWhereInput | ScrapeWhereInput[]
    id?: UuidFilter<"Scrape"> | string
    raceId?: UuidFilter<"Scrape"> | string
    scrapeType?: StringFilter<"Scrape"> | string
    scrapedAt?: DateTimeFilter<"Scrape"> | Date | string
    changesDetected?: JsonNullableFilter<"Scrape">
    success?: BoolFilter<"Scrape"> | boolean
    errorMessage?: StringNullableFilter<"Scrape"> | string | null
    jobRunId?: UuidNullableFilter<"Scrape"> | string | null
    race?: XOR<RaceRelationFilter, RaceWhereInput>
    jobRun?: XOR<JobRunNullableRelationFilter, JobRunWhereInput> | null
  }

  export type ScrapeOrderByWithRelationInput = {
    id?: SortOrder
    raceId?: SortOrder
    scrapeType?: SortOrder
    scrapedAt?: SortOrder
    changesDetected?: SortOrderInput | SortOrder
    success?: SortOrder
    errorMessage?: SortOrderInput | SortOrder
    jobRunId?: SortOrderInput | SortOrder
    race?: RaceOrderByWithRelationInput
    jobRun?: JobRunOrderByWithRelationInput
  }

  export type ScrapeWhereUniqueInput = Prisma.AtLeast<{
    id?: string
    AND?: ScrapeWhereInput | ScrapeWhereInput[]
    OR?: ScrapeWhereInput[]
    NOT?: ScrapeWhereInput | ScrapeWhereInput[]
    raceId?: UuidFilter<"Scrape"> | string
    scrapeType?: StringFilter<"Scrape"> | string
    scrapedAt?: DateTimeFilter<"Scrape"> | Date | string
    changesDetected?: JsonNullableFilter<"Scrape">
    success?: BoolFilter<"Scrape"> | boolean
    errorMessage?: StringNullableFilter<"Scrape"> | string | null
    jobRunId?: UuidNullableFilter<"Scrape"> | string | null
    race?: XOR<RaceRelationFilter, RaceWhereInput>
    jobRun?: XOR<JobRunNullableRelationFilter, JobRunWhereInput> | null
  }, "id">

  export type ScrapeOrderByWithAggregationInput = {
    id?: SortOrder
    raceId?: SortOrder
    scrapeType?: SortOrder
    scrapedAt?: SortOrder
    changesDetected?: SortOrderInput | SortOrder
    success?: SortOrder
    errorMessage?: SortOrderInput | SortOrder
    jobRunId?: SortOrderInput | SortOrder
    _count?: ScrapeCountOrderByAggregateInput
    _max?: ScrapeMaxOrderByAggregateInput
    _min?: ScrapeMinOrderByAggregateInput
  }

  export type ScrapeScalarWhereWithAggregatesInput = {
    AND?: ScrapeScalarWhereWithAggregatesInput | ScrapeScalarWhereWithAggregatesInput[]
    OR?: ScrapeScalarWhereWithAggregatesInput[]
    NOT?: ScrapeScalarWhereWithAggregatesInput | ScrapeScalarWhereWithAggregatesInput[]
    id?: UuidWithAggregatesFilter<"Scrape"> | string
    raceId?: UuidWithAggregatesFilter<"Scrape"> | string
    scrapeType?: StringWithAggregatesFilter<"Scrape"> | string
    scrapedAt?: DateTimeWithAggregatesFilter<"Scrape"> | Date | string
    changesDetected?: JsonNullableWithAggregatesFilter<"Scrape">
    success?: BoolWithAggregatesFilter<"Scrape"> | boolean
    errorMessage?: StringNullableWithAggregatesFilter<"Scrape"> | string | null
    jobRunId?: UuidNullableWithAggregatesFilter<"Scrape"> | string | null
  }

  export type JobRunWhereInput = {
    AND?: JobRunWhereInput | JobRunWhereInput[]
    OR?: JobRunWhereInput[]
    NOT?: JobRunWhereInput | JobRunWhereInput[]
    id?: UuidFilter<"JobRun"> | string
    jobType?: StringFilter<"JobRun"> | string
    status?: StringFilter<"JobRun"> | string
    startedAt?: DateTimeFilter<"JobRun"> | Date | string
    completedAt?: DateTimeNullableFilter<"JobRun"> | Date | string | null
    durationMs?: IntNullableFilter<"JobRun"> | number | null
    itemsProcessed?: IntFilter<"JobRun"> | number
    itemsFailed?: IntFilter<"JobRun"> | number
    errorMessage?: StringNullableFilter<"JobRun"> | string | null
    metadata?: JsonNullableFilter<"JobRun">
    retryCount?: IntFilter<"JobRun"> | number
    parentJobRunId?: UuidNullableFilter<"JobRun"> | string | null
    scrapes?: ScrapeListRelationFilter
    parentJobRun?: XOR<JobRunNullableRelationFilter, JobRunWhereInput> | null
    retryJobRuns?: JobRunListRelationFilter
  }

  export type JobRunOrderByWithRelationInput = {
    id?: SortOrder
    jobType?: SortOrder
    status?: SortOrder
    startedAt?: SortOrder
    completedAt?: SortOrderInput | SortOrder
    durationMs?: SortOrderInput | SortOrder
    itemsProcessed?: SortOrder
    itemsFailed?: SortOrder
    errorMessage?: SortOrderInput | SortOrder
    metadata?: SortOrderInput | SortOrder
    retryCount?: SortOrder
    parentJobRunId?: SortOrderInput | SortOrder
    scrapes?: ScrapeOrderByRelationAggregateInput
    parentJobRun?: JobRunOrderByWithRelationInput
    retryJobRuns?: JobRunOrderByRelationAggregateInput
  }

  export type JobRunWhereUniqueInput = Prisma.AtLeast<{
    id?: string
    AND?: JobRunWhereInput | JobRunWhereInput[]
    OR?: JobRunWhereInput[]
    NOT?: JobRunWhereInput | JobRunWhereInput[]
    jobType?: StringFilter<"JobRun"> | string
    status?: StringFilter<"JobRun"> | string
    startedAt?: DateTimeFilter<"JobRun"> | Date | string
    completedAt?: DateTimeNullableFilter<"JobRun"> | Date | string | null
    durationMs?: IntNullableFilter<"JobRun"> | number | null
    itemsProcessed?: IntFilter<"JobRun"> | number
    itemsFailed?: IntFilter<"JobRun"> | number
    errorMessage?: StringNullableFilter<"JobRun"> | string | null
    metadata?: JsonNullableFilter<"JobRun">
    retryCount?: IntFilter<"JobRun"> | number
    parentJobRunId?: UuidNullableFilter<"JobRun"> | string | null
    scrapes?: ScrapeListRelationFilter
    parentJobRun?: XOR<JobRunNullableRelationFilter, JobRunWhereInput> | null
    retryJobRuns?: JobRunListRelationFilter
  }, "id">

  export type JobRunOrderByWithAggregationInput = {
    id?: SortOrder
    jobType?: SortOrder
    status?: SortOrder
    startedAt?: SortOrder
    completedAt?: SortOrderInput | SortOrder
    durationMs?: SortOrderInput | SortOrder
    itemsProcessed?: SortOrder
    itemsFailed?: SortOrder
    errorMessage?: SortOrderInput | SortOrder
    metadata?: SortOrderInput | SortOrder
    retryCount?: SortOrder
    parentJobRunId?: SortOrderInput | SortOrder
    _count?: JobRunCountOrderByAggregateInput
    _avg?: JobRunAvgOrderByAggregateInput
    _max?: JobRunMaxOrderByAggregateInput
    _min?: JobRunMinOrderByAggregateInput
    _sum?: JobRunSumOrderByAggregateInput
  }

  export type JobRunScalarWhereWithAggregatesInput = {
    AND?: JobRunScalarWhereWithAggregatesInput | JobRunScalarWhereWithAggregatesInput[]
    OR?: JobRunScalarWhereWithAggregatesInput[]
    NOT?: JobRunScalarWhereWithAggregatesInput | JobRunScalarWhereWithAggregatesInput[]
    id?: UuidWithAggregatesFilter<"JobRun"> | string
    jobType?: StringWithAggregatesFilter<"JobRun"> | string
    status?: StringWithAggregatesFilter<"JobRun"> | string
    startedAt?: DateTimeWithAggregatesFilter<"JobRun"> | Date | string
    completedAt?: DateTimeNullableWithAggregatesFilter<"JobRun"> | Date | string | null
    durationMs?: IntNullableWithAggregatesFilter<"JobRun"> | number | null
    itemsProcessed?: IntWithAggregatesFilter<"JobRun"> | number
    itemsFailed?: IntWithAggregatesFilter<"JobRun"> | number
    errorMessage?: StringNullableWithAggregatesFilter<"JobRun"> | string | null
    metadata?: JsonNullableWithAggregatesFilter<"JobRun">
    retryCount?: IntWithAggregatesFilter<"JobRun"> | number
    parentJobRunId?: UuidNullableWithAggregatesFilter<"JobRun"> | string | null
  }

  export type DividendWhereInput = {
    AND?: DividendWhereInput | DividendWhereInput[]
    OR?: DividendWhereInput[]
    NOT?: DividendWhereInput | DividendWhereInput[]
    id?: UuidFilter<"Dividend"> | string
    raceId?: UuidFilter<"Dividend"> | string
    tote?: StringFilter<"Dividend"> | string
    productName?: StringFilter<"Dividend"> | string
    status?: StringFilter<"Dividend"> | string
    dividend?: DecimalFilter<"Dividend"> | Decimal | DecimalJsLike | number | string
    poolSize?: DecimalNullableFilter<"Dividend"> | Decimal | DecimalJsLike | number | string | null
    jackpotSize?: DecimalNullableFilter<"Dividend"> | Decimal | DecimalJsLike | number | string | null
    positions?: JsonFilter<"Dividend">
    description?: StringNullableFilter<"Dividend"> | string | null
    createdAt?: DateTimeFilter<"Dividend"> | Date | string
    race?: XOR<RaceRelationFilter, RaceWhereInput>
  }

  export type DividendOrderByWithRelationInput = {
    id?: SortOrder
    raceId?: SortOrder
    tote?: SortOrder
    productName?: SortOrder
    status?: SortOrder
    dividend?: SortOrder
    poolSize?: SortOrderInput | SortOrder
    jackpotSize?: SortOrderInput | SortOrder
    positions?: SortOrder
    description?: SortOrderInput | SortOrder
    createdAt?: SortOrder
    race?: RaceOrderByWithRelationInput
  }

  export type DividendWhereUniqueInput = Prisma.AtLeast<{
    id?: string
    raceId_tote_productName?: DividendRaceIdToteProductNameCompoundUniqueInput
    AND?: DividendWhereInput | DividendWhereInput[]
    OR?: DividendWhereInput[]
    NOT?: DividendWhereInput | DividendWhereInput[]
    raceId?: UuidFilter<"Dividend"> | string
    tote?: StringFilter<"Dividend"> | string
    productName?: StringFilter<"Dividend"> | string
    status?: StringFilter<"Dividend"> | string
    dividend?: DecimalFilter<"Dividend"> | Decimal | DecimalJsLike | number | string
    poolSize?: DecimalNullableFilter<"Dividend"> | Decimal | DecimalJsLike | number | string | null
    jackpotSize?: DecimalNullableFilter<"Dividend"> | Decimal | DecimalJsLike | number | string | null
    positions?: JsonFilter<"Dividend">
    description?: StringNullableFilter<"Dividend"> | string | null
    createdAt?: DateTimeFilter<"Dividend"> | Date | string
    race?: XOR<RaceRelationFilter, RaceWhereInput>
  }, "id" | "raceId_tote_productName">

  export type DividendOrderByWithAggregationInput = {
    id?: SortOrder
    raceId?: SortOrder
    tote?: SortOrder
    productName?: SortOrder
    status?: SortOrder
    dividend?: SortOrder
    poolSize?: SortOrderInput | SortOrder
    jackpotSize?: SortOrderInput | SortOrder
    positions?: SortOrder
    description?: SortOrderInput | SortOrder
    createdAt?: SortOrder
    _count?: DividendCountOrderByAggregateInput
    _avg?: DividendAvgOrderByAggregateInput
    _max?: DividendMaxOrderByAggregateInput
    _min?: DividendMinOrderByAggregateInput
    _sum?: DividendSumOrderByAggregateInput
  }

  export type DividendScalarWhereWithAggregatesInput = {
    AND?: DividendScalarWhereWithAggregatesInput | DividendScalarWhereWithAggregatesInput[]
    OR?: DividendScalarWhereWithAggregatesInput[]
    NOT?: DividendScalarWhereWithAggregatesInput | DividendScalarWhereWithAggregatesInput[]
    id?: UuidWithAggregatesFilter<"Dividend"> | string
    raceId?: UuidWithAggregatesFilter<"Dividend"> | string
    tote?: StringWithAggregatesFilter<"Dividend"> | string
    productName?: StringWithAggregatesFilter<"Dividend"> | string
    status?: StringWithAggregatesFilter<"Dividend"> | string
    dividend?: DecimalWithAggregatesFilter<"Dividend"> | Decimal | DecimalJsLike | number | string
    poolSize?: DecimalNullableWithAggregatesFilter<"Dividend"> | Decimal | DecimalJsLike | number | string | null
    jackpotSize?: DecimalNullableWithAggregatesFilter<"Dividend"> | Decimal | DecimalJsLike | number | string | null
    positions?: JsonWithAggregatesFilter<"Dividend">
    description?: StringNullableWithAggregatesFilter<"Dividend"> | string | null
    createdAt?: DateTimeWithAggregatesFilter<"Dividend"> | Date | string
  }

  export type OddsSnapshotWhereInput = {
    AND?: OddsSnapshotWhereInput | OddsSnapshotWhereInput[]
    OR?: OddsSnapshotWhereInput[]
    NOT?: OddsSnapshotWhereInput | OddsSnapshotWhereInput[]
    id?: UuidFilter<"OddsSnapshot"> | string
    runnerId?: UuidFilter<"OddsSnapshot"> | string
    snapshotType?: StringFilter<"OddsSnapshot"> | string
    fixedWin?: DecimalNullableFilter<"OddsSnapshot"> | Decimal | DecimalJsLike | number | string | null
    fixedPlace?: DecimalNullableFilter<"OddsSnapshot"> | Decimal | DecimalJsLike | number | string | null
    poolWin?: DecimalNullableFilter<"OddsSnapshot"> | Decimal | DecimalJsLike | number | string | null
    poolPlace?: DecimalNullableFilter<"OddsSnapshot"> | Decimal | DecimalJsLike | number | string | null
    capturedAt?: DateTimeFilter<"OddsSnapshot"> | Date | string
    runner?: XOR<RunnerRelationFilter, RunnerWhereInput>
  }

  export type OddsSnapshotOrderByWithRelationInput = {
    id?: SortOrder
    runnerId?: SortOrder
    snapshotType?: SortOrder
    fixedWin?: SortOrderInput | SortOrder
    fixedPlace?: SortOrderInput | SortOrder
    poolWin?: SortOrderInput | SortOrder
    poolPlace?: SortOrderInput | SortOrder
    capturedAt?: SortOrder
    runner?: RunnerOrderByWithRelationInput
  }

  export type OddsSnapshotWhereUniqueInput = Prisma.AtLeast<{
    id?: string
    runnerId_snapshotType?: OddsSnapshotRunnerIdSnapshotTypeCompoundUniqueInput
    AND?: OddsSnapshotWhereInput | OddsSnapshotWhereInput[]
    OR?: OddsSnapshotWhereInput[]
    NOT?: OddsSnapshotWhereInput | OddsSnapshotWhereInput[]
    runnerId?: UuidFilter<"OddsSnapshot"> | string
    snapshotType?: StringFilter<"OddsSnapshot"> | string
    fixedWin?: DecimalNullableFilter<"OddsSnapshot"> | Decimal | DecimalJsLike | number | string | null
    fixedPlace?: DecimalNullableFilter<"OddsSnapshot"> | Decimal | DecimalJsLike | number | string | null
    poolWin?: DecimalNullableFilter<"OddsSnapshot"> | Decimal | DecimalJsLike | number | string | null
    poolPlace?: DecimalNullableFilter<"OddsSnapshot"> | Decimal | DecimalJsLike | number | string | null
    capturedAt?: DateTimeFilter<"OddsSnapshot"> | Date | string
    runner?: XOR<RunnerRelationFilter, RunnerWhereInput>
  }, "id" | "runnerId_snapshotType">

  export type OddsSnapshotOrderByWithAggregationInput = {
    id?: SortOrder
    runnerId?: SortOrder
    snapshotType?: SortOrder
    fixedWin?: SortOrderInput | SortOrder
    fixedPlace?: SortOrderInput | SortOrder
    poolWin?: SortOrderInput | SortOrder
    poolPlace?: SortOrderInput | SortOrder
    capturedAt?: SortOrder
    _count?: OddsSnapshotCountOrderByAggregateInput
    _avg?: OddsSnapshotAvgOrderByAggregateInput
    _max?: OddsSnapshotMaxOrderByAggregateInput
    _min?: OddsSnapshotMinOrderByAggregateInput
    _sum?: OddsSnapshotSumOrderByAggregateInput
  }

  export type OddsSnapshotScalarWhereWithAggregatesInput = {
    AND?: OddsSnapshotScalarWhereWithAggregatesInput | OddsSnapshotScalarWhereWithAggregatesInput[]
    OR?: OddsSnapshotScalarWhereWithAggregatesInput[]
    NOT?: OddsSnapshotScalarWhereWithAggregatesInput | OddsSnapshotScalarWhereWithAggregatesInput[]
    id?: UuidWithAggregatesFilter<"OddsSnapshot"> | string
    runnerId?: UuidWithAggregatesFilter<"OddsSnapshot"> | string
    snapshotType?: StringWithAggregatesFilter<"OddsSnapshot"> | string
    fixedWin?: DecimalNullableWithAggregatesFilter<"OddsSnapshot"> | Decimal | DecimalJsLike | number | string | null
    fixedPlace?: DecimalNullableWithAggregatesFilter<"OddsSnapshot"> | Decimal | DecimalJsLike | number | string | null
    poolWin?: DecimalNullableWithAggregatesFilter<"OddsSnapshot"> | Decimal | DecimalJsLike | number | string | null
    poolPlace?: DecimalNullableWithAggregatesFilter<"OddsSnapshot"> | Decimal | DecimalJsLike | number | string | null
    capturedAt?: DateTimeWithAggregatesFilter<"OddsSnapshot"> | Date | string
  }

  export type MeetingCreateInput = {
    id?: string
    name: string
    date: Date | string
    country: string
    state?: string | null
    category: string
    categoryName?: string | null
    trackCondition?: string | null
    weather?: string | null
    videoChannels?: NullableJsonNullValueInput | InputJsonValue
    quaddie?: MeetingCreatequaddieInput | number[]
    earlyQuaddie?: MeetingCreateearlyQuaddieInput | number[]
    toteMeetingNumber?: number | null
    toteStatus?: string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: Date | string
    updatedAt?: Date | string
    races?: RaceCreateNestedManyWithoutMeetingInput
  }

  export type MeetingUncheckedCreateInput = {
    id?: string
    name: string
    date: Date | string
    country: string
    state?: string | null
    category: string
    categoryName?: string | null
    trackCondition?: string | null
    weather?: string | null
    videoChannels?: NullableJsonNullValueInput | InputJsonValue
    quaddie?: MeetingCreatequaddieInput | number[]
    earlyQuaddie?: MeetingCreateearlyQuaddieInput | number[]
    toteMeetingNumber?: number | null
    toteStatus?: string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: Date | string
    updatedAt?: Date | string
    races?: RaceUncheckedCreateNestedManyWithoutMeetingInput
  }

  export type MeetingUpdateInput = {
    id?: StringFieldUpdateOperationsInput | string
    name?: StringFieldUpdateOperationsInput | string
    date?: DateTimeFieldUpdateOperationsInput | Date | string
    country?: StringFieldUpdateOperationsInput | string
    state?: NullableStringFieldUpdateOperationsInput | string | null
    category?: StringFieldUpdateOperationsInput | string
    categoryName?: NullableStringFieldUpdateOperationsInput | string | null
    trackCondition?: NullableStringFieldUpdateOperationsInput | string | null
    weather?: NullableStringFieldUpdateOperationsInput | string | null
    videoChannels?: NullableJsonNullValueInput | InputJsonValue
    quaddie?: MeetingUpdatequaddieInput | number[]
    earlyQuaddie?: MeetingUpdateearlyQuaddieInput | number[]
    toteMeetingNumber?: NullableIntFieldUpdateOperationsInput | number | null
    toteStatus?: NullableStringFieldUpdateOperationsInput | string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    races?: RaceUpdateManyWithoutMeetingNestedInput
  }

  export type MeetingUncheckedUpdateInput = {
    id?: StringFieldUpdateOperationsInput | string
    name?: StringFieldUpdateOperationsInput | string
    date?: DateTimeFieldUpdateOperationsInput | Date | string
    country?: StringFieldUpdateOperationsInput | string
    state?: NullableStringFieldUpdateOperationsInput | string | null
    category?: StringFieldUpdateOperationsInput | string
    categoryName?: NullableStringFieldUpdateOperationsInput | string | null
    trackCondition?: NullableStringFieldUpdateOperationsInput | string | null
    weather?: NullableStringFieldUpdateOperationsInput | string | null
    videoChannels?: NullableJsonNullValueInput | InputJsonValue
    quaddie?: MeetingUpdatequaddieInput | number[]
    earlyQuaddie?: MeetingUpdateearlyQuaddieInput | number[]
    toteMeetingNumber?: NullableIntFieldUpdateOperationsInput | number | null
    toteStatus?: NullableStringFieldUpdateOperationsInput | string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    races?: RaceUncheckedUpdateManyWithoutMeetingNestedInput
  }

  export type MeetingCreateManyInput = {
    id?: string
    name: string
    date: Date | string
    country: string
    state?: string | null
    category: string
    categoryName?: string | null
    trackCondition?: string | null
    weather?: string | null
    videoChannels?: NullableJsonNullValueInput | InputJsonValue
    quaddie?: MeetingCreatequaddieInput | number[]
    earlyQuaddie?: MeetingCreateearlyQuaddieInput | number[]
    toteMeetingNumber?: number | null
    toteStatus?: string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type MeetingUpdateManyMutationInput = {
    id?: StringFieldUpdateOperationsInput | string
    name?: StringFieldUpdateOperationsInput | string
    date?: DateTimeFieldUpdateOperationsInput | Date | string
    country?: StringFieldUpdateOperationsInput | string
    state?: NullableStringFieldUpdateOperationsInput | string | null
    category?: StringFieldUpdateOperationsInput | string
    categoryName?: NullableStringFieldUpdateOperationsInput | string | null
    trackCondition?: NullableStringFieldUpdateOperationsInput | string | null
    weather?: NullableStringFieldUpdateOperationsInput | string | null
    videoChannels?: NullableJsonNullValueInput | InputJsonValue
    quaddie?: MeetingUpdatequaddieInput | number[]
    earlyQuaddie?: MeetingUpdateearlyQuaddieInput | number[]
    toteMeetingNumber?: NullableIntFieldUpdateOperationsInput | number | null
    toteStatus?: NullableStringFieldUpdateOperationsInput | string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type MeetingUncheckedUpdateManyInput = {
    id?: StringFieldUpdateOperationsInput | string
    name?: StringFieldUpdateOperationsInput | string
    date?: DateTimeFieldUpdateOperationsInput | Date | string
    country?: StringFieldUpdateOperationsInput | string
    state?: NullableStringFieldUpdateOperationsInput | string | null
    category?: StringFieldUpdateOperationsInput | string
    categoryName?: NullableStringFieldUpdateOperationsInput | string | null
    trackCondition?: NullableStringFieldUpdateOperationsInput | string | null
    weather?: NullableStringFieldUpdateOperationsInput | string | null
    videoChannels?: NullableJsonNullValueInput | InputJsonValue
    quaddie?: MeetingUpdatequaddieInput | number[]
    earlyQuaddie?: MeetingUpdateearlyQuaddieInput | number[]
    toteMeetingNumber?: NullableIntFieldUpdateOperationsInput | number | null
    toteStatus?: NullableStringFieldUpdateOperationsInput | string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type RaceCreateInput = {
    id?: string
    raceNumber: number
    name: string
    startTime: Date | string
    toteStartTime?: Date | string | null
    distance: number
    trackCondition?: string | null
    weather?: string | null
    status: string
    country: string
    state?: string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: Date | string
    updatedAt?: Date | string
    meeting: MeetingCreateNestedOneWithoutRacesInput
    runners?: RunnerCreateNestedManyWithoutRaceInput
    scrapes?: ScrapeCreateNestedManyWithoutRaceInput
    results?: ResultCreateNestedManyWithoutRaceInput
    dividends?: DividendCreateNestedManyWithoutRaceInput
  }

  export type RaceUncheckedCreateInput = {
    id?: string
    meetingId: string
    raceNumber: number
    name: string
    startTime: Date | string
    toteStartTime?: Date | string | null
    distance: number
    trackCondition?: string | null
    weather?: string | null
    status: string
    country: string
    state?: string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: Date | string
    updatedAt?: Date | string
    runners?: RunnerUncheckedCreateNestedManyWithoutRaceInput
    scrapes?: ScrapeUncheckedCreateNestedManyWithoutRaceInput
    results?: ResultUncheckedCreateNestedManyWithoutRaceInput
    dividends?: DividendUncheckedCreateNestedManyWithoutRaceInput
  }

  export type RaceUpdateInput = {
    id?: StringFieldUpdateOperationsInput | string
    raceNumber?: IntFieldUpdateOperationsInput | number
    name?: StringFieldUpdateOperationsInput | string
    startTime?: DateTimeFieldUpdateOperationsInput | Date | string
    toteStartTime?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    distance?: IntFieldUpdateOperationsInput | number
    trackCondition?: NullableStringFieldUpdateOperationsInput | string | null
    weather?: NullableStringFieldUpdateOperationsInput | string | null
    status?: StringFieldUpdateOperationsInput | string
    country?: StringFieldUpdateOperationsInput | string
    state?: NullableStringFieldUpdateOperationsInput | string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    meeting?: MeetingUpdateOneRequiredWithoutRacesNestedInput
    runners?: RunnerUpdateManyWithoutRaceNestedInput
    scrapes?: ScrapeUpdateManyWithoutRaceNestedInput
    results?: ResultUpdateManyWithoutRaceNestedInput
    dividends?: DividendUpdateManyWithoutRaceNestedInput
  }

  export type RaceUncheckedUpdateInput = {
    id?: StringFieldUpdateOperationsInput | string
    meetingId?: StringFieldUpdateOperationsInput | string
    raceNumber?: IntFieldUpdateOperationsInput | number
    name?: StringFieldUpdateOperationsInput | string
    startTime?: DateTimeFieldUpdateOperationsInput | Date | string
    toteStartTime?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    distance?: IntFieldUpdateOperationsInput | number
    trackCondition?: NullableStringFieldUpdateOperationsInput | string | null
    weather?: NullableStringFieldUpdateOperationsInput | string | null
    status?: StringFieldUpdateOperationsInput | string
    country?: StringFieldUpdateOperationsInput | string
    state?: NullableStringFieldUpdateOperationsInput | string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    runners?: RunnerUncheckedUpdateManyWithoutRaceNestedInput
    scrapes?: ScrapeUncheckedUpdateManyWithoutRaceNestedInput
    results?: ResultUncheckedUpdateManyWithoutRaceNestedInput
    dividends?: DividendUncheckedUpdateManyWithoutRaceNestedInput
  }

  export type RaceCreateManyInput = {
    id?: string
    meetingId: string
    raceNumber: number
    name: string
    startTime: Date | string
    toteStartTime?: Date | string | null
    distance: number
    trackCondition?: string | null
    weather?: string | null
    status: string
    country: string
    state?: string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type RaceUpdateManyMutationInput = {
    id?: StringFieldUpdateOperationsInput | string
    raceNumber?: IntFieldUpdateOperationsInput | number
    name?: StringFieldUpdateOperationsInput | string
    startTime?: DateTimeFieldUpdateOperationsInput | Date | string
    toteStartTime?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    distance?: IntFieldUpdateOperationsInput | number
    trackCondition?: NullableStringFieldUpdateOperationsInput | string | null
    weather?: NullableStringFieldUpdateOperationsInput | string | null
    status?: StringFieldUpdateOperationsInput | string
    country?: StringFieldUpdateOperationsInput | string
    state?: NullableStringFieldUpdateOperationsInput | string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type RaceUncheckedUpdateManyInput = {
    id?: StringFieldUpdateOperationsInput | string
    meetingId?: StringFieldUpdateOperationsInput | string
    raceNumber?: IntFieldUpdateOperationsInput | number
    name?: StringFieldUpdateOperationsInput | string
    startTime?: DateTimeFieldUpdateOperationsInput | Date | string
    toteStartTime?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    distance?: IntFieldUpdateOperationsInput | number
    trackCondition?: NullableStringFieldUpdateOperationsInput | string | null
    weather?: NullableStringFieldUpdateOperationsInput | string | null
    status?: StringFieldUpdateOperationsInput | string
    country?: StringFieldUpdateOperationsInput | string
    state?: NullableStringFieldUpdateOperationsInput | string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type HorseCreateInput = {
    id?: string
    tabEntrantId?: string | null
    tabHorseId?: number | null
    harnessNzHorseId?: bigint | number | null
    name: string
    normalizedName: string
    sire?: string | null
    dam?: string | null
    damSire?: string | null
    sex?: string | null
    colour?: string | null
    country?: string | null
    firstSeen?: Date | string
    lastSeen?: Date | string
    raceCount?: number
    runners?: RunnerCreateNestedManyWithoutHorseInput
  }

  export type HorseUncheckedCreateInput = {
    id?: string
    tabEntrantId?: string | null
    tabHorseId?: number | null
    harnessNzHorseId?: bigint | number | null
    name: string
    normalizedName: string
    sire?: string | null
    dam?: string | null
    damSire?: string | null
    sex?: string | null
    colour?: string | null
    country?: string | null
    firstSeen?: Date | string
    lastSeen?: Date | string
    raceCount?: number
    runners?: RunnerUncheckedCreateNestedManyWithoutHorseInput
  }

  export type HorseUpdateInput = {
    id?: StringFieldUpdateOperationsInput | string
    tabEntrantId?: NullableStringFieldUpdateOperationsInput | string | null
    tabHorseId?: NullableIntFieldUpdateOperationsInput | number | null
    harnessNzHorseId?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    name?: StringFieldUpdateOperationsInput | string
    normalizedName?: StringFieldUpdateOperationsInput | string
    sire?: NullableStringFieldUpdateOperationsInput | string | null
    dam?: NullableStringFieldUpdateOperationsInput | string | null
    damSire?: NullableStringFieldUpdateOperationsInput | string | null
    sex?: NullableStringFieldUpdateOperationsInput | string | null
    colour?: NullableStringFieldUpdateOperationsInput | string | null
    country?: NullableStringFieldUpdateOperationsInput | string | null
    firstSeen?: DateTimeFieldUpdateOperationsInput | Date | string
    lastSeen?: DateTimeFieldUpdateOperationsInput | Date | string
    raceCount?: IntFieldUpdateOperationsInput | number
    runners?: RunnerUpdateManyWithoutHorseNestedInput
  }

  export type HorseUncheckedUpdateInput = {
    id?: StringFieldUpdateOperationsInput | string
    tabEntrantId?: NullableStringFieldUpdateOperationsInput | string | null
    tabHorseId?: NullableIntFieldUpdateOperationsInput | number | null
    harnessNzHorseId?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    name?: StringFieldUpdateOperationsInput | string
    normalizedName?: StringFieldUpdateOperationsInput | string
    sire?: NullableStringFieldUpdateOperationsInput | string | null
    dam?: NullableStringFieldUpdateOperationsInput | string | null
    damSire?: NullableStringFieldUpdateOperationsInput | string | null
    sex?: NullableStringFieldUpdateOperationsInput | string | null
    colour?: NullableStringFieldUpdateOperationsInput | string | null
    country?: NullableStringFieldUpdateOperationsInput | string | null
    firstSeen?: DateTimeFieldUpdateOperationsInput | Date | string
    lastSeen?: DateTimeFieldUpdateOperationsInput | Date | string
    raceCount?: IntFieldUpdateOperationsInput | number
    runners?: RunnerUncheckedUpdateManyWithoutHorseNestedInput
  }

  export type HorseCreateManyInput = {
    id?: string
    tabEntrantId?: string | null
    tabHorseId?: number | null
    harnessNzHorseId?: bigint | number | null
    name: string
    normalizedName: string
    sire?: string | null
    dam?: string | null
    damSire?: string | null
    sex?: string | null
    colour?: string | null
    country?: string | null
    firstSeen?: Date | string
    lastSeen?: Date | string
    raceCount?: number
  }

  export type HorseUpdateManyMutationInput = {
    id?: StringFieldUpdateOperationsInput | string
    tabEntrantId?: NullableStringFieldUpdateOperationsInput | string | null
    tabHorseId?: NullableIntFieldUpdateOperationsInput | number | null
    harnessNzHorseId?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    name?: StringFieldUpdateOperationsInput | string
    normalizedName?: StringFieldUpdateOperationsInput | string
    sire?: NullableStringFieldUpdateOperationsInput | string | null
    dam?: NullableStringFieldUpdateOperationsInput | string | null
    damSire?: NullableStringFieldUpdateOperationsInput | string | null
    sex?: NullableStringFieldUpdateOperationsInput | string | null
    colour?: NullableStringFieldUpdateOperationsInput | string | null
    country?: NullableStringFieldUpdateOperationsInput | string | null
    firstSeen?: DateTimeFieldUpdateOperationsInput | Date | string
    lastSeen?: DateTimeFieldUpdateOperationsInput | Date | string
    raceCount?: IntFieldUpdateOperationsInput | number
  }

  export type HorseUncheckedUpdateManyInput = {
    id?: StringFieldUpdateOperationsInput | string
    tabEntrantId?: NullableStringFieldUpdateOperationsInput | string | null
    tabHorseId?: NullableIntFieldUpdateOperationsInput | number | null
    harnessNzHorseId?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    name?: StringFieldUpdateOperationsInput | string
    normalizedName?: StringFieldUpdateOperationsInput | string
    sire?: NullableStringFieldUpdateOperationsInput | string | null
    dam?: NullableStringFieldUpdateOperationsInput | string | null
    damSire?: NullableStringFieldUpdateOperationsInput | string | null
    sex?: NullableStringFieldUpdateOperationsInput | string | null
    colour?: NullableStringFieldUpdateOperationsInput | string | null
    country?: NullableStringFieldUpdateOperationsInput | string | null
    firstSeen?: DateTimeFieldUpdateOperationsInput | Date | string
    lastSeen?: DateTimeFieldUpdateOperationsInput | Date | string
    raceCount?: IntFieldUpdateOperationsInput | number
  }

  export type RunnerCreateInput = {
    id?: string
    runnerNumber: number
    entrantId?: string | null
    horseName: string
    tabHorseIdLegacy?: string | null
    barrier?: number | null
    weight?: Decimal | DecimalJsLike | number | string | null
    jockeyName?: string | null
    jockeyId?: string | null
    jockeyWeightAllowance?: Decimal | DecimalJsLike | number | string | null
    trainerName?: string | null
    trainerId?: string | null
    trainerLocation?: string | null
    form?: string | null
    lastStarts?: NullableJsonNullValueInput | InputJsonValue
    lastTwentyStarts?: string | null
    age?: number | null
    silkColours?: string | null
    scratched?: boolean
    scratchedAt?: Date | string | null
    openingOdds?: Decimal | DecimalJsLike | number | string | null
    currentOdds?: Decimal | DecimalJsLike | number | string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: Date | string
    updatedAt?: Date | string
    race: RaceCreateNestedOneWithoutRunnersInput
    horse?: HorseCreateNestedOneWithoutRunnersInput
    results?: ResultCreateNestedManyWithoutRunnerInput
    oddsSnapshots?: OddsSnapshotCreateNestedManyWithoutRunnerInput
  }

  export type RunnerUncheckedCreateInput = {
    id?: string
    raceId: string
    runnerNumber: number
    entrantId?: string | null
    horseName: string
    tabHorseIdLegacy?: string | null
    horseId?: string | null
    barrier?: number | null
    weight?: Decimal | DecimalJsLike | number | string | null
    jockeyName?: string | null
    jockeyId?: string | null
    jockeyWeightAllowance?: Decimal | DecimalJsLike | number | string | null
    trainerName?: string | null
    trainerId?: string | null
    trainerLocation?: string | null
    form?: string | null
    lastStarts?: NullableJsonNullValueInput | InputJsonValue
    lastTwentyStarts?: string | null
    age?: number | null
    silkColours?: string | null
    scratched?: boolean
    scratchedAt?: Date | string | null
    openingOdds?: Decimal | DecimalJsLike | number | string | null
    currentOdds?: Decimal | DecimalJsLike | number | string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: Date | string
    updatedAt?: Date | string
    results?: ResultUncheckedCreateNestedManyWithoutRunnerInput
    oddsSnapshots?: OddsSnapshotUncheckedCreateNestedManyWithoutRunnerInput
  }

  export type RunnerUpdateInput = {
    id?: StringFieldUpdateOperationsInput | string
    runnerNumber?: IntFieldUpdateOperationsInput | number
    entrantId?: NullableStringFieldUpdateOperationsInput | string | null
    horseName?: StringFieldUpdateOperationsInput | string
    tabHorseIdLegacy?: NullableStringFieldUpdateOperationsInput | string | null
    barrier?: NullableIntFieldUpdateOperationsInput | number | null
    weight?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    jockeyName?: NullableStringFieldUpdateOperationsInput | string | null
    jockeyId?: NullableStringFieldUpdateOperationsInput | string | null
    jockeyWeightAllowance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    trainerName?: NullableStringFieldUpdateOperationsInput | string | null
    trainerId?: NullableStringFieldUpdateOperationsInput | string | null
    trainerLocation?: NullableStringFieldUpdateOperationsInput | string | null
    form?: NullableStringFieldUpdateOperationsInput | string | null
    lastStarts?: NullableJsonNullValueInput | InputJsonValue
    lastTwentyStarts?: NullableStringFieldUpdateOperationsInput | string | null
    age?: NullableIntFieldUpdateOperationsInput | number | null
    silkColours?: NullableStringFieldUpdateOperationsInput | string | null
    scratched?: BoolFieldUpdateOperationsInput | boolean
    scratchedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    openingOdds?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    currentOdds?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    race?: RaceUpdateOneRequiredWithoutRunnersNestedInput
    horse?: HorseUpdateOneWithoutRunnersNestedInput
    results?: ResultUpdateManyWithoutRunnerNestedInput
    oddsSnapshots?: OddsSnapshotUpdateManyWithoutRunnerNestedInput
  }

  export type RunnerUncheckedUpdateInput = {
    id?: StringFieldUpdateOperationsInput | string
    raceId?: StringFieldUpdateOperationsInput | string
    runnerNumber?: IntFieldUpdateOperationsInput | number
    entrantId?: NullableStringFieldUpdateOperationsInput | string | null
    horseName?: StringFieldUpdateOperationsInput | string
    tabHorseIdLegacy?: NullableStringFieldUpdateOperationsInput | string | null
    horseId?: NullableStringFieldUpdateOperationsInput | string | null
    barrier?: NullableIntFieldUpdateOperationsInput | number | null
    weight?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    jockeyName?: NullableStringFieldUpdateOperationsInput | string | null
    jockeyId?: NullableStringFieldUpdateOperationsInput | string | null
    jockeyWeightAllowance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    trainerName?: NullableStringFieldUpdateOperationsInput | string | null
    trainerId?: NullableStringFieldUpdateOperationsInput | string | null
    trainerLocation?: NullableStringFieldUpdateOperationsInput | string | null
    form?: NullableStringFieldUpdateOperationsInput | string | null
    lastStarts?: NullableJsonNullValueInput | InputJsonValue
    lastTwentyStarts?: NullableStringFieldUpdateOperationsInput | string | null
    age?: NullableIntFieldUpdateOperationsInput | number | null
    silkColours?: NullableStringFieldUpdateOperationsInput | string | null
    scratched?: BoolFieldUpdateOperationsInput | boolean
    scratchedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    openingOdds?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    currentOdds?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    results?: ResultUncheckedUpdateManyWithoutRunnerNestedInput
    oddsSnapshots?: OddsSnapshotUncheckedUpdateManyWithoutRunnerNestedInput
  }

  export type RunnerCreateManyInput = {
    id?: string
    raceId: string
    runnerNumber: number
    entrantId?: string | null
    horseName: string
    tabHorseIdLegacy?: string | null
    horseId?: string | null
    barrier?: number | null
    weight?: Decimal | DecimalJsLike | number | string | null
    jockeyName?: string | null
    jockeyId?: string | null
    jockeyWeightAllowance?: Decimal | DecimalJsLike | number | string | null
    trainerName?: string | null
    trainerId?: string | null
    trainerLocation?: string | null
    form?: string | null
    lastStarts?: NullableJsonNullValueInput | InputJsonValue
    lastTwentyStarts?: string | null
    age?: number | null
    silkColours?: string | null
    scratched?: boolean
    scratchedAt?: Date | string | null
    openingOdds?: Decimal | DecimalJsLike | number | string | null
    currentOdds?: Decimal | DecimalJsLike | number | string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type RunnerUpdateManyMutationInput = {
    id?: StringFieldUpdateOperationsInput | string
    runnerNumber?: IntFieldUpdateOperationsInput | number
    entrantId?: NullableStringFieldUpdateOperationsInput | string | null
    horseName?: StringFieldUpdateOperationsInput | string
    tabHorseIdLegacy?: NullableStringFieldUpdateOperationsInput | string | null
    barrier?: NullableIntFieldUpdateOperationsInput | number | null
    weight?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    jockeyName?: NullableStringFieldUpdateOperationsInput | string | null
    jockeyId?: NullableStringFieldUpdateOperationsInput | string | null
    jockeyWeightAllowance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    trainerName?: NullableStringFieldUpdateOperationsInput | string | null
    trainerId?: NullableStringFieldUpdateOperationsInput | string | null
    trainerLocation?: NullableStringFieldUpdateOperationsInput | string | null
    form?: NullableStringFieldUpdateOperationsInput | string | null
    lastStarts?: NullableJsonNullValueInput | InputJsonValue
    lastTwentyStarts?: NullableStringFieldUpdateOperationsInput | string | null
    age?: NullableIntFieldUpdateOperationsInput | number | null
    silkColours?: NullableStringFieldUpdateOperationsInput | string | null
    scratched?: BoolFieldUpdateOperationsInput | boolean
    scratchedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    openingOdds?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    currentOdds?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type RunnerUncheckedUpdateManyInput = {
    id?: StringFieldUpdateOperationsInput | string
    raceId?: StringFieldUpdateOperationsInput | string
    runnerNumber?: IntFieldUpdateOperationsInput | number
    entrantId?: NullableStringFieldUpdateOperationsInput | string | null
    horseName?: StringFieldUpdateOperationsInput | string
    tabHorseIdLegacy?: NullableStringFieldUpdateOperationsInput | string | null
    horseId?: NullableStringFieldUpdateOperationsInput | string | null
    barrier?: NullableIntFieldUpdateOperationsInput | number | null
    weight?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    jockeyName?: NullableStringFieldUpdateOperationsInput | string | null
    jockeyId?: NullableStringFieldUpdateOperationsInput | string | null
    jockeyWeightAllowance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    trainerName?: NullableStringFieldUpdateOperationsInput | string | null
    trainerId?: NullableStringFieldUpdateOperationsInput | string | null
    trainerLocation?: NullableStringFieldUpdateOperationsInput | string | null
    form?: NullableStringFieldUpdateOperationsInput | string | null
    lastStarts?: NullableJsonNullValueInput | InputJsonValue
    lastTwentyStarts?: NullableStringFieldUpdateOperationsInput | string | null
    age?: NullableIntFieldUpdateOperationsInput | number | null
    silkColours?: NullableStringFieldUpdateOperationsInput | string | null
    scratched?: BoolFieldUpdateOperationsInput | boolean
    scratchedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    openingOdds?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    currentOdds?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type ResultCreateInput = {
    id?: string
    finishPosition?: number | null
    margin?: Decimal | DecimalJsLike | number | string | null
    raceTime?: Decimal | DecimalJsLike | number | string | null
    winDividend?: Decimal | DecimalJsLike | number | string | null
    placeDividend?: Decimal | DecimalJsLike | number | string | null
    official?: boolean
    disqualified?: boolean
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: Date | string
    race: RaceCreateNestedOneWithoutResultsInput
    runner: RunnerCreateNestedOneWithoutResultsInput
  }

  export type ResultUncheckedCreateInput = {
    id?: string
    raceId: string
    runnerId: string
    finishPosition?: number | null
    margin?: Decimal | DecimalJsLike | number | string | null
    raceTime?: Decimal | DecimalJsLike | number | string | null
    winDividend?: Decimal | DecimalJsLike | number | string | null
    placeDividend?: Decimal | DecimalJsLike | number | string | null
    official?: boolean
    disqualified?: boolean
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: Date | string
  }

  export type ResultUpdateInput = {
    id?: StringFieldUpdateOperationsInput | string
    finishPosition?: NullableIntFieldUpdateOperationsInput | number | null
    margin?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    raceTime?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    winDividend?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    placeDividend?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    official?: BoolFieldUpdateOperationsInput | boolean
    disqualified?: BoolFieldUpdateOperationsInput | boolean
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    race?: RaceUpdateOneRequiredWithoutResultsNestedInput
    runner?: RunnerUpdateOneRequiredWithoutResultsNestedInput
  }

  export type ResultUncheckedUpdateInput = {
    id?: StringFieldUpdateOperationsInput | string
    raceId?: StringFieldUpdateOperationsInput | string
    runnerId?: StringFieldUpdateOperationsInput | string
    finishPosition?: NullableIntFieldUpdateOperationsInput | number | null
    margin?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    raceTime?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    winDividend?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    placeDividend?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    official?: BoolFieldUpdateOperationsInput | boolean
    disqualified?: BoolFieldUpdateOperationsInput | boolean
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type ResultCreateManyInput = {
    id?: string
    raceId: string
    runnerId: string
    finishPosition?: number | null
    margin?: Decimal | DecimalJsLike | number | string | null
    raceTime?: Decimal | DecimalJsLike | number | string | null
    winDividend?: Decimal | DecimalJsLike | number | string | null
    placeDividend?: Decimal | DecimalJsLike | number | string | null
    official?: boolean
    disqualified?: boolean
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: Date | string
  }

  export type ResultUpdateManyMutationInput = {
    id?: StringFieldUpdateOperationsInput | string
    finishPosition?: NullableIntFieldUpdateOperationsInput | number | null
    margin?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    raceTime?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    winDividend?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    placeDividend?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    official?: BoolFieldUpdateOperationsInput | boolean
    disqualified?: BoolFieldUpdateOperationsInput | boolean
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type ResultUncheckedUpdateManyInput = {
    id?: StringFieldUpdateOperationsInput | string
    raceId?: StringFieldUpdateOperationsInput | string
    runnerId?: StringFieldUpdateOperationsInput | string
    finishPosition?: NullableIntFieldUpdateOperationsInput | number | null
    margin?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    raceTime?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    winDividend?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    placeDividend?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    official?: BoolFieldUpdateOperationsInput | boolean
    disqualified?: BoolFieldUpdateOperationsInput | boolean
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type ScrapeCreateInput = {
    id?: string
    scrapeType: string
    scrapedAt?: Date | string
    changesDetected?: NullableJsonNullValueInput | InputJsonValue
    success?: boolean
    errorMessage?: string | null
    race: RaceCreateNestedOneWithoutScrapesInput
    jobRun?: JobRunCreateNestedOneWithoutScrapesInput
  }

  export type ScrapeUncheckedCreateInput = {
    id?: string
    raceId: string
    scrapeType: string
    scrapedAt?: Date | string
    changesDetected?: NullableJsonNullValueInput | InputJsonValue
    success?: boolean
    errorMessage?: string | null
    jobRunId?: string | null
  }

  export type ScrapeUpdateInput = {
    id?: StringFieldUpdateOperationsInput | string
    scrapeType?: StringFieldUpdateOperationsInput | string
    scrapedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    changesDetected?: NullableJsonNullValueInput | InputJsonValue
    success?: BoolFieldUpdateOperationsInput | boolean
    errorMessage?: NullableStringFieldUpdateOperationsInput | string | null
    race?: RaceUpdateOneRequiredWithoutScrapesNestedInput
    jobRun?: JobRunUpdateOneWithoutScrapesNestedInput
  }

  export type ScrapeUncheckedUpdateInput = {
    id?: StringFieldUpdateOperationsInput | string
    raceId?: StringFieldUpdateOperationsInput | string
    scrapeType?: StringFieldUpdateOperationsInput | string
    scrapedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    changesDetected?: NullableJsonNullValueInput | InputJsonValue
    success?: BoolFieldUpdateOperationsInput | boolean
    errorMessage?: NullableStringFieldUpdateOperationsInput | string | null
    jobRunId?: NullableStringFieldUpdateOperationsInput | string | null
  }

  export type ScrapeCreateManyInput = {
    id?: string
    raceId: string
    scrapeType: string
    scrapedAt?: Date | string
    changesDetected?: NullableJsonNullValueInput | InputJsonValue
    success?: boolean
    errorMessage?: string | null
    jobRunId?: string | null
  }

  export type ScrapeUpdateManyMutationInput = {
    id?: StringFieldUpdateOperationsInput | string
    scrapeType?: StringFieldUpdateOperationsInput | string
    scrapedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    changesDetected?: NullableJsonNullValueInput | InputJsonValue
    success?: BoolFieldUpdateOperationsInput | boolean
    errorMessage?: NullableStringFieldUpdateOperationsInput | string | null
  }

  export type ScrapeUncheckedUpdateManyInput = {
    id?: StringFieldUpdateOperationsInput | string
    raceId?: StringFieldUpdateOperationsInput | string
    scrapeType?: StringFieldUpdateOperationsInput | string
    scrapedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    changesDetected?: NullableJsonNullValueInput | InputJsonValue
    success?: BoolFieldUpdateOperationsInput | boolean
    errorMessage?: NullableStringFieldUpdateOperationsInput | string | null
    jobRunId?: NullableStringFieldUpdateOperationsInput | string | null
  }

  export type JobRunCreateInput = {
    id?: string
    jobType: string
    status: string
    startedAt?: Date | string
    completedAt?: Date | string | null
    durationMs?: number | null
    itemsProcessed?: number
    itemsFailed?: number
    errorMessage?: string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    retryCount?: number
    scrapes?: ScrapeCreateNestedManyWithoutJobRunInput
    parentJobRun?: JobRunCreateNestedOneWithoutRetryJobRunsInput
    retryJobRuns?: JobRunCreateNestedManyWithoutParentJobRunInput
  }

  export type JobRunUncheckedCreateInput = {
    id?: string
    jobType: string
    status: string
    startedAt?: Date | string
    completedAt?: Date | string | null
    durationMs?: number | null
    itemsProcessed?: number
    itemsFailed?: number
    errorMessage?: string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    retryCount?: number
    parentJobRunId?: string | null
    scrapes?: ScrapeUncheckedCreateNestedManyWithoutJobRunInput
    retryJobRuns?: JobRunUncheckedCreateNestedManyWithoutParentJobRunInput
  }

  export type JobRunUpdateInput = {
    id?: StringFieldUpdateOperationsInput | string
    jobType?: StringFieldUpdateOperationsInput | string
    status?: StringFieldUpdateOperationsInput | string
    startedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    completedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    durationMs?: NullableIntFieldUpdateOperationsInput | number | null
    itemsProcessed?: IntFieldUpdateOperationsInput | number
    itemsFailed?: IntFieldUpdateOperationsInput | number
    errorMessage?: NullableStringFieldUpdateOperationsInput | string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    retryCount?: IntFieldUpdateOperationsInput | number
    scrapes?: ScrapeUpdateManyWithoutJobRunNestedInput
    parentJobRun?: JobRunUpdateOneWithoutRetryJobRunsNestedInput
    retryJobRuns?: JobRunUpdateManyWithoutParentJobRunNestedInput
  }

  export type JobRunUncheckedUpdateInput = {
    id?: StringFieldUpdateOperationsInput | string
    jobType?: StringFieldUpdateOperationsInput | string
    status?: StringFieldUpdateOperationsInput | string
    startedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    completedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    durationMs?: NullableIntFieldUpdateOperationsInput | number | null
    itemsProcessed?: IntFieldUpdateOperationsInput | number
    itemsFailed?: IntFieldUpdateOperationsInput | number
    errorMessage?: NullableStringFieldUpdateOperationsInput | string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    retryCount?: IntFieldUpdateOperationsInput | number
    parentJobRunId?: NullableStringFieldUpdateOperationsInput | string | null
    scrapes?: ScrapeUncheckedUpdateManyWithoutJobRunNestedInput
    retryJobRuns?: JobRunUncheckedUpdateManyWithoutParentJobRunNestedInput
  }

  export type JobRunCreateManyInput = {
    id?: string
    jobType: string
    status: string
    startedAt?: Date | string
    completedAt?: Date | string | null
    durationMs?: number | null
    itemsProcessed?: number
    itemsFailed?: number
    errorMessage?: string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    retryCount?: number
    parentJobRunId?: string | null
  }

  export type JobRunUpdateManyMutationInput = {
    id?: StringFieldUpdateOperationsInput | string
    jobType?: StringFieldUpdateOperationsInput | string
    status?: StringFieldUpdateOperationsInput | string
    startedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    completedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    durationMs?: NullableIntFieldUpdateOperationsInput | number | null
    itemsProcessed?: IntFieldUpdateOperationsInput | number
    itemsFailed?: IntFieldUpdateOperationsInput | number
    errorMessage?: NullableStringFieldUpdateOperationsInput | string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    retryCount?: IntFieldUpdateOperationsInput | number
  }

  export type JobRunUncheckedUpdateManyInput = {
    id?: StringFieldUpdateOperationsInput | string
    jobType?: StringFieldUpdateOperationsInput | string
    status?: StringFieldUpdateOperationsInput | string
    startedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    completedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    durationMs?: NullableIntFieldUpdateOperationsInput | number | null
    itemsProcessed?: IntFieldUpdateOperationsInput | number
    itemsFailed?: IntFieldUpdateOperationsInput | number
    errorMessage?: NullableStringFieldUpdateOperationsInput | string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    retryCount?: IntFieldUpdateOperationsInput | number
    parentJobRunId?: NullableStringFieldUpdateOperationsInput | string | null
  }

  export type DividendCreateInput = {
    id?: string
    tote: string
    productName: string
    status: string
    dividend: Decimal | DecimalJsLike | number | string
    poolSize?: Decimal | DecimalJsLike | number | string | null
    jackpotSize?: Decimal | DecimalJsLike | number | string | null
    positions: JsonNullValueInput | InputJsonValue
    description?: string | null
    createdAt?: Date | string
    race: RaceCreateNestedOneWithoutDividendsInput
  }

  export type DividendUncheckedCreateInput = {
    id?: string
    raceId: string
    tote: string
    productName: string
    status: string
    dividend: Decimal | DecimalJsLike | number | string
    poolSize?: Decimal | DecimalJsLike | number | string | null
    jackpotSize?: Decimal | DecimalJsLike | number | string | null
    positions: JsonNullValueInput | InputJsonValue
    description?: string | null
    createdAt?: Date | string
  }

  export type DividendUpdateInput = {
    id?: StringFieldUpdateOperationsInput | string
    tote?: StringFieldUpdateOperationsInput | string
    productName?: StringFieldUpdateOperationsInput | string
    status?: StringFieldUpdateOperationsInput | string
    dividend?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    poolSize?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    jackpotSize?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    positions?: JsonNullValueInput | InputJsonValue
    description?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    race?: RaceUpdateOneRequiredWithoutDividendsNestedInput
  }

  export type DividendUncheckedUpdateInput = {
    id?: StringFieldUpdateOperationsInput | string
    raceId?: StringFieldUpdateOperationsInput | string
    tote?: StringFieldUpdateOperationsInput | string
    productName?: StringFieldUpdateOperationsInput | string
    status?: StringFieldUpdateOperationsInput | string
    dividend?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    poolSize?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    jackpotSize?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    positions?: JsonNullValueInput | InputJsonValue
    description?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type DividendCreateManyInput = {
    id?: string
    raceId: string
    tote: string
    productName: string
    status: string
    dividend: Decimal | DecimalJsLike | number | string
    poolSize?: Decimal | DecimalJsLike | number | string | null
    jackpotSize?: Decimal | DecimalJsLike | number | string | null
    positions: JsonNullValueInput | InputJsonValue
    description?: string | null
    createdAt?: Date | string
  }

  export type DividendUpdateManyMutationInput = {
    id?: StringFieldUpdateOperationsInput | string
    tote?: StringFieldUpdateOperationsInput | string
    productName?: StringFieldUpdateOperationsInput | string
    status?: StringFieldUpdateOperationsInput | string
    dividend?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    poolSize?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    jackpotSize?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    positions?: JsonNullValueInput | InputJsonValue
    description?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type DividendUncheckedUpdateManyInput = {
    id?: StringFieldUpdateOperationsInput | string
    raceId?: StringFieldUpdateOperationsInput | string
    tote?: StringFieldUpdateOperationsInput | string
    productName?: StringFieldUpdateOperationsInput | string
    status?: StringFieldUpdateOperationsInput | string
    dividend?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    poolSize?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    jackpotSize?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    positions?: JsonNullValueInput | InputJsonValue
    description?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type OddsSnapshotCreateInput = {
    id?: string
    snapshotType: string
    fixedWin?: Decimal | DecimalJsLike | number | string | null
    fixedPlace?: Decimal | DecimalJsLike | number | string | null
    poolWin?: Decimal | DecimalJsLike | number | string | null
    poolPlace?: Decimal | DecimalJsLike | number | string | null
    capturedAt?: Date | string
    runner: RunnerCreateNestedOneWithoutOddsSnapshotsInput
  }

  export type OddsSnapshotUncheckedCreateInput = {
    id?: string
    runnerId: string
    snapshotType: string
    fixedWin?: Decimal | DecimalJsLike | number | string | null
    fixedPlace?: Decimal | DecimalJsLike | number | string | null
    poolWin?: Decimal | DecimalJsLike | number | string | null
    poolPlace?: Decimal | DecimalJsLike | number | string | null
    capturedAt?: Date | string
  }

  export type OddsSnapshotUpdateInput = {
    id?: StringFieldUpdateOperationsInput | string
    snapshotType?: StringFieldUpdateOperationsInput | string
    fixedWin?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    fixedPlace?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    poolWin?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    poolPlace?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    capturedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    runner?: RunnerUpdateOneRequiredWithoutOddsSnapshotsNestedInput
  }

  export type OddsSnapshotUncheckedUpdateInput = {
    id?: StringFieldUpdateOperationsInput | string
    runnerId?: StringFieldUpdateOperationsInput | string
    snapshotType?: StringFieldUpdateOperationsInput | string
    fixedWin?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    fixedPlace?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    poolWin?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    poolPlace?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    capturedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type OddsSnapshotCreateManyInput = {
    id?: string
    runnerId: string
    snapshotType: string
    fixedWin?: Decimal | DecimalJsLike | number | string | null
    fixedPlace?: Decimal | DecimalJsLike | number | string | null
    poolWin?: Decimal | DecimalJsLike | number | string | null
    poolPlace?: Decimal | DecimalJsLike | number | string | null
    capturedAt?: Date | string
  }

  export type OddsSnapshotUpdateManyMutationInput = {
    id?: StringFieldUpdateOperationsInput | string
    snapshotType?: StringFieldUpdateOperationsInput | string
    fixedWin?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    fixedPlace?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    poolWin?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    poolPlace?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    capturedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type OddsSnapshotUncheckedUpdateManyInput = {
    id?: StringFieldUpdateOperationsInput | string
    runnerId?: StringFieldUpdateOperationsInput | string
    snapshotType?: StringFieldUpdateOperationsInput | string
    fixedWin?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    fixedPlace?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    poolWin?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    poolPlace?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    capturedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type UuidFilter<$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>
    mode?: QueryMode
    not?: NestedUuidFilter<$PrismaModel> | string
  }

  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 StringNullableFilter<$PrismaModel = never> = {
    equals?: string | StringFieldRefInput<$PrismaModel> | null
    in?: string[] | ListStringFieldRefInput<$PrismaModel> | null
    notIn?: string[] | ListStringFieldRefInput<$PrismaModel> | null
    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?: NestedStringNullableFilter<$PrismaModel> | string | null
  }
  export type JsonNullableFilter<$PrismaModel = never> = 
    | PatchUndefined<
        Either<Required<JsonNullableFilterBase<$PrismaModel>>, Exclude<keyof Required<JsonNullableFilterBase<$PrismaModel>>, 'path'>>,
        Required<JsonNullableFilterBase<$PrismaModel>>
      >
    | OptionalFlat<Omit<Required<JsonNullableFilterBase<$PrismaModel>>, 'path'>>

  export type JsonNullableFilterBase<$PrismaModel = never> = {
    equals?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter
    path?: string[]
    string_contains?: string | StringFieldRefInput<$PrismaModel>
    string_starts_with?: string | StringFieldRefInput<$PrismaModel>
    string_ends_with?: string | StringFieldRefInput<$PrismaModel>
    array_contains?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
    array_starts_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
    array_ends_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
    lt?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
    lte?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
    gt?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
    gte?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
    not?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter
  }

  export type IntNullableListFilter<$PrismaModel = never> = {
    equals?: number[] | ListIntFieldRefInput<$PrismaModel> | null
    has?: number | IntFieldRefInput<$PrismaModel> | null
    hasEvery?: number[] | ListIntFieldRefInput<$PrismaModel>
    hasSome?: number[] | ListIntFieldRefInput<$PrismaModel>
    isEmpty?: boolean
  }

  export type IntNullableFilter<$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 RaceListRelationFilter = {
    every?: RaceWhereInput
    some?: RaceWhereInput
    none?: RaceWhereInput
  }

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

  export type RaceOrderByRelationAggregateInput = {
    _count?: SortOrder
  }

  export type MeetingCountOrderByAggregateInput = {
    id?: SortOrder
    name?: SortOrder
    date?: SortOrder
    country?: SortOrder
    state?: SortOrder
    category?: SortOrder
    categoryName?: SortOrder
    trackCondition?: SortOrder
    weather?: SortOrder
    videoChannels?: SortOrder
    quaddie?: SortOrder
    earlyQuaddie?: SortOrder
    toteMeetingNumber?: SortOrder
    toteStatus?: SortOrder
    metadata?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
  }

  export type MeetingAvgOrderByAggregateInput = {
    quaddie?: SortOrder
    earlyQuaddie?: SortOrder
    toteMeetingNumber?: SortOrder
  }

  export type MeetingMaxOrderByAggregateInput = {
    id?: SortOrder
    name?: SortOrder
    date?: SortOrder
    country?: SortOrder
    state?: SortOrder
    category?: SortOrder
    categoryName?: SortOrder
    trackCondition?: SortOrder
    weather?: SortOrder
    toteMeetingNumber?: SortOrder
    toteStatus?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
  }

  export type MeetingMinOrderByAggregateInput = {
    id?: SortOrder
    name?: SortOrder
    date?: SortOrder
    country?: SortOrder
    state?: SortOrder
    category?: SortOrder
    categoryName?: SortOrder
    trackCondition?: SortOrder
    weather?: SortOrder
    toteMeetingNumber?: SortOrder
    toteStatus?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
  }

  export type MeetingSumOrderByAggregateInput = {
    quaddie?: SortOrder
    earlyQuaddie?: SortOrder
    toteMeetingNumber?: SortOrder
  }

  export type UuidWithAggregatesFilter<$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>
    mode?: QueryMode
    not?: NestedUuidWithAggregatesFilter<$PrismaModel> | string
    _count?: NestedIntFilter<$PrismaModel>
    _min?: NestedStringFilter<$PrismaModel>
    _max?: NestedStringFilter<$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 StringNullableWithAggregatesFilter<$PrismaModel = never> = {
    equals?: string | StringFieldRefInput<$PrismaModel> | null
    in?: string[] | ListStringFieldRefInput<$PrismaModel> | null
    notIn?: string[] | ListStringFieldRefInput<$PrismaModel> | null
    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?: NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null
    _count?: NestedIntNullableFilter<$PrismaModel>
    _min?: NestedStringNullableFilter<$PrismaModel>
    _max?: NestedStringNullableFilter<$PrismaModel>
  }
  export type JsonNullableWithAggregatesFilter<$PrismaModel = never> = 
    | PatchUndefined<
        Either<Required<JsonNullableWithAggregatesFilterBase<$PrismaModel>>, Exclude<keyof Required<JsonNullableWithAggregatesFilterBase<$PrismaModel>>, 'path'>>,
        Required<JsonNullableWithAggregatesFilterBase<$PrismaModel>>
      >
    | OptionalFlat<Omit<Required<JsonNullableWithAggregatesFilterBase<$PrismaModel>>, 'path'>>

  export type JsonNullableWithAggregatesFilterBase<$PrismaModel = never> = {
    equals?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter
    path?: string[]
    string_contains?: string | StringFieldRefInput<$PrismaModel>
    string_starts_with?: string | StringFieldRefInput<$PrismaModel>
    string_ends_with?: string | StringFieldRefInput<$PrismaModel>
    array_contains?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
    array_starts_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
    array_ends_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
    lt?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
    lte?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
    gt?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
    gte?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
    not?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter
    _count?: NestedIntNullableFilter<$PrismaModel>
    _min?: NestedJsonNullableFilter<$PrismaModel>
    _max?: NestedJsonNullableFilter<$PrismaModel>
  }

  export type IntNullableWithAggregatesFilter<$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?: NestedIntNullableWithAggregatesFilter<$PrismaModel> | number | null
    _count?: NestedIntNullableFilter<$PrismaModel>
    _avg?: NestedFloatNullableFilter<$PrismaModel>
    _sum?: NestedIntNullableFilter<$PrismaModel>
    _min?: NestedIntNullableFilter<$PrismaModel>
    _max?: NestedIntNullableFilter<$PrismaModel>
  }

  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 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 MeetingRelationFilter = {
    is?: MeetingWhereInput
    isNot?: MeetingWhereInput
  }

  export type RunnerListRelationFilter = {
    every?: RunnerWhereInput
    some?: RunnerWhereInput
    none?: RunnerWhereInput
  }

  export type ScrapeListRelationFilter = {
    every?: ScrapeWhereInput
    some?: ScrapeWhereInput
    none?: ScrapeWhereInput
  }

  export type ResultListRelationFilter = {
    every?: ResultWhereInput
    some?: ResultWhereInput
    none?: ResultWhereInput
  }

  export type DividendListRelationFilter = {
    every?: DividendWhereInput
    some?: DividendWhereInput
    none?: DividendWhereInput
  }

  export type RunnerOrderByRelationAggregateInput = {
    _count?: SortOrder
  }

  export type ScrapeOrderByRelationAggregateInput = {
    _count?: SortOrder
  }

  export type ResultOrderByRelationAggregateInput = {
    _count?: SortOrder
  }

  export type DividendOrderByRelationAggregateInput = {
    _count?: SortOrder
  }

  export type RaceMeetingIdRaceNumberCompoundUniqueInput = {
    meetingId: string
    raceNumber: number
  }

  export type RaceCountOrderByAggregateInput = {
    id?: SortOrder
    meetingId?: SortOrder
    raceNumber?: SortOrder
    name?: SortOrder
    startTime?: SortOrder
    toteStartTime?: SortOrder
    distance?: SortOrder
    trackCondition?: SortOrder
    weather?: SortOrder
    status?: SortOrder
    country?: SortOrder
    state?: SortOrder
    metadata?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
  }

  export type RaceAvgOrderByAggregateInput = {
    raceNumber?: SortOrder
    distance?: SortOrder
  }

  export type RaceMaxOrderByAggregateInput = {
    id?: SortOrder
    meetingId?: SortOrder
    raceNumber?: SortOrder
    name?: SortOrder
    startTime?: SortOrder
    toteStartTime?: SortOrder
    distance?: SortOrder
    trackCondition?: SortOrder
    weather?: SortOrder
    status?: SortOrder
    country?: SortOrder
    state?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
  }

  export type RaceMinOrderByAggregateInput = {
    id?: SortOrder
    meetingId?: SortOrder
    raceNumber?: SortOrder
    name?: SortOrder
    startTime?: SortOrder
    toteStartTime?: SortOrder
    distance?: SortOrder
    trackCondition?: SortOrder
    weather?: SortOrder
    status?: SortOrder
    country?: SortOrder
    state?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
  }

  export type RaceSumOrderByAggregateInput = {
    raceNumber?: SortOrder
    distance?: 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 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 UuidNullableFilter<$PrismaModel = never> = {
    equals?: string | StringFieldRefInput<$PrismaModel> | null
    in?: string[] | ListStringFieldRefInput<$PrismaModel> | null
    notIn?: string[] | ListStringFieldRefInput<$PrismaModel> | null
    lt?: string | StringFieldRefInput<$PrismaModel>
    lte?: string | StringFieldRefInput<$PrismaModel>
    gt?: string | StringFieldRefInput<$PrismaModel>
    gte?: string | StringFieldRefInput<$PrismaModel>
    mode?: QueryMode
    not?: NestedUuidNullableFilter<$PrismaModel> | string | null
  }

  export type BigIntNullableFilter<$PrismaModel = never> = {
    equals?: bigint | number | BigIntFieldRefInput<$PrismaModel> | null
    in?: bigint[] | number[] | ListBigIntFieldRefInput<$PrismaModel> | null
    notIn?: bigint[] | number[] | ListBigIntFieldRefInput<$PrismaModel> | null
    lt?: bigint | number | BigIntFieldRefInput<$PrismaModel>
    lte?: bigint | number | BigIntFieldRefInput<$PrismaModel>
    gt?: bigint | number | BigIntFieldRefInput<$PrismaModel>
    gte?: bigint | number | BigIntFieldRefInput<$PrismaModel>
    not?: NestedBigIntNullableFilter<$PrismaModel> | bigint | number | null
  }

  export type HorseCountOrderByAggregateInput = {
    id?: SortOrder
    tabEntrantId?: SortOrder
    tabHorseId?: SortOrder
    harnessNzHorseId?: SortOrder
    name?: SortOrder
    normalizedName?: SortOrder
    sire?: SortOrder
    dam?: SortOrder
    damSire?: SortOrder
    sex?: SortOrder
    colour?: SortOrder
    country?: SortOrder
    firstSeen?: SortOrder
    lastSeen?: SortOrder
    raceCount?: SortOrder
  }

  export type HorseAvgOrderByAggregateInput = {
    tabHorseId?: SortOrder
    harnessNzHorseId?: SortOrder
    raceCount?: SortOrder
  }

  export type HorseMaxOrderByAggregateInput = {
    id?: SortOrder
    tabEntrantId?: SortOrder
    tabHorseId?: SortOrder
    harnessNzHorseId?: SortOrder
    name?: SortOrder
    normalizedName?: SortOrder
    sire?: SortOrder
    dam?: SortOrder
    damSire?: SortOrder
    sex?: SortOrder
    colour?: SortOrder
    country?: SortOrder
    firstSeen?: SortOrder
    lastSeen?: SortOrder
    raceCount?: SortOrder
  }

  export type HorseMinOrderByAggregateInput = {
    id?: SortOrder
    tabEntrantId?: SortOrder
    tabHorseId?: SortOrder
    harnessNzHorseId?: SortOrder
    name?: SortOrder
    normalizedName?: SortOrder
    sire?: SortOrder
    dam?: SortOrder
    damSire?: SortOrder
    sex?: SortOrder
    colour?: SortOrder
    country?: SortOrder
    firstSeen?: SortOrder
    lastSeen?: SortOrder
    raceCount?: SortOrder
  }

  export type HorseSumOrderByAggregateInput = {
    tabHorseId?: SortOrder
    harnessNzHorseId?: SortOrder
    raceCount?: SortOrder
  }

  export type UuidNullableWithAggregatesFilter<$PrismaModel = never> = {
    equals?: string | StringFieldRefInput<$PrismaModel> | null
    in?: string[] | ListStringFieldRefInput<$PrismaModel> | null
    notIn?: string[] | ListStringFieldRefInput<$PrismaModel> | null
    lt?: string | StringFieldRefInput<$PrismaModel>
    lte?: string | StringFieldRefInput<$PrismaModel>
    gt?: string | StringFieldRefInput<$PrismaModel>
    gte?: string | StringFieldRefInput<$PrismaModel>
    mode?: QueryMode
    not?: NestedUuidNullableWithAggregatesFilter<$PrismaModel> | string | null
    _count?: NestedIntNullableFilter<$PrismaModel>
    _min?: NestedStringNullableFilter<$PrismaModel>
    _max?: NestedStringNullableFilter<$PrismaModel>
  }

  export type BigIntNullableWithAggregatesFilter<$PrismaModel = never> = {
    equals?: bigint | number | BigIntFieldRefInput<$PrismaModel> | null
    in?: bigint[] | number[] | ListBigIntFieldRefInput<$PrismaModel> | null
    notIn?: bigint[] | number[] | ListBigIntFieldRefInput<$PrismaModel> | null
    lt?: bigint | number | BigIntFieldRefInput<$PrismaModel>
    lte?: bigint | number | BigIntFieldRefInput<$PrismaModel>
    gt?: bigint | number | BigIntFieldRefInput<$PrismaModel>
    gte?: bigint | number | BigIntFieldRefInput<$PrismaModel>
    not?: NestedBigIntNullableWithAggregatesFilter<$PrismaModel> | bigint | number | null
    _count?: NestedIntNullableFilter<$PrismaModel>
    _avg?: NestedFloatNullableFilter<$PrismaModel>
    _sum?: NestedBigIntNullableFilter<$PrismaModel>
    _min?: NestedBigIntNullableFilter<$PrismaModel>
    _max?: NestedBigIntNullableFilter<$PrismaModel>
  }

  export type DecimalNullableFilter<$PrismaModel = never> = {
    equals?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> | null
    in?: Decimal[] | DecimalJsLike[] | number[] | string[] | ListDecimalFieldRefInput<$PrismaModel> | null
    notIn?: Decimal[] | DecimalJsLike[] | number[] | string[] | ListDecimalFieldRefInput<$PrismaModel> | null
    lt?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    lte?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    gt?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    gte?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    not?: NestedDecimalNullableFilter<$PrismaModel> | Decimal | DecimalJsLike | number | string | null
  }

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

  export type RaceRelationFilter = {
    is?: RaceWhereInput
    isNot?: RaceWhereInput
  }

  export type HorseNullableRelationFilter = {
    is?: HorseWhereInput | null
    isNot?: HorseWhereInput | null
  }

  export type OddsSnapshotListRelationFilter = {
    every?: OddsSnapshotWhereInput
    some?: OddsSnapshotWhereInput
    none?: OddsSnapshotWhereInput
  }

  export type OddsSnapshotOrderByRelationAggregateInput = {
    _count?: SortOrder
  }

  export type RunnerRaceIdRunnerNumberCompoundUniqueInput = {
    raceId: string
    runnerNumber: number
  }

  export type RunnerCountOrderByAggregateInput = {
    id?: SortOrder
    raceId?: SortOrder
    runnerNumber?: SortOrder
    entrantId?: SortOrder
    horseName?: SortOrder
    tabHorseIdLegacy?: SortOrder
    horseId?: SortOrder
    barrier?: SortOrder
    weight?: SortOrder
    jockeyName?: SortOrder
    jockeyId?: SortOrder
    jockeyWeightAllowance?: SortOrder
    trainerName?: SortOrder
    trainerId?: SortOrder
    trainerLocation?: SortOrder
    form?: SortOrder
    lastStarts?: SortOrder
    lastTwentyStarts?: SortOrder
    age?: SortOrder
    silkColours?: SortOrder
    scratched?: SortOrder
    scratchedAt?: SortOrder
    openingOdds?: SortOrder
    currentOdds?: SortOrder
    metadata?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
  }

  export type RunnerAvgOrderByAggregateInput = {
    runnerNumber?: SortOrder
    barrier?: SortOrder
    weight?: SortOrder
    jockeyWeightAllowance?: SortOrder
    age?: SortOrder
    openingOdds?: SortOrder
    currentOdds?: SortOrder
  }

  export type RunnerMaxOrderByAggregateInput = {
    id?: SortOrder
    raceId?: SortOrder
    runnerNumber?: SortOrder
    entrantId?: SortOrder
    horseName?: SortOrder
    tabHorseIdLegacy?: SortOrder
    horseId?: SortOrder
    barrier?: SortOrder
    weight?: SortOrder
    jockeyName?: SortOrder
    jockeyId?: SortOrder
    jockeyWeightAllowance?: SortOrder
    trainerName?: SortOrder
    trainerId?: SortOrder
    trainerLocation?: SortOrder
    form?: SortOrder
    lastTwentyStarts?: SortOrder
    age?: SortOrder
    silkColours?: SortOrder
    scratched?: SortOrder
    scratchedAt?: SortOrder
    openingOdds?: SortOrder
    currentOdds?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
  }

  export type RunnerMinOrderByAggregateInput = {
    id?: SortOrder
    raceId?: SortOrder
    runnerNumber?: SortOrder
    entrantId?: SortOrder
    horseName?: SortOrder
    tabHorseIdLegacy?: SortOrder
    horseId?: SortOrder
    barrier?: SortOrder
    weight?: SortOrder
    jockeyName?: SortOrder
    jockeyId?: SortOrder
    jockeyWeightAllowance?: SortOrder
    trainerName?: SortOrder
    trainerId?: SortOrder
    trainerLocation?: SortOrder
    form?: SortOrder
    lastTwentyStarts?: SortOrder
    age?: SortOrder
    silkColours?: SortOrder
    scratched?: SortOrder
    scratchedAt?: SortOrder
    openingOdds?: SortOrder
    currentOdds?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
  }

  export type RunnerSumOrderByAggregateInput = {
    runnerNumber?: SortOrder
    barrier?: SortOrder
    weight?: SortOrder
    jockeyWeightAllowance?: SortOrder
    age?: SortOrder
    openingOdds?: SortOrder
    currentOdds?: SortOrder
  }

  export type DecimalNullableWithAggregatesFilter<$PrismaModel = never> = {
    equals?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> | null
    in?: Decimal[] | DecimalJsLike[] | number[] | string[] | ListDecimalFieldRefInput<$PrismaModel> | null
    notIn?: Decimal[] | DecimalJsLike[] | number[] | string[] | ListDecimalFieldRefInput<$PrismaModel> | null
    lt?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    lte?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    gt?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    gte?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    not?: NestedDecimalNullableWithAggregatesFilter<$PrismaModel> | Decimal | DecimalJsLike | number | string | null
    _count?: NestedIntNullableFilter<$PrismaModel>
    _avg?: NestedDecimalNullableFilter<$PrismaModel>
    _sum?: NestedDecimalNullableFilter<$PrismaModel>
    _min?: NestedDecimalNullableFilter<$PrismaModel>
    _max?: NestedDecimalNullableFilter<$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 RunnerRelationFilter = {
    is?: RunnerWhereInput
    isNot?: RunnerWhereInput
  }

  export type ResultRaceIdRunnerIdCompoundUniqueInput = {
    raceId: string
    runnerId: string
  }

  export type ResultCountOrderByAggregateInput = {
    id?: SortOrder
    raceId?: SortOrder
    runnerId?: SortOrder
    finishPosition?: SortOrder
    margin?: SortOrder
    raceTime?: SortOrder
    winDividend?: SortOrder
    placeDividend?: SortOrder
    official?: SortOrder
    disqualified?: SortOrder
    metadata?: SortOrder
    createdAt?: SortOrder
  }

  export type ResultAvgOrderByAggregateInput = {
    finishPosition?: SortOrder
    margin?: SortOrder
    raceTime?: SortOrder
    winDividend?: SortOrder
    placeDividend?: SortOrder
  }

  export type ResultMaxOrderByAggregateInput = {
    id?: SortOrder
    raceId?: SortOrder
    runnerId?: SortOrder
    finishPosition?: SortOrder
    margin?: SortOrder
    raceTime?: SortOrder
    winDividend?: SortOrder
    placeDividend?: SortOrder
    official?: SortOrder
    disqualified?: SortOrder
    createdAt?: SortOrder
  }

  export type ResultMinOrderByAggregateInput = {
    id?: SortOrder
    raceId?: SortOrder
    runnerId?: SortOrder
    finishPosition?: SortOrder
    margin?: SortOrder
    raceTime?: SortOrder
    winDividend?: SortOrder
    placeDividend?: SortOrder
    official?: SortOrder
    disqualified?: SortOrder
    createdAt?: SortOrder
  }

  export type ResultSumOrderByAggregateInput = {
    finishPosition?: SortOrder
    margin?: SortOrder
    raceTime?: SortOrder
    winDividend?: SortOrder
    placeDividend?: SortOrder
  }

  export type JobRunNullableRelationFilter = {
    is?: JobRunWhereInput | null
    isNot?: JobRunWhereInput | null
  }

  export type ScrapeCountOrderByAggregateInput = {
    id?: SortOrder
    raceId?: SortOrder
    scrapeType?: SortOrder
    scrapedAt?: SortOrder
    changesDetected?: SortOrder
    success?: SortOrder
    errorMessage?: SortOrder
    jobRunId?: SortOrder
  }

  export type ScrapeMaxOrderByAggregateInput = {
    id?: SortOrder
    raceId?: SortOrder
    scrapeType?: SortOrder
    scrapedAt?: SortOrder
    success?: SortOrder
    errorMessage?: SortOrder
    jobRunId?: SortOrder
  }

  export type ScrapeMinOrderByAggregateInput = {
    id?: SortOrder
    raceId?: SortOrder
    scrapeType?: SortOrder
    scrapedAt?: SortOrder
    success?: SortOrder
    errorMessage?: SortOrder
    jobRunId?: SortOrder
  }

  export type JobRunListRelationFilter = {
    every?: JobRunWhereInput
    some?: JobRunWhereInput
    none?: JobRunWhereInput
  }

  export type JobRunOrderByRelationAggregateInput = {
    _count?: SortOrder
  }

  export type JobRunCountOrderByAggregateInput = {
    id?: SortOrder
    jobType?: SortOrder
    status?: SortOrder
    startedAt?: SortOrder
    completedAt?: SortOrder
    durationMs?: SortOrder
    itemsProcessed?: SortOrder
    itemsFailed?: SortOrder
    errorMessage?: SortOrder
    metadata?: SortOrder
    retryCount?: SortOrder
    parentJobRunId?: SortOrder
  }

  export type JobRunAvgOrderByAggregateInput = {
    durationMs?: SortOrder
    itemsProcessed?: SortOrder
    itemsFailed?: SortOrder
    retryCount?: SortOrder
  }

  export type JobRunMaxOrderByAggregateInput = {
    id?: SortOrder
    jobType?: SortOrder
    status?: SortOrder
    startedAt?: SortOrder
    completedAt?: SortOrder
    durationMs?: SortOrder
    itemsProcessed?: SortOrder
    itemsFailed?: SortOrder
    errorMessage?: SortOrder
    retryCount?: SortOrder
    parentJobRunId?: SortOrder
  }

  export type JobRunMinOrderByAggregateInput = {
    id?: SortOrder
    jobType?: SortOrder
    status?: SortOrder
    startedAt?: SortOrder
    completedAt?: SortOrder
    durationMs?: SortOrder
    itemsProcessed?: SortOrder
    itemsFailed?: SortOrder
    errorMessage?: SortOrder
    retryCount?: SortOrder
    parentJobRunId?: SortOrder
  }

  export type JobRunSumOrderByAggregateInput = {
    durationMs?: SortOrder
    itemsProcessed?: SortOrder
    itemsFailed?: SortOrder
    retryCount?: SortOrder
  }

  export type DecimalFilter<$PrismaModel = never> = {
    equals?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    in?: Decimal[] | DecimalJsLike[] | number[] | string[] | ListDecimalFieldRefInput<$PrismaModel>
    notIn?: Decimal[] | DecimalJsLike[] | number[] | string[] | ListDecimalFieldRefInput<$PrismaModel>
    lt?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    lte?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    gt?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    gte?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    not?: NestedDecimalFilter<$PrismaModel> | Decimal | DecimalJsLike | number | string
  }
  export type JsonFilter<$PrismaModel = never> = 
    | PatchUndefined<
        Either<Required<JsonFilterBase<$PrismaModel>>, Exclude<keyof Required<JsonFilterBase<$PrismaModel>>, 'path'>>,
        Required<JsonFilterBase<$PrismaModel>>
      >
    | OptionalFlat<Omit<Required<JsonFilterBase<$PrismaModel>>, 'path'>>

  export type JsonFilterBase<$PrismaModel = never> = {
    equals?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter
    path?: string[]
    string_contains?: string | StringFieldRefInput<$PrismaModel>
    string_starts_with?: string | StringFieldRefInput<$PrismaModel>
    string_ends_with?: string | StringFieldRefInput<$PrismaModel>
    array_contains?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
    array_starts_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
    array_ends_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
    lt?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
    lte?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
    gt?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
    gte?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
    not?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter
  }

  export type DividendRaceIdToteProductNameCompoundUniqueInput = {
    raceId: string
    tote: string
    productName: string
  }

  export type DividendCountOrderByAggregateInput = {
    id?: SortOrder
    raceId?: SortOrder
    tote?: SortOrder
    productName?: SortOrder
    status?: SortOrder
    dividend?: SortOrder
    poolSize?: SortOrder
    jackpotSize?: SortOrder
    positions?: SortOrder
    description?: SortOrder
    createdAt?: SortOrder
  }

  export type DividendAvgOrderByAggregateInput = {
    dividend?: SortOrder
    poolSize?: SortOrder
    jackpotSize?: SortOrder
  }

  export type DividendMaxOrderByAggregateInput = {
    id?: SortOrder
    raceId?: SortOrder
    tote?: SortOrder
    productName?: SortOrder
    status?: SortOrder
    dividend?: SortOrder
    poolSize?: SortOrder
    jackpotSize?: SortOrder
    description?: SortOrder
    createdAt?: SortOrder
  }

  export type DividendMinOrderByAggregateInput = {
    id?: SortOrder
    raceId?: SortOrder
    tote?: SortOrder
    productName?: SortOrder
    status?: SortOrder
    dividend?: SortOrder
    poolSize?: SortOrder
    jackpotSize?: SortOrder
    description?: SortOrder
    createdAt?: SortOrder
  }

  export type DividendSumOrderByAggregateInput = {
    dividend?: SortOrder
    poolSize?: SortOrder
    jackpotSize?: SortOrder
  }

  export type DecimalWithAggregatesFilter<$PrismaModel = never> = {
    equals?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    in?: Decimal[] | DecimalJsLike[] | number[] | string[] | ListDecimalFieldRefInput<$PrismaModel>
    notIn?: Decimal[] | DecimalJsLike[] | number[] | string[] | ListDecimalFieldRefInput<$PrismaModel>
    lt?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    lte?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    gt?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    gte?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    not?: NestedDecimalWithAggregatesFilter<$PrismaModel> | Decimal | DecimalJsLike | number | string
    _count?: NestedIntFilter<$PrismaModel>
    _avg?: NestedDecimalFilter<$PrismaModel>
    _sum?: NestedDecimalFilter<$PrismaModel>
    _min?: NestedDecimalFilter<$PrismaModel>
    _max?: NestedDecimalFilter<$PrismaModel>
  }
  export type JsonWithAggregatesFilter<$PrismaModel = never> = 
    | PatchUndefined<
        Either<Required<JsonWithAggregatesFilterBase<$PrismaModel>>, Exclude<keyof Required<JsonWithAggregatesFilterBase<$PrismaModel>>, 'path'>>,
        Required<JsonWithAggregatesFilterBase<$PrismaModel>>
      >
    | OptionalFlat<Omit<Required<JsonWithAggregatesFilterBase<$PrismaModel>>, 'path'>>

  export type JsonWithAggregatesFilterBase<$PrismaModel = never> = {
    equals?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter
    path?: string[]
    string_contains?: string | StringFieldRefInput<$PrismaModel>
    string_starts_with?: string | StringFieldRefInput<$PrismaModel>
    string_ends_with?: string | StringFieldRefInput<$PrismaModel>
    array_contains?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
    array_starts_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
    array_ends_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
    lt?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
    lte?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
    gt?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
    gte?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
    not?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter
    _count?: NestedIntFilter<$PrismaModel>
    _min?: NestedJsonFilter<$PrismaModel>
    _max?: NestedJsonFilter<$PrismaModel>
  }

  export type OddsSnapshotRunnerIdSnapshotTypeCompoundUniqueInput = {
    runnerId: string
    snapshotType: string
  }

  export type OddsSnapshotCountOrderByAggregateInput = {
    id?: SortOrder
    runnerId?: SortOrder
    snapshotType?: SortOrder
    fixedWin?: SortOrder
    fixedPlace?: SortOrder
    poolWin?: SortOrder
    poolPlace?: SortOrder
    capturedAt?: SortOrder
  }

  export type OddsSnapshotAvgOrderByAggregateInput = {
    fixedWin?: SortOrder
    fixedPlace?: SortOrder
    poolWin?: SortOrder
    poolPlace?: SortOrder
  }

  export type OddsSnapshotMaxOrderByAggregateInput = {
    id?: SortOrder
    runnerId?: SortOrder
    snapshotType?: SortOrder
    fixedWin?: SortOrder
    fixedPlace?: SortOrder
    poolWin?: SortOrder
    poolPlace?: SortOrder
    capturedAt?: SortOrder
  }

  export type OddsSnapshotMinOrderByAggregateInput = {
    id?: SortOrder
    runnerId?: SortOrder
    snapshotType?: SortOrder
    fixedWin?: SortOrder
    fixedPlace?: SortOrder
    poolWin?: SortOrder
    poolPlace?: SortOrder
    capturedAt?: SortOrder
  }

  export type OddsSnapshotSumOrderByAggregateInput = {
    fixedWin?: SortOrder
    fixedPlace?: SortOrder
    poolWin?: SortOrder
    poolPlace?: SortOrder
  }

  export type MeetingCreatequaddieInput = {
    set: number[]
  }

  export type MeetingCreateearlyQuaddieInput = {
    set: number[]
  }

  export type RaceCreateNestedManyWithoutMeetingInput = {
    create?: XOR<RaceCreateWithoutMeetingInput, RaceUncheckedCreateWithoutMeetingInput> | RaceCreateWithoutMeetingInput[] | RaceUncheckedCreateWithoutMeetingInput[]
    connectOrCreate?: RaceCreateOrConnectWithoutMeetingInput | RaceCreateOrConnectWithoutMeetingInput[]
    createMany?: RaceCreateManyMeetingInputEnvelope
    connect?: RaceWhereUniqueInput | RaceWhereUniqueInput[]
  }

  export type RaceUncheckedCreateNestedManyWithoutMeetingInput = {
    create?: XOR<RaceCreateWithoutMeetingInput, RaceUncheckedCreateWithoutMeetingInput> | RaceCreateWithoutMeetingInput[] | RaceUncheckedCreateWithoutMeetingInput[]
    connectOrCreate?: RaceCreateOrConnectWithoutMeetingInput | RaceCreateOrConnectWithoutMeetingInput[]
    createMany?: RaceCreateManyMeetingInputEnvelope
    connect?: RaceWhereUniqueInput | RaceWhereUniqueInput[]
  }

  export type StringFieldUpdateOperationsInput = {
    set?: string
  }

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

  export type NullableStringFieldUpdateOperationsInput = {
    set?: string | null
  }

  export type MeetingUpdatequaddieInput = {
    set?: number[]
    push?: number | number[]
  }

  export type MeetingUpdateearlyQuaddieInput = {
    set?: number[]
    push?: number | number[]
  }

  export type NullableIntFieldUpdateOperationsInput = {
    set?: number | null
    increment?: number
    decrement?: number
    multiply?: number
    divide?: number
  }

  export type RaceUpdateManyWithoutMeetingNestedInput = {
    create?: XOR<RaceCreateWithoutMeetingInput, RaceUncheckedCreateWithoutMeetingInput> | RaceCreateWithoutMeetingInput[] | RaceUncheckedCreateWithoutMeetingInput[]
    connectOrCreate?: RaceCreateOrConnectWithoutMeetingInput | RaceCreateOrConnectWithoutMeetingInput[]
    upsert?: RaceUpsertWithWhereUniqueWithoutMeetingInput | RaceUpsertWithWhereUniqueWithoutMeetingInput[]
    createMany?: RaceCreateManyMeetingInputEnvelope
    set?: RaceWhereUniqueInput | RaceWhereUniqueInput[]
    disconnect?: RaceWhereUniqueInput | RaceWhereUniqueInput[]
    delete?: RaceWhereUniqueInput | RaceWhereUniqueInput[]
    connect?: RaceWhereUniqueInput | RaceWhereUniqueInput[]
    update?: RaceUpdateWithWhereUniqueWithoutMeetingInput | RaceUpdateWithWhereUniqueWithoutMeetingInput[]
    updateMany?: RaceUpdateManyWithWhereWithoutMeetingInput | RaceUpdateManyWithWhereWithoutMeetingInput[]
    deleteMany?: RaceScalarWhereInput | RaceScalarWhereInput[]
  }

  export type RaceUncheckedUpdateManyWithoutMeetingNestedInput = {
    create?: XOR<RaceCreateWithoutMeetingInput, RaceUncheckedCreateWithoutMeetingInput> | RaceCreateWithoutMeetingInput[] | RaceUncheckedCreateWithoutMeetingInput[]
    connectOrCreate?: RaceCreateOrConnectWithoutMeetingInput | RaceCreateOrConnectWithoutMeetingInput[]
    upsert?: RaceUpsertWithWhereUniqueWithoutMeetingInput | RaceUpsertWithWhereUniqueWithoutMeetingInput[]
    createMany?: RaceCreateManyMeetingInputEnvelope
    set?: RaceWhereUniqueInput | RaceWhereUniqueInput[]
    disconnect?: RaceWhereUniqueInput | RaceWhereUniqueInput[]
    delete?: RaceWhereUniqueInput | RaceWhereUniqueInput[]
    connect?: RaceWhereUniqueInput | RaceWhereUniqueInput[]
    update?: RaceUpdateWithWhereUniqueWithoutMeetingInput | RaceUpdateWithWhereUniqueWithoutMeetingInput[]
    updateMany?: RaceUpdateManyWithWhereWithoutMeetingInput | RaceUpdateManyWithWhereWithoutMeetingInput[]
    deleteMany?: RaceScalarWhereInput | RaceScalarWhereInput[]
  }

  export type MeetingCreateNestedOneWithoutRacesInput = {
    create?: XOR<MeetingCreateWithoutRacesInput, MeetingUncheckedCreateWithoutRacesInput>
    connectOrCreate?: MeetingCreateOrConnectWithoutRacesInput
    connect?: MeetingWhereUniqueInput
  }

  export type RunnerCreateNestedManyWithoutRaceInput = {
    create?: XOR<RunnerCreateWithoutRaceInput, RunnerUncheckedCreateWithoutRaceInput> | RunnerCreateWithoutRaceInput[] | RunnerUncheckedCreateWithoutRaceInput[]
    connectOrCreate?: RunnerCreateOrConnectWithoutRaceInput | RunnerCreateOrConnectWithoutRaceInput[]
    createMany?: RunnerCreateManyRaceInputEnvelope
    connect?: RunnerWhereUniqueInput | RunnerWhereUniqueInput[]
  }

  export type ScrapeCreateNestedManyWithoutRaceInput = {
    create?: XOR<ScrapeCreateWithoutRaceInput, ScrapeUncheckedCreateWithoutRaceInput> | ScrapeCreateWithoutRaceInput[] | ScrapeUncheckedCreateWithoutRaceInput[]
    connectOrCreate?: ScrapeCreateOrConnectWithoutRaceInput | ScrapeCreateOrConnectWithoutRaceInput[]
    createMany?: ScrapeCreateManyRaceInputEnvelope
    connect?: ScrapeWhereUniqueInput | ScrapeWhereUniqueInput[]
  }

  export type ResultCreateNestedManyWithoutRaceInput = {
    create?: XOR<ResultCreateWithoutRaceInput, ResultUncheckedCreateWithoutRaceInput> | ResultCreateWithoutRaceInput[] | ResultUncheckedCreateWithoutRaceInput[]
    connectOrCreate?: ResultCreateOrConnectWithoutRaceInput | ResultCreateOrConnectWithoutRaceInput[]
    createMany?: ResultCreateManyRaceInputEnvelope
    connect?: ResultWhereUniqueInput | ResultWhereUniqueInput[]
  }

  export type DividendCreateNestedManyWithoutRaceInput = {
    create?: XOR<DividendCreateWithoutRaceInput, DividendUncheckedCreateWithoutRaceInput> | DividendCreateWithoutRaceInput[] | DividendUncheckedCreateWithoutRaceInput[]
    connectOrCreate?: DividendCreateOrConnectWithoutRaceInput | DividendCreateOrConnectWithoutRaceInput[]
    createMany?: DividendCreateManyRaceInputEnvelope
    connect?: DividendWhereUniqueInput | DividendWhereUniqueInput[]
  }

  export type RunnerUncheckedCreateNestedManyWithoutRaceInput = {
    create?: XOR<RunnerCreateWithoutRaceInput, RunnerUncheckedCreateWithoutRaceInput> | RunnerCreateWithoutRaceInput[] | RunnerUncheckedCreateWithoutRaceInput[]
    connectOrCreate?: RunnerCreateOrConnectWithoutRaceInput | RunnerCreateOrConnectWithoutRaceInput[]
    createMany?: RunnerCreateManyRaceInputEnvelope
    connect?: RunnerWhereUniqueInput | RunnerWhereUniqueInput[]
  }

  export type ScrapeUncheckedCreateNestedManyWithoutRaceInput = {
    create?: XOR<ScrapeCreateWithoutRaceInput, ScrapeUncheckedCreateWithoutRaceInput> | ScrapeCreateWithoutRaceInput[] | ScrapeUncheckedCreateWithoutRaceInput[]
    connectOrCreate?: ScrapeCreateOrConnectWithoutRaceInput | ScrapeCreateOrConnectWithoutRaceInput[]
    createMany?: ScrapeCreateManyRaceInputEnvelope
    connect?: ScrapeWhereUniqueInput | ScrapeWhereUniqueInput[]
  }

  export type ResultUncheckedCreateNestedManyWithoutRaceInput = {
    create?: XOR<ResultCreateWithoutRaceInput, ResultUncheckedCreateWithoutRaceInput> | ResultCreateWithoutRaceInput[] | ResultUncheckedCreateWithoutRaceInput[]
    connectOrCreate?: ResultCreateOrConnectWithoutRaceInput | ResultCreateOrConnectWithoutRaceInput[]
    createMany?: ResultCreateManyRaceInputEnvelope
    connect?: ResultWhereUniqueInput | ResultWhereUniqueInput[]
  }

  export type DividendUncheckedCreateNestedManyWithoutRaceInput = {
    create?: XOR<DividendCreateWithoutRaceInput, DividendUncheckedCreateWithoutRaceInput> | DividendCreateWithoutRaceInput[] | DividendUncheckedCreateWithoutRaceInput[]
    connectOrCreate?: DividendCreateOrConnectWithoutRaceInput | DividendCreateOrConnectWithoutRaceInput[]
    createMany?: DividendCreateManyRaceInputEnvelope
    connect?: DividendWhereUniqueInput | DividendWhereUniqueInput[]
  }

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

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

  export type MeetingUpdateOneRequiredWithoutRacesNestedInput = {
    create?: XOR<MeetingCreateWithoutRacesInput, MeetingUncheckedCreateWithoutRacesInput>
    connectOrCreate?: MeetingCreateOrConnectWithoutRacesInput
    upsert?: MeetingUpsertWithoutRacesInput
    connect?: MeetingWhereUniqueInput
    update?: XOR<XOR<MeetingUpdateToOneWithWhereWithoutRacesInput, MeetingUpdateWithoutRacesInput>, MeetingUncheckedUpdateWithoutRacesInput>
  }

  export type RunnerUpdateManyWithoutRaceNestedInput = {
    create?: XOR<RunnerCreateWithoutRaceInput, RunnerUncheckedCreateWithoutRaceInput> | RunnerCreateWithoutRaceInput[] | RunnerUncheckedCreateWithoutRaceInput[]
    connectOrCreate?: RunnerCreateOrConnectWithoutRaceInput | RunnerCreateOrConnectWithoutRaceInput[]
    upsert?: RunnerUpsertWithWhereUniqueWithoutRaceInput | RunnerUpsertWithWhereUniqueWithoutRaceInput[]
    createMany?: RunnerCreateManyRaceInputEnvelope
    set?: RunnerWhereUniqueInput | RunnerWhereUniqueInput[]
    disconnect?: RunnerWhereUniqueInput | RunnerWhereUniqueInput[]
    delete?: RunnerWhereUniqueInput | RunnerWhereUniqueInput[]
    connect?: RunnerWhereUniqueInput | RunnerWhereUniqueInput[]
    update?: RunnerUpdateWithWhereUniqueWithoutRaceInput | RunnerUpdateWithWhereUniqueWithoutRaceInput[]
    updateMany?: RunnerUpdateManyWithWhereWithoutRaceInput | RunnerUpdateManyWithWhereWithoutRaceInput[]
    deleteMany?: RunnerScalarWhereInput | RunnerScalarWhereInput[]
  }

  export type ScrapeUpdateManyWithoutRaceNestedInput = {
    create?: XOR<ScrapeCreateWithoutRaceInput, ScrapeUncheckedCreateWithoutRaceInput> | ScrapeCreateWithoutRaceInput[] | ScrapeUncheckedCreateWithoutRaceInput[]
    connectOrCreate?: ScrapeCreateOrConnectWithoutRaceInput | ScrapeCreateOrConnectWithoutRaceInput[]
    upsert?: ScrapeUpsertWithWhereUniqueWithoutRaceInput | ScrapeUpsertWithWhereUniqueWithoutRaceInput[]
    createMany?: ScrapeCreateManyRaceInputEnvelope
    set?: ScrapeWhereUniqueInput | ScrapeWhereUniqueInput[]
    disconnect?: ScrapeWhereUniqueInput | ScrapeWhereUniqueInput[]
    delete?: ScrapeWhereUniqueInput | ScrapeWhereUniqueInput[]
    connect?: ScrapeWhereUniqueInput | ScrapeWhereUniqueInput[]
    update?: ScrapeUpdateWithWhereUniqueWithoutRaceInput | ScrapeUpdateWithWhereUniqueWithoutRaceInput[]
    updateMany?: ScrapeUpdateManyWithWhereWithoutRaceInput | ScrapeUpdateManyWithWhereWithoutRaceInput[]
    deleteMany?: ScrapeScalarWhereInput | ScrapeScalarWhereInput[]
  }

  export type ResultUpdateManyWithoutRaceNestedInput = {
    create?: XOR<ResultCreateWithoutRaceInput, ResultUncheckedCreateWithoutRaceInput> | ResultCreateWithoutRaceInput[] | ResultUncheckedCreateWithoutRaceInput[]
    connectOrCreate?: ResultCreateOrConnectWithoutRaceInput | ResultCreateOrConnectWithoutRaceInput[]
    upsert?: ResultUpsertWithWhereUniqueWithoutRaceInput | ResultUpsertWithWhereUniqueWithoutRaceInput[]
    createMany?: ResultCreateManyRaceInputEnvelope
    set?: ResultWhereUniqueInput | ResultWhereUniqueInput[]
    disconnect?: ResultWhereUniqueInput | ResultWhereUniqueInput[]
    delete?: ResultWhereUniqueInput | ResultWhereUniqueInput[]
    connect?: ResultWhereUniqueInput | ResultWhereUniqueInput[]
    update?: ResultUpdateWithWhereUniqueWithoutRaceInput | ResultUpdateWithWhereUniqueWithoutRaceInput[]
    updateMany?: ResultUpdateManyWithWhereWithoutRaceInput | ResultUpdateManyWithWhereWithoutRaceInput[]
    deleteMany?: ResultScalarWhereInput | ResultScalarWhereInput[]
  }

  export type DividendUpdateManyWithoutRaceNestedInput = {
    create?: XOR<DividendCreateWithoutRaceInput, DividendUncheckedCreateWithoutRaceInput> | DividendCreateWithoutRaceInput[] | DividendUncheckedCreateWithoutRaceInput[]
    connectOrCreate?: DividendCreateOrConnectWithoutRaceInput | DividendCreateOrConnectWithoutRaceInput[]
    upsert?: DividendUpsertWithWhereUniqueWithoutRaceInput | DividendUpsertWithWhereUniqueWithoutRaceInput[]
    createMany?: DividendCreateManyRaceInputEnvelope
    set?: DividendWhereUniqueInput | DividendWhereUniqueInput[]
    disconnect?: DividendWhereUniqueInput | DividendWhereUniqueInput[]
    delete?: DividendWhereUniqueInput | DividendWhereUniqueInput[]
    connect?: DividendWhereUniqueInput | DividendWhereUniqueInput[]
    update?: DividendUpdateWithWhereUniqueWithoutRaceInput | DividendUpdateWithWhereUniqueWithoutRaceInput[]
    updateMany?: DividendUpdateManyWithWhereWithoutRaceInput | DividendUpdateManyWithWhereWithoutRaceInput[]
    deleteMany?: DividendScalarWhereInput | DividendScalarWhereInput[]
  }

  export type RunnerUncheckedUpdateManyWithoutRaceNestedInput = {
    create?: XOR<RunnerCreateWithoutRaceInput, RunnerUncheckedCreateWithoutRaceInput> | RunnerCreateWithoutRaceInput[] | RunnerUncheckedCreateWithoutRaceInput[]
    connectOrCreate?: RunnerCreateOrConnectWithoutRaceInput | RunnerCreateOrConnectWithoutRaceInput[]
    upsert?: RunnerUpsertWithWhereUniqueWithoutRaceInput | RunnerUpsertWithWhereUniqueWithoutRaceInput[]
    createMany?: RunnerCreateManyRaceInputEnvelope
    set?: RunnerWhereUniqueInput | RunnerWhereUniqueInput[]
    disconnect?: RunnerWhereUniqueInput | RunnerWhereUniqueInput[]
    delete?: RunnerWhereUniqueInput | RunnerWhereUniqueInput[]
    connect?: RunnerWhereUniqueInput | RunnerWhereUniqueInput[]
    update?: RunnerUpdateWithWhereUniqueWithoutRaceInput | RunnerUpdateWithWhereUniqueWithoutRaceInput[]
    updateMany?: RunnerUpdateManyWithWhereWithoutRaceInput | RunnerUpdateManyWithWhereWithoutRaceInput[]
    deleteMany?: RunnerScalarWhereInput | RunnerScalarWhereInput[]
  }

  export type ScrapeUncheckedUpdateManyWithoutRaceNestedInput = {
    create?: XOR<ScrapeCreateWithoutRaceInput, ScrapeUncheckedCreateWithoutRaceInput> | ScrapeCreateWithoutRaceInput[] | ScrapeUncheckedCreateWithoutRaceInput[]
    connectOrCreate?: ScrapeCreateOrConnectWithoutRaceInput | ScrapeCreateOrConnectWithoutRaceInput[]
    upsert?: ScrapeUpsertWithWhereUniqueWithoutRaceInput | ScrapeUpsertWithWhereUniqueWithoutRaceInput[]
    createMany?: ScrapeCreateManyRaceInputEnvelope
    set?: ScrapeWhereUniqueInput | ScrapeWhereUniqueInput[]
    disconnect?: ScrapeWhereUniqueInput | ScrapeWhereUniqueInput[]
    delete?: ScrapeWhereUniqueInput | ScrapeWhereUniqueInput[]
    connect?: ScrapeWhereUniqueInput | ScrapeWhereUniqueInput[]
    update?: ScrapeUpdateWithWhereUniqueWithoutRaceInput | ScrapeUpdateWithWhereUniqueWithoutRaceInput[]
    updateMany?: ScrapeUpdateManyWithWhereWithoutRaceInput | ScrapeUpdateManyWithWhereWithoutRaceInput[]
    deleteMany?: ScrapeScalarWhereInput | ScrapeScalarWhereInput[]
  }

  export type ResultUncheckedUpdateManyWithoutRaceNestedInput = {
    create?: XOR<ResultCreateWithoutRaceInput, ResultUncheckedCreateWithoutRaceInput> | ResultCreateWithoutRaceInput[] | ResultUncheckedCreateWithoutRaceInput[]
    connectOrCreate?: ResultCreateOrConnectWithoutRaceInput | ResultCreateOrConnectWithoutRaceInput[]
    upsert?: ResultUpsertWithWhereUniqueWithoutRaceInput | ResultUpsertWithWhereUniqueWithoutRaceInput[]
    createMany?: ResultCreateManyRaceInputEnvelope
    set?: ResultWhereUniqueInput | ResultWhereUniqueInput[]
    disconnect?: ResultWhereUniqueInput | ResultWhereUniqueInput[]
    delete?: ResultWhereUniqueInput | ResultWhereUniqueInput[]
    connect?: ResultWhereUniqueInput | ResultWhereUniqueInput[]
    update?: ResultUpdateWithWhereUniqueWithoutRaceInput | ResultUpdateWithWhereUniqueWithoutRaceInput[]
    updateMany?: ResultUpdateManyWithWhereWithoutRaceInput | ResultUpdateManyWithWhereWithoutRaceInput[]
    deleteMany?: ResultScalarWhereInput | ResultScalarWhereInput[]
  }

  export type DividendUncheckedUpdateManyWithoutRaceNestedInput = {
    create?: XOR<DividendCreateWithoutRaceInput, DividendUncheckedCreateWithoutRaceInput> | DividendCreateWithoutRaceInput[] | DividendUncheckedCreateWithoutRaceInput[]
    connectOrCreate?: DividendCreateOrConnectWithoutRaceInput | DividendCreateOrConnectWithoutRaceInput[]
    upsert?: DividendUpsertWithWhereUniqueWithoutRaceInput | DividendUpsertWithWhereUniqueWithoutRaceInput[]
    createMany?: DividendCreateManyRaceInputEnvelope
    set?: DividendWhereUniqueInput | DividendWhereUniqueInput[]
    disconnect?: DividendWhereUniqueInput | DividendWhereUniqueInput[]
    delete?: DividendWhereUniqueInput | DividendWhereUniqueInput[]
    connect?: DividendWhereUniqueInput | DividendWhereUniqueInput[]
    update?: DividendUpdateWithWhereUniqueWithoutRaceInput | DividendUpdateWithWhereUniqueWithoutRaceInput[]
    updateMany?: DividendUpdateManyWithWhereWithoutRaceInput | DividendUpdateManyWithWhereWithoutRaceInput[]
    deleteMany?: DividendScalarWhereInput | DividendScalarWhereInput[]
  }

  export type RunnerCreateNestedManyWithoutHorseInput = {
    create?: XOR<RunnerCreateWithoutHorseInput, RunnerUncheckedCreateWithoutHorseInput> | RunnerCreateWithoutHorseInput[] | RunnerUncheckedCreateWithoutHorseInput[]
    connectOrCreate?: RunnerCreateOrConnectWithoutHorseInput | RunnerCreateOrConnectWithoutHorseInput[]
    createMany?: RunnerCreateManyHorseInputEnvelope
    connect?: RunnerWhereUniqueInput | RunnerWhereUniqueInput[]
  }

  export type RunnerUncheckedCreateNestedManyWithoutHorseInput = {
    create?: XOR<RunnerCreateWithoutHorseInput, RunnerUncheckedCreateWithoutHorseInput> | RunnerCreateWithoutHorseInput[] | RunnerUncheckedCreateWithoutHorseInput[]
    connectOrCreate?: RunnerCreateOrConnectWithoutHorseInput | RunnerCreateOrConnectWithoutHorseInput[]
    createMany?: RunnerCreateManyHorseInputEnvelope
    connect?: RunnerWhereUniqueInput | RunnerWhereUniqueInput[]
  }

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

  export type RunnerUpdateManyWithoutHorseNestedInput = {
    create?: XOR<RunnerCreateWithoutHorseInput, RunnerUncheckedCreateWithoutHorseInput> | RunnerCreateWithoutHorseInput[] | RunnerUncheckedCreateWithoutHorseInput[]
    connectOrCreate?: RunnerCreateOrConnectWithoutHorseInput | RunnerCreateOrConnectWithoutHorseInput[]
    upsert?: RunnerUpsertWithWhereUniqueWithoutHorseInput | RunnerUpsertWithWhereUniqueWithoutHorseInput[]
    createMany?: RunnerCreateManyHorseInputEnvelope
    set?: RunnerWhereUniqueInput | RunnerWhereUniqueInput[]
    disconnect?: RunnerWhereUniqueInput | RunnerWhereUniqueInput[]
    delete?: RunnerWhereUniqueInput | RunnerWhereUniqueInput[]
    connect?: RunnerWhereUniqueInput | RunnerWhereUniqueInput[]
    update?: RunnerUpdateWithWhereUniqueWithoutHorseInput | RunnerUpdateWithWhereUniqueWithoutHorseInput[]
    updateMany?: RunnerUpdateManyWithWhereWithoutHorseInput | RunnerUpdateManyWithWhereWithoutHorseInput[]
    deleteMany?: RunnerScalarWhereInput | RunnerScalarWhereInput[]
  }

  export type RunnerUncheckedUpdateManyWithoutHorseNestedInput = {
    create?: XOR<RunnerCreateWithoutHorseInput, RunnerUncheckedCreateWithoutHorseInput> | RunnerCreateWithoutHorseInput[] | RunnerUncheckedCreateWithoutHorseInput[]
    connectOrCreate?: RunnerCreateOrConnectWithoutHorseInput | RunnerCreateOrConnectWithoutHorseInput[]
    upsert?: RunnerUpsertWithWhereUniqueWithoutHorseInput | RunnerUpsertWithWhereUniqueWithoutHorseInput[]
    createMany?: RunnerCreateManyHorseInputEnvelope
    set?: RunnerWhereUniqueInput | RunnerWhereUniqueInput[]
    disconnect?: RunnerWhereUniqueInput | RunnerWhereUniqueInput[]
    delete?: RunnerWhereUniqueInput | RunnerWhereUniqueInput[]
    connect?: RunnerWhereUniqueInput | RunnerWhereUniqueInput[]
    update?: RunnerUpdateWithWhereUniqueWithoutHorseInput | RunnerUpdateWithWhereUniqueWithoutHorseInput[]
    updateMany?: RunnerUpdateManyWithWhereWithoutHorseInput | RunnerUpdateManyWithWhereWithoutHorseInput[]
    deleteMany?: RunnerScalarWhereInput | RunnerScalarWhereInput[]
  }

  export type RaceCreateNestedOneWithoutRunnersInput = {
    create?: XOR<RaceCreateWithoutRunnersInput, RaceUncheckedCreateWithoutRunnersInput>
    connectOrCreate?: RaceCreateOrConnectWithoutRunnersInput
    connect?: RaceWhereUniqueInput
  }

  export type HorseCreateNestedOneWithoutRunnersInput = {
    create?: XOR<HorseCreateWithoutRunnersInput, HorseUncheckedCreateWithoutRunnersInput>
    connectOrCreate?: HorseCreateOrConnectWithoutRunnersInput
    connect?: HorseWhereUniqueInput
  }

  export type ResultCreateNestedManyWithoutRunnerInput = {
    create?: XOR<ResultCreateWithoutRunnerInput, ResultUncheckedCreateWithoutRunnerInput> | ResultCreateWithoutRunnerInput[] | ResultUncheckedCreateWithoutRunnerInput[]
    connectOrCreate?: ResultCreateOrConnectWithoutRunnerInput | ResultCreateOrConnectWithoutRunnerInput[]
    createMany?: ResultCreateManyRunnerInputEnvelope
    connect?: ResultWhereUniqueInput | ResultWhereUniqueInput[]
  }

  export type OddsSnapshotCreateNestedManyWithoutRunnerInput = {
    create?: XOR<OddsSnapshotCreateWithoutRunnerInput, OddsSnapshotUncheckedCreateWithoutRunnerInput> | OddsSnapshotCreateWithoutRunnerInput[] | OddsSnapshotUncheckedCreateWithoutRunnerInput[]
    connectOrCreate?: OddsSnapshotCreateOrConnectWithoutRunnerInput | OddsSnapshotCreateOrConnectWithoutRunnerInput[]
    createMany?: OddsSnapshotCreateManyRunnerInputEnvelope
    connect?: OddsSnapshotWhereUniqueInput | OddsSnapshotWhereUniqueInput[]
  }

  export type ResultUncheckedCreateNestedManyWithoutRunnerInput = {
    create?: XOR<ResultCreateWithoutRunnerInput, ResultUncheckedCreateWithoutRunnerInput> | ResultCreateWithoutRunnerInput[] | ResultUncheckedCreateWithoutRunnerInput[]
    connectOrCreate?: ResultCreateOrConnectWithoutRunnerInput | ResultCreateOrConnectWithoutRunnerInput[]
    createMany?: ResultCreateManyRunnerInputEnvelope
    connect?: ResultWhereUniqueInput | ResultWhereUniqueInput[]
  }

  export type OddsSnapshotUncheckedCreateNestedManyWithoutRunnerInput = {
    create?: XOR<OddsSnapshotCreateWithoutRunnerInput, OddsSnapshotUncheckedCreateWithoutRunnerInput> | OddsSnapshotCreateWithoutRunnerInput[] | OddsSnapshotUncheckedCreateWithoutRunnerInput[]
    connectOrCreate?: OddsSnapshotCreateOrConnectWithoutRunnerInput | OddsSnapshotCreateOrConnectWithoutRunnerInput[]
    createMany?: OddsSnapshotCreateManyRunnerInputEnvelope
    connect?: OddsSnapshotWhereUniqueInput | OddsSnapshotWhereUniqueInput[]
  }

  export type NullableDecimalFieldUpdateOperationsInput = {
    set?: Decimal | DecimalJsLike | number | string | null
    increment?: Decimal | DecimalJsLike | number | string
    decrement?: Decimal | DecimalJsLike | number | string
    multiply?: Decimal | DecimalJsLike | number | string
    divide?: Decimal | DecimalJsLike | number | string
  }

  export type BoolFieldUpdateOperationsInput = {
    set?: boolean
  }

  export type RaceUpdateOneRequiredWithoutRunnersNestedInput = {
    create?: XOR<RaceCreateWithoutRunnersInput, RaceUncheckedCreateWithoutRunnersInput>
    connectOrCreate?: RaceCreateOrConnectWithoutRunnersInput
    upsert?: RaceUpsertWithoutRunnersInput
    connect?: RaceWhereUniqueInput
    update?: XOR<XOR<RaceUpdateToOneWithWhereWithoutRunnersInput, RaceUpdateWithoutRunnersInput>, RaceUncheckedUpdateWithoutRunnersInput>
  }

  export type HorseUpdateOneWithoutRunnersNestedInput = {
    create?: XOR<HorseCreateWithoutRunnersInput, HorseUncheckedCreateWithoutRunnersInput>
    connectOrCreate?: HorseCreateOrConnectWithoutRunnersInput
    upsert?: HorseUpsertWithoutRunnersInput
    disconnect?: HorseWhereInput | boolean
    delete?: HorseWhereInput | boolean
    connect?: HorseWhereUniqueInput
    update?: XOR<XOR<HorseUpdateToOneWithWhereWithoutRunnersInput, HorseUpdateWithoutRunnersInput>, HorseUncheckedUpdateWithoutRunnersInput>
  }

  export type ResultUpdateManyWithoutRunnerNestedInput = {
    create?: XOR<ResultCreateWithoutRunnerInput, ResultUncheckedCreateWithoutRunnerInput> | ResultCreateWithoutRunnerInput[] | ResultUncheckedCreateWithoutRunnerInput[]
    connectOrCreate?: ResultCreateOrConnectWithoutRunnerInput | ResultCreateOrConnectWithoutRunnerInput[]
    upsert?: ResultUpsertWithWhereUniqueWithoutRunnerInput | ResultUpsertWithWhereUniqueWithoutRunnerInput[]
    createMany?: ResultCreateManyRunnerInputEnvelope
    set?: ResultWhereUniqueInput | ResultWhereUniqueInput[]
    disconnect?: ResultWhereUniqueInput | ResultWhereUniqueInput[]
    delete?: ResultWhereUniqueInput | ResultWhereUniqueInput[]
    connect?: ResultWhereUniqueInput | ResultWhereUniqueInput[]
    update?: ResultUpdateWithWhereUniqueWithoutRunnerInput | ResultUpdateWithWhereUniqueWithoutRunnerInput[]
    updateMany?: ResultUpdateManyWithWhereWithoutRunnerInput | ResultUpdateManyWithWhereWithoutRunnerInput[]
    deleteMany?: ResultScalarWhereInput | ResultScalarWhereInput[]
  }

  export type OddsSnapshotUpdateManyWithoutRunnerNestedInput = {
    create?: XOR<OddsSnapshotCreateWithoutRunnerInput, OddsSnapshotUncheckedCreateWithoutRunnerInput> | OddsSnapshotCreateWithoutRunnerInput[] | OddsSnapshotUncheckedCreateWithoutRunnerInput[]
    connectOrCreate?: OddsSnapshotCreateOrConnectWithoutRunnerInput | OddsSnapshotCreateOrConnectWithoutRunnerInput[]
    upsert?: OddsSnapshotUpsertWithWhereUniqueWithoutRunnerInput | OddsSnapshotUpsertWithWhereUniqueWithoutRunnerInput[]
    createMany?: OddsSnapshotCreateManyRunnerInputEnvelope
    set?: OddsSnapshotWhereUniqueInput | OddsSnapshotWhereUniqueInput[]
    disconnect?: OddsSnapshotWhereUniqueInput | OddsSnapshotWhereUniqueInput[]
    delete?: OddsSnapshotWhereUniqueInput | OddsSnapshotWhereUniqueInput[]
    connect?: OddsSnapshotWhereUniqueInput | OddsSnapshotWhereUniqueInput[]
    update?: OddsSnapshotUpdateWithWhereUniqueWithoutRunnerInput | OddsSnapshotUpdateWithWhereUniqueWithoutRunnerInput[]
    updateMany?: OddsSnapshotUpdateManyWithWhereWithoutRunnerInput | OddsSnapshotUpdateManyWithWhereWithoutRunnerInput[]
    deleteMany?: OddsSnapshotScalarWhereInput | OddsSnapshotScalarWhereInput[]
  }

  export type ResultUncheckedUpdateManyWithoutRunnerNestedInput = {
    create?: XOR<ResultCreateWithoutRunnerInput, ResultUncheckedCreateWithoutRunnerInput> | ResultCreateWithoutRunnerInput[] | ResultUncheckedCreateWithoutRunnerInput[]
    connectOrCreate?: ResultCreateOrConnectWithoutRunnerInput | ResultCreateOrConnectWithoutRunnerInput[]
    upsert?: ResultUpsertWithWhereUniqueWithoutRunnerInput | ResultUpsertWithWhereUniqueWithoutRunnerInput[]
    createMany?: ResultCreateManyRunnerInputEnvelope
    set?: ResultWhereUniqueInput | ResultWhereUniqueInput[]
    disconnect?: ResultWhereUniqueInput | ResultWhereUniqueInput[]
    delete?: ResultWhereUniqueInput | ResultWhereUniqueInput[]
    connect?: ResultWhereUniqueInput | ResultWhereUniqueInput[]
    update?: ResultUpdateWithWhereUniqueWithoutRunnerInput | ResultUpdateWithWhereUniqueWithoutRunnerInput[]
    updateMany?: ResultUpdateManyWithWhereWithoutRunnerInput | ResultUpdateManyWithWhereWithoutRunnerInput[]
    deleteMany?: ResultScalarWhereInput | ResultScalarWhereInput[]
  }

  export type OddsSnapshotUncheckedUpdateManyWithoutRunnerNestedInput = {
    create?: XOR<OddsSnapshotCreateWithoutRunnerInput, OddsSnapshotUncheckedCreateWithoutRunnerInput> | OddsSnapshotCreateWithoutRunnerInput[] | OddsSnapshotUncheckedCreateWithoutRunnerInput[]
    connectOrCreate?: OddsSnapshotCreateOrConnectWithoutRunnerInput | OddsSnapshotCreateOrConnectWithoutRunnerInput[]
    upsert?: OddsSnapshotUpsertWithWhereUniqueWithoutRunnerInput | OddsSnapshotUpsertWithWhereUniqueWithoutRunnerInput[]
    createMany?: OddsSnapshotCreateManyRunnerInputEnvelope
    set?: OddsSnapshotWhereUniqueInput | OddsSnapshotWhereUniqueInput[]
    disconnect?: OddsSnapshotWhereUniqueInput | OddsSnapshotWhereUniqueInput[]
    delete?: OddsSnapshotWhereUniqueInput | OddsSnapshotWhereUniqueInput[]
    connect?: OddsSnapshotWhereUniqueInput | OddsSnapshotWhereUniqueInput[]
    update?: OddsSnapshotUpdateWithWhereUniqueWithoutRunnerInput | OddsSnapshotUpdateWithWhereUniqueWithoutRunnerInput[]
    updateMany?: OddsSnapshotUpdateManyWithWhereWithoutRunnerInput | OddsSnapshotUpdateManyWithWhereWithoutRunnerInput[]
    deleteMany?: OddsSnapshotScalarWhereInput | OddsSnapshotScalarWhereInput[]
  }

  export type RaceCreateNestedOneWithoutResultsInput = {
    create?: XOR<RaceCreateWithoutResultsInput, RaceUncheckedCreateWithoutResultsInput>
    connectOrCreate?: RaceCreateOrConnectWithoutResultsInput
    connect?: RaceWhereUniqueInput
  }

  export type RunnerCreateNestedOneWithoutResultsInput = {
    create?: XOR<RunnerCreateWithoutResultsInput, RunnerUncheckedCreateWithoutResultsInput>
    connectOrCreate?: RunnerCreateOrConnectWithoutResultsInput
    connect?: RunnerWhereUniqueInput
  }

  export type RaceUpdateOneRequiredWithoutResultsNestedInput = {
    create?: XOR<RaceCreateWithoutResultsInput, RaceUncheckedCreateWithoutResultsInput>
    connectOrCreate?: RaceCreateOrConnectWithoutResultsInput
    upsert?: RaceUpsertWithoutResultsInput
    connect?: RaceWhereUniqueInput
    update?: XOR<XOR<RaceUpdateToOneWithWhereWithoutResultsInput, RaceUpdateWithoutResultsInput>, RaceUncheckedUpdateWithoutResultsInput>
  }

  export type RunnerUpdateOneRequiredWithoutResultsNestedInput = {
    create?: XOR<RunnerCreateWithoutResultsInput, RunnerUncheckedCreateWithoutResultsInput>
    connectOrCreate?: RunnerCreateOrConnectWithoutResultsInput
    upsert?: RunnerUpsertWithoutResultsInput
    connect?: RunnerWhereUniqueInput
    update?: XOR<XOR<RunnerUpdateToOneWithWhereWithoutResultsInput, RunnerUpdateWithoutResultsInput>, RunnerUncheckedUpdateWithoutResultsInput>
  }

  export type RaceCreateNestedOneWithoutScrapesInput = {
    create?: XOR<RaceCreateWithoutScrapesInput, RaceUncheckedCreateWithoutScrapesInput>
    connectOrCreate?: RaceCreateOrConnectWithoutScrapesInput
    connect?: RaceWhereUniqueInput
  }

  export type JobRunCreateNestedOneWithoutScrapesInput = {
    create?: XOR<JobRunCreateWithoutScrapesInput, JobRunUncheckedCreateWithoutScrapesInput>
    connectOrCreate?: JobRunCreateOrConnectWithoutScrapesInput
    connect?: JobRunWhereUniqueInput
  }

  export type RaceUpdateOneRequiredWithoutScrapesNestedInput = {
    create?: XOR<RaceCreateWithoutScrapesInput, RaceUncheckedCreateWithoutScrapesInput>
    connectOrCreate?: RaceCreateOrConnectWithoutScrapesInput
    upsert?: RaceUpsertWithoutScrapesInput
    connect?: RaceWhereUniqueInput
    update?: XOR<XOR<RaceUpdateToOneWithWhereWithoutScrapesInput, RaceUpdateWithoutScrapesInput>, RaceUncheckedUpdateWithoutScrapesInput>
  }

  export type JobRunUpdateOneWithoutScrapesNestedInput = {
    create?: XOR<JobRunCreateWithoutScrapesInput, JobRunUncheckedCreateWithoutScrapesInput>
    connectOrCreate?: JobRunCreateOrConnectWithoutScrapesInput
    upsert?: JobRunUpsertWithoutScrapesInput
    disconnect?: JobRunWhereInput | boolean
    delete?: JobRunWhereInput | boolean
    connect?: JobRunWhereUniqueInput
    update?: XOR<XOR<JobRunUpdateToOneWithWhereWithoutScrapesInput, JobRunUpdateWithoutScrapesInput>, JobRunUncheckedUpdateWithoutScrapesInput>
  }

  export type ScrapeCreateNestedManyWithoutJobRunInput = {
    create?: XOR<ScrapeCreateWithoutJobRunInput, ScrapeUncheckedCreateWithoutJobRunInput> | ScrapeCreateWithoutJobRunInput[] | ScrapeUncheckedCreateWithoutJobRunInput[]
    connectOrCreate?: ScrapeCreateOrConnectWithoutJobRunInput | ScrapeCreateOrConnectWithoutJobRunInput[]
    createMany?: ScrapeCreateManyJobRunInputEnvelope
    connect?: ScrapeWhereUniqueInput | ScrapeWhereUniqueInput[]
  }

  export type JobRunCreateNestedOneWithoutRetryJobRunsInput = {
    create?: XOR<JobRunCreateWithoutRetryJobRunsInput, JobRunUncheckedCreateWithoutRetryJobRunsInput>
    connectOrCreate?: JobRunCreateOrConnectWithoutRetryJobRunsInput
    connect?: JobRunWhereUniqueInput
  }

  export type JobRunCreateNestedManyWithoutParentJobRunInput = {
    create?: XOR<JobRunCreateWithoutParentJobRunInput, JobRunUncheckedCreateWithoutParentJobRunInput> | JobRunCreateWithoutParentJobRunInput[] | JobRunUncheckedCreateWithoutParentJobRunInput[]
    connectOrCreate?: JobRunCreateOrConnectWithoutParentJobRunInput | JobRunCreateOrConnectWithoutParentJobRunInput[]
    createMany?: JobRunCreateManyParentJobRunInputEnvelope
    connect?: JobRunWhereUniqueInput | JobRunWhereUniqueInput[]
  }

  export type ScrapeUncheckedCreateNestedManyWithoutJobRunInput = {
    create?: XOR<ScrapeCreateWithoutJobRunInput, ScrapeUncheckedCreateWithoutJobRunInput> | ScrapeCreateWithoutJobRunInput[] | ScrapeUncheckedCreateWithoutJobRunInput[]
    connectOrCreate?: ScrapeCreateOrConnectWithoutJobRunInput | ScrapeCreateOrConnectWithoutJobRunInput[]
    createMany?: ScrapeCreateManyJobRunInputEnvelope
    connect?: ScrapeWhereUniqueInput | ScrapeWhereUniqueInput[]
  }

  export type JobRunUncheckedCreateNestedManyWithoutParentJobRunInput = {
    create?: XOR<JobRunCreateWithoutParentJobRunInput, JobRunUncheckedCreateWithoutParentJobRunInput> | JobRunCreateWithoutParentJobRunInput[] | JobRunUncheckedCreateWithoutParentJobRunInput[]
    connectOrCreate?: JobRunCreateOrConnectWithoutParentJobRunInput | JobRunCreateOrConnectWithoutParentJobRunInput[]
    createMany?: JobRunCreateManyParentJobRunInputEnvelope
    connect?: JobRunWhereUniqueInput | JobRunWhereUniqueInput[]
  }

  export type ScrapeUpdateManyWithoutJobRunNestedInput = {
    create?: XOR<ScrapeCreateWithoutJobRunInput, ScrapeUncheckedCreateWithoutJobRunInput> | ScrapeCreateWithoutJobRunInput[] | ScrapeUncheckedCreateWithoutJobRunInput[]
    connectOrCreate?: ScrapeCreateOrConnectWithoutJobRunInput | ScrapeCreateOrConnectWithoutJobRunInput[]
    upsert?: ScrapeUpsertWithWhereUniqueWithoutJobRunInput | ScrapeUpsertWithWhereUniqueWithoutJobRunInput[]
    createMany?: ScrapeCreateManyJobRunInputEnvelope
    set?: ScrapeWhereUniqueInput | ScrapeWhereUniqueInput[]
    disconnect?: ScrapeWhereUniqueInput | ScrapeWhereUniqueInput[]
    delete?: ScrapeWhereUniqueInput | ScrapeWhereUniqueInput[]
    connect?: ScrapeWhereUniqueInput | ScrapeWhereUniqueInput[]
    update?: ScrapeUpdateWithWhereUniqueWithoutJobRunInput | ScrapeUpdateWithWhereUniqueWithoutJobRunInput[]
    updateMany?: ScrapeUpdateManyWithWhereWithoutJobRunInput | ScrapeUpdateManyWithWhereWithoutJobRunInput[]
    deleteMany?: ScrapeScalarWhereInput | ScrapeScalarWhereInput[]
  }

  export type JobRunUpdateOneWithoutRetryJobRunsNestedInput = {
    create?: XOR<JobRunCreateWithoutRetryJobRunsInput, JobRunUncheckedCreateWithoutRetryJobRunsInput>
    connectOrCreate?: JobRunCreateOrConnectWithoutRetryJobRunsInput
    upsert?: JobRunUpsertWithoutRetryJobRunsInput
    disconnect?: JobRunWhereInput | boolean
    delete?: JobRunWhereInput | boolean
    connect?: JobRunWhereUniqueInput
    update?: XOR<XOR<JobRunUpdateToOneWithWhereWithoutRetryJobRunsInput, JobRunUpdateWithoutRetryJobRunsInput>, JobRunUncheckedUpdateWithoutRetryJobRunsInput>
  }

  export type JobRunUpdateManyWithoutParentJobRunNestedInput = {
    create?: XOR<JobRunCreateWithoutParentJobRunInput, JobRunUncheckedCreateWithoutParentJobRunInput> | JobRunCreateWithoutParentJobRunInput[] | JobRunUncheckedCreateWithoutParentJobRunInput[]
    connectOrCreate?: JobRunCreateOrConnectWithoutParentJobRunInput | JobRunCreateOrConnectWithoutParentJobRunInput[]
    upsert?: JobRunUpsertWithWhereUniqueWithoutParentJobRunInput | JobRunUpsertWithWhereUniqueWithoutParentJobRunInput[]
    createMany?: JobRunCreateManyParentJobRunInputEnvelope
    set?: JobRunWhereUniqueInput | JobRunWhereUniqueInput[]
    disconnect?: JobRunWhereUniqueInput | JobRunWhereUniqueInput[]
    delete?: JobRunWhereUniqueInput | JobRunWhereUniqueInput[]
    connect?: JobRunWhereUniqueInput | JobRunWhereUniqueInput[]
    update?: JobRunUpdateWithWhereUniqueWithoutParentJobRunInput | JobRunUpdateWithWhereUniqueWithoutParentJobRunInput[]
    updateMany?: JobRunUpdateManyWithWhereWithoutParentJobRunInput | JobRunUpdateManyWithWhereWithoutParentJobRunInput[]
    deleteMany?: JobRunScalarWhereInput | JobRunScalarWhereInput[]
  }

  export type ScrapeUncheckedUpdateManyWithoutJobRunNestedInput = {
    create?: XOR<ScrapeCreateWithoutJobRunInput, ScrapeUncheckedCreateWithoutJobRunInput> | ScrapeCreateWithoutJobRunInput[] | ScrapeUncheckedCreateWithoutJobRunInput[]
    connectOrCreate?: ScrapeCreateOrConnectWithoutJobRunInput | ScrapeCreateOrConnectWithoutJobRunInput[]
    upsert?: ScrapeUpsertWithWhereUniqueWithoutJobRunInput | ScrapeUpsertWithWhereUniqueWithoutJobRunInput[]
    createMany?: ScrapeCreateManyJobRunInputEnvelope
    set?: ScrapeWhereUniqueInput | ScrapeWhereUniqueInput[]
    disconnect?: ScrapeWhereUniqueInput | ScrapeWhereUniqueInput[]
    delete?: ScrapeWhereUniqueInput | ScrapeWhereUniqueInput[]
    connect?: ScrapeWhereUniqueInput | ScrapeWhereUniqueInput[]
    update?: ScrapeUpdateWithWhereUniqueWithoutJobRunInput | ScrapeUpdateWithWhereUniqueWithoutJobRunInput[]
    updateMany?: ScrapeUpdateManyWithWhereWithoutJobRunInput | ScrapeUpdateManyWithWhereWithoutJobRunInput[]
    deleteMany?: ScrapeScalarWhereInput | ScrapeScalarWhereInput[]
  }

  export type JobRunUncheckedUpdateManyWithoutParentJobRunNestedInput = {
    create?: XOR<JobRunCreateWithoutParentJobRunInput, JobRunUncheckedCreateWithoutParentJobRunInput> | JobRunCreateWithoutParentJobRunInput[] | JobRunUncheckedCreateWithoutParentJobRunInput[]
    connectOrCreate?: JobRunCreateOrConnectWithoutParentJobRunInput | JobRunCreateOrConnectWithoutParentJobRunInput[]
    upsert?: JobRunUpsertWithWhereUniqueWithoutParentJobRunInput | JobRunUpsertWithWhereUniqueWithoutParentJobRunInput[]
    createMany?: JobRunCreateManyParentJobRunInputEnvelope
    set?: JobRunWhereUniqueInput | JobRunWhereUniqueInput[]
    disconnect?: JobRunWhereUniqueInput | JobRunWhereUniqueInput[]
    delete?: JobRunWhereUniqueInput | JobRunWhereUniqueInput[]
    connect?: JobRunWhereUniqueInput | JobRunWhereUniqueInput[]
    update?: JobRunUpdateWithWhereUniqueWithoutParentJobRunInput | JobRunUpdateWithWhereUniqueWithoutParentJobRunInput[]
    updateMany?: JobRunUpdateManyWithWhereWithoutParentJobRunInput | JobRunUpdateManyWithWhereWithoutParentJobRunInput[]
    deleteMany?: JobRunScalarWhereInput | JobRunScalarWhereInput[]
  }

  export type RaceCreateNestedOneWithoutDividendsInput = {
    create?: XOR<RaceCreateWithoutDividendsInput, RaceUncheckedCreateWithoutDividendsInput>
    connectOrCreate?: RaceCreateOrConnectWithoutDividendsInput
    connect?: RaceWhereUniqueInput
  }

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

  export type RaceUpdateOneRequiredWithoutDividendsNestedInput = {
    create?: XOR<RaceCreateWithoutDividendsInput, RaceUncheckedCreateWithoutDividendsInput>
    connectOrCreate?: RaceCreateOrConnectWithoutDividendsInput
    upsert?: RaceUpsertWithoutDividendsInput
    connect?: RaceWhereUniqueInput
    update?: XOR<XOR<RaceUpdateToOneWithWhereWithoutDividendsInput, RaceUpdateWithoutDividendsInput>, RaceUncheckedUpdateWithoutDividendsInput>
  }

  export type RunnerCreateNestedOneWithoutOddsSnapshotsInput = {
    create?: XOR<RunnerCreateWithoutOddsSnapshotsInput, RunnerUncheckedCreateWithoutOddsSnapshotsInput>
    connectOrCreate?: RunnerCreateOrConnectWithoutOddsSnapshotsInput
    connect?: RunnerWhereUniqueInput
  }

  export type RunnerUpdateOneRequiredWithoutOddsSnapshotsNestedInput = {
    create?: XOR<RunnerCreateWithoutOddsSnapshotsInput, RunnerUncheckedCreateWithoutOddsSnapshotsInput>
    connectOrCreate?: RunnerCreateOrConnectWithoutOddsSnapshotsInput
    upsert?: RunnerUpsertWithoutOddsSnapshotsInput
    connect?: RunnerWhereUniqueInput
    update?: XOR<XOR<RunnerUpdateToOneWithWhereWithoutOddsSnapshotsInput, RunnerUpdateWithoutOddsSnapshotsInput>, RunnerUncheckedUpdateWithoutOddsSnapshotsInput>
  }

  export type NestedUuidFilter<$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>
    not?: NestedUuidFilter<$PrismaModel> | string
  }

  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 NestedStringNullableFilter<$PrismaModel = never> = {
    equals?: string | StringFieldRefInput<$PrismaModel> | null
    in?: string[] | ListStringFieldRefInput<$PrismaModel> | null
    notIn?: string[] | ListStringFieldRefInput<$PrismaModel> | null
    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?: NestedStringNullableFilter<$PrismaModel> | string | null
  }

  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 NestedUuidWithAggregatesFilter<$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>
    not?: NestedUuidWithAggregatesFilter<$PrismaModel> | string
    _count?: NestedIntFilter<$PrismaModel>
    _min?: NestedStringFilter<$PrismaModel>
    _max?: NestedStringFilter<$PrismaModel>
  }

  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 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 NestedStringNullableWithAggregatesFilter<$PrismaModel = never> = {
    equals?: string | StringFieldRefInput<$PrismaModel> | null
    in?: string[] | ListStringFieldRefInput<$PrismaModel> | null
    notIn?: string[] | ListStringFieldRefInput<$PrismaModel> | null
    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?: NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null
    _count?: NestedIntNullableFilter<$PrismaModel>
    _min?: NestedStringNullableFilter<$PrismaModel>
    _max?: NestedStringNullableFilter<$PrismaModel>
  }
  export type NestedJsonNullableFilter<$PrismaModel = never> = 
    | PatchUndefined<
        Either<Required<NestedJsonNullableFilterBase<$PrismaModel>>, Exclude<keyof Required<NestedJsonNullableFilterBase<$PrismaModel>>, 'path'>>,
        Required<NestedJsonNullableFilterBase<$PrismaModel>>
      >
    | OptionalFlat<Omit<Required<NestedJsonNullableFilterBase<$PrismaModel>>, 'path'>>

  export type NestedJsonNullableFilterBase<$PrismaModel = never> = {
    equals?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter
    path?: string[]
    string_contains?: string | StringFieldRefInput<$PrismaModel>
    string_starts_with?: string | StringFieldRefInput<$PrismaModel>
    string_ends_with?: string | StringFieldRefInput<$PrismaModel>
    array_contains?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
    array_starts_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
    array_ends_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
    lt?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
    lte?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
    gt?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
    gte?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
    not?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter
  }

  export type NestedIntNullableWithAggregatesFilter<$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?: NestedIntNullableWithAggregatesFilter<$PrismaModel> | number | null
    _count?: NestedIntNullableFilter<$PrismaModel>
    _avg?: NestedFloatNullableFilter<$PrismaModel>
    _sum?: NestedIntNullableFilter<$PrismaModel>
    _min?: NestedIntNullableFilter<$PrismaModel>
    _max?: NestedIntNullableFilter<$PrismaModel>
  }

  export type NestedFloatNullableFilter<$PrismaModel = never> = {
    equals?: number | FloatFieldRefInput<$PrismaModel> | null
    in?: number[] | ListFloatFieldRefInput<$PrismaModel> | null
    notIn?: number[] | ListFloatFieldRefInput<$PrismaModel> | null
    lt?: number | FloatFieldRefInput<$PrismaModel>
    lte?: number | FloatFieldRefInput<$PrismaModel>
    gt?: number | FloatFieldRefInput<$PrismaModel>
    gte?: number | FloatFieldRefInput<$PrismaModel>
    not?: NestedFloatNullableFilter<$PrismaModel> | number | 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 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 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 NestedUuidNullableFilter<$PrismaModel = never> = {
    equals?: string | StringFieldRefInput<$PrismaModel> | null
    in?: string[] | ListStringFieldRefInput<$PrismaModel> | null
    notIn?: string[] | ListStringFieldRefInput<$PrismaModel> | null
    lt?: string | StringFieldRefInput<$PrismaModel>
    lte?: string | StringFieldRefInput<$PrismaModel>
    gt?: string | StringFieldRefInput<$PrismaModel>
    gte?: string | StringFieldRefInput<$PrismaModel>
    not?: NestedUuidNullableFilter<$PrismaModel> | string | null
  }

  export type NestedBigIntNullableFilter<$PrismaModel = never> = {
    equals?: bigint | number | BigIntFieldRefInput<$PrismaModel> | null
    in?: bigint[] | number[] | ListBigIntFieldRefInput<$PrismaModel> | null
    notIn?: bigint[] | number[] | ListBigIntFieldRefInput<$PrismaModel> | null
    lt?: bigint | number | BigIntFieldRefInput<$PrismaModel>
    lte?: bigint | number | BigIntFieldRefInput<$PrismaModel>
    gt?: bigint | number | BigIntFieldRefInput<$PrismaModel>
    gte?: bigint | number | BigIntFieldRefInput<$PrismaModel>
    not?: NestedBigIntNullableFilter<$PrismaModel> | bigint | number | null
  }

  export type NestedUuidNullableWithAggregatesFilter<$PrismaModel = never> = {
    equals?: string | StringFieldRefInput<$PrismaModel> | null
    in?: string[] | ListStringFieldRefInput<$PrismaModel> | null
    notIn?: string[] | ListStringFieldRefInput<$PrismaModel> | null
    lt?: string | StringFieldRefInput<$PrismaModel>
    lte?: string | StringFieldRefInput<$PrismaModel>
    gt?: string | StringFieldRefInput<$PrismaModel>
    gte?: string | StringFieldRefInput<$PrismaModel>
    not?: NestedUuidNullableWithAggregatesFilter<$PrismaModel> | string | null
    _count?: NestedIntNullableFilter<$PrismaModel>
    _min?: NestedStringNullableFilter<$PrismaModel>
    _max?: NestedStringNullableFilter<$PrismaModel>
  }

  export type NestedBigIntNullableWithAggregatesFilter<$PrismaModel = never> = {
    equals?: bigint | number | BigIntFieldRefInput<$PrismaModel> | null
    in?: bigint[] | number[] | ListBigIntFieldRefInput<$PrismaModel> | null
    notIn?: bigint[] | number[] | ListBigIntFieldRefInput<$PrismaModel> | null
    lt?: bigint | number | BigIntFieldRefInput<$PrismaModel>
    lte?: bigint | number | BigIntFieldRefInput<$PrismaModel>
    gt?: bigint | number | BigIntFieldRefInput<$PrismaModel>
    gte?: bigint | number | BigIntFieldRefInput<$PrismaModel>
    not?: NestedBigIntNullableWithAggregatesFilter<$PrismaModel> | bigint | number | null
    _count?: NestedIntNullableFilter<$PrismaModel>
    _avg?: NestedFloatNullableFilter<$PrismaModel>
    _sum?: NestedBigIntNullableFilter<$PrismaModel>
    _min?: NestedBigIntNullableFilter<$PrismaModel>
    _max?: NestedBigIntNullableFilter<$PrismaModel>
  }

  export type NestedDecimalNullableFilter<$PrismaModel = never> = {
    equals?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> | null
    in?: Decimal[] | DecimalJsLike[] | number[] | string[] | ListDecimalFieldRefInput<$PrismaModel> | null
    notIn?: Decimal[] | DecimalJsLike[] | number[] | string[] | ListDecimalFieldRefInput<$PrismaModel> | null
    lt?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    lte?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    gt?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    gte?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    not?: NestedDecimalNullableFilter<$PrismaModel> | Decimal | DecimalJsLike | number | string | null
  }

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

  export type NestedDecimalNullableWithAggregatesFilter<$PrismaModel = never> = {
    equals?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> | null
    in?: Decimal[] | DecimalJsLike[] | number[] | string[] | ListDecimalFieldRefInput<$PrismaModel> | null
    notIn?: Decimal[] | DecimalJsLike[] | number[] | string[] | ListDecimalFieldRefInput<$PrismaModel> | null
    lt?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    lte?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    gt?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    gte?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    not?: NestedDecimalNullableWithAggregatesFilter<$PrismaModel> | Decimal | DecimalJsLike | number | string | null
    _count?: NestedIntNullableFilter<$PrismaModel>
    _avg?: NestedDecimalNullableFilter<$PrismaModel>
    _sum?: NestedDecimalNullableFilter<$PrismaModel>
    _min?: NestedDecimalNullableFilter<$PrismaModel>
    _max?: NestedDecimalNullableFilter<$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 NestedDecimalFilter<$PrismaModel = never> = {
    equals?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    in?: Decimal[] | DecimalJsLike[] | number[] | string[] | ListDecimalFieldRefInput<$PrismaModel>
    notIn?: Decimal[] | DecimalJsLike[] | number[] | string[] | ListDecimalFieldRefInput<$PrismaModel>
    lt?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    lte?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    gt?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    gte?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    not?: NestedDecimalFilter<$PrismaModel> | Decimal | DecimalJsLike | number | string
  }

  export type NestedDecimalWithAggregatesFilter<$PrismaModel = never> = {
    equals?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    in?: Decimal[] | DecimalJsLike[] | number[] | string[] | ListDecimalFieldRefInput<$PrismaModel>
    notIn?: Decimal[] | DecimalJsLike[] | number[] | string[] | ListDecimalFieldRefInput<$PrismaModel>
    lt?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    lte?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    gt?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    gte?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel>
    not?: NestedDecimalWithAggregatesFilter<$PrismaModel> | Decimal | DecimalJsLike | number | string
    _count?: NestedIntFilter<$PrismaModel>
    _avg?: NestedDecimalFilter<$PrismaModel>
    _sum?: NestedDecimalFilter<$PrismaModel>
    _min?: NestedDecimalFilter<$PrismaModel>
    _max?: NestedDecimalFilter<$PrismaModel>
  }
  export type NestedJsonFilter<$PrismaModel = never> = 
    | PatchUndefined<
        Either<Required<NestedJsonFilterBase<$PrismaModel>>, Exclude<keyof Required<NestedJsonFilterBase<$PrismaModel>>, 'path'>>,
        Required<NestedJsonFilterBase<$PrismaModel>>
      >
    | OptionalFlat<Omit<Required<NestedJsonFilterBase<$PrismaModel>>, 'path'>>

  export type NestedJsonFilterBase<$PrismaModel = never> = {
    equals?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter
    path?: string[]
    string_contains?: string | StringFieldRefInput<$PrismaModel>
    string_starts_with?: string | StringFieldRefInput<$PrismaModel>
    string_ends_with?: string | StringFieldRefInput<$PrismaModel>
    array_contains?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
    array_starts_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
    array_ends_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
    lt?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
    lte?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
    gt?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
    gte?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
    not?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter
  }

  export type RaceCreateWithoutMeetingInput = {
    id?: string
    raceNumber: number
    name: string
    startTime: Date | string
    toteStartTime?: Date | string | null
    distance: number
    trackCondition?: string | null
    weather?: string | null
    status: string
    country: string
    state?: string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: Date | string
    updatedAt?: Date | string
    runners?: RunnerCreateNestedManyWithoutRaceInput
    scrapes?: ScrapeCreateNestedManyWithoutRaceInput
    results?: ResultCreateNestedManyWithoutRaceInput
    dividends?: DividendCreateNestedManyWithoutRaceInput
  }

  export type RaceUncheckedCreateWithoutMeetingInput = {
    id?: string
    raceNumber: number
    name: string
    startTime: Date | string
    toteStartTime?: Date | string | null
    distance: number
    trackCondition?: string | null
    weather?: string | null
    status: string
    country: string
    state?: string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: Date | string
    updatedAt?: Date | string
    runners?: RunnerUncheckedCreateNestedManyWithoutRaceInput
    scrapes?: ScrapeUncheckedCreateNestedManyWithoutRaceInput
    results?: ResultUncheckedCreateNestedManyWithoutRaceInput
    dividends?: DividendUncheckedCreateNestedManyWithoutRaceInput
  }

  export type RaceCreateOrConnectWithoutMeetingInput = {
    where: RaceWhereUniqueInput
    create: XOR<RaceCreateWithoutMeetingInput, RaceUncheckedCreateWithoutMeetingInput>
  }

  export type RaceCreateManyMeetingInputEnvelope = {
    data: RaceCreateManyMeetingInput | RaceCreateManyMeetingInput[]
    skipDuplicates?: boolean
  }

  export type RaceUpsertWithWhereUniqueWithoutMeetingInput = {
    where: RaceWhereUniqueInput
    update: XOR<RaceUpdateWithoutMeetingInput, RaceUncheckedUpdateWithoutMeetingInput>
    create: XOR<RaceCreateWithoutMeetingInput, RaceUncheckedCreateWithoutMeetingInput>
  }

  export type RaceUpdateWithWhereUniqueWithoutMeetingInput = {
    where: RaceWhereUniqueInput
    data: XOR<RaceUpdateWithoutMeetingInput, RaceUncheckedUpdateWithoutMeetingInput>
  }

  export type RaceUpdateManyWithWhereWithoutMeetingInput = {
    where: RaceScalarWhereInput
    data: XOR<RaceUpdateManyMutationInput, RaceUncheckedUpdateManyWithoutMeetingInput>
  }

  export type RaceScalarWhereInput = {
    AND?: RaceScalarWhereInput | RaceScalarWhereInput[]
    OR?: RaceScalarWhereInput[]
    NOT?: RaceScalarWhereInput | RaceScalarWhereInput[]
    id?: UuidFilter<"Race"> | string
    meetingId?: UuidFilter<"Race"> | string
    raceNumber?: IntFilter<"Race"> | number
    name?: StringFilter<"Race"> | string
    startTime?: DateTimeFilter<"Race"> | Date | string
    toteStartTime?: DateTimeNullableFilter<"Race"> | Date | string | null
    distance?: IntFilter<"Race"> | number
    trackCondition?: StringNullableFilter<"Race"> | string | null
    weather?: StringNullableFilter<"Race"> | string | null
    status?: StringFilter<"Race"> | string
    country?: StringFilter<"Race"> | string
    state?: StringNullableFilter<"Race"> | string | null
    metadata?: JsonNullableFilter<"Race">
    createdAt?: DateTimeFilter<"Race"> | Date | string
    updatedAt?: DateTimeFilter<"Race"> | Date | string
  }

  export type MeetingCreateWithoutRacesInput = {
    id?: string
    name: string
    date: Date | string
    country: string
    state?: string | null
    category: string
    categoryName?: string | null
    trackCondition?: string | null
    weather?: string | null
    videoChannels?: NullableJsonNullValueInput | InputJsonValue
    quaddie?: MeetingCreatequaddieInput | number[]
    earlyQuaddie?: MeetingCreateearlyQuaddieInput | number[]
    toteMeetingNumber?: number | null
    toteStatus?: string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type MeetingUncheckedCreateWithoutRacesInput = {
    id?: string
    name: string
    date: Date | string
    country: string
    state?: string | null
    category: string
    categoryName?: string | null
    trackCondition?: string | null
    weather?: string | null
    videoChannels?: NullableJsonNullValueInput | InputJsonValue
    quaddie?: MeetingCreatequaddieInput | number[]
    earlyQuaddie?: MeetingCreateearlyQuaddieInput | number[]
    toteMeetingNumber?: number | null
    toteStatus?: string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type MeetingCreateOrConnectWithoutRacesInput = {
    where: MeetingWhereUniqueInput
    create: XOR<MeetingCreateWithoutRacesInput, MeetingUncheckedCreateWithoutRacesInput>
  }

  export type RunnerCreateWithoutRaceInput = {
    id?: string
    runnerNumber: number
    entrantId?: string | null
    horseName: string
    tabHorseIdLegacy?: string | null
    barrier?: number | null
    weight?: Decimal | DecimalJsLike | number | string | null
    jockeyName?: string | null
    jockeyId?: string | null
    jockeyWeightAllowance?: Decimal | DecimalJsLike | number | string | null
    trainerName?: string | null
    trainerId?: string | null
    trainerLocation?: string | null
    form?: string | null
    lastStarts?: NullableJsonNullValueInput | InputJsonValue
    lastTwentyStarts?: string | null
    age?: number | null
    silkColours?: string | null
    scratched?: boolean
    scratchedAt?: Date | string | null
    openingOdds?: Decimal | DecimalJsLike | number | string | null
    currentOdds?: Decimal | DecimalJsLike | number | string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: Date | string
    updatedAt?: Date | string
    horse?: HorseCreateNestedOneWithoutRunnersInput
    results?: ResultCreateNestedManyWithoutRunnerInput
    oddsSnapshots?: OddsSnapshotCreateNestedManyWithoutRunnerInput
  }

  export type RunnerUncheckedCreateWithoutRaceInput = {
    id?: string
    runnerNumber: number
    entrantId?: string | null
    horseName: string
    tabHorseIdLegacy?: string | null
    horseId?: string | null
    barrier?: number | null
    weight?: Decimal | DecimalJsLike | number | string | null
    jockeyName?: string | null
    jockeyId?: string | null
    jockeyWeightAllowance?: Decimal | DecimalJsLike | number | string | null
    trainerName?: string | null
    trainerId?: string | null
    trainerLocation?: string | null
    form?: string | null
    lastStarts?: NullableJsonNullValueInput | InputJsonValue
    lastTwentyStarts?: string | null
    age?: number | null
    silkColours?: string | null
    scratched?: boolean
    scratchedAt?: Date | string | null
    openingOdds?: Decimal | DecimalJsLike | number | string | null
    currentOdds?: Decimal | DecimalJsLike | number | string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: Date | string
    updatedAt?: Date | string
    results?: ResultUncheckedCreateNestedManyWithoutRunnerInput
    oddsSnapshots?: OddsSnapshotUncheckedCreateNestedManyWithoutRunnerInput
  }

  export type RunnerCreateOrConnectWithoutRaceInput = {
    where: RunnerWhereUniqueInput
    create: XOR<RunnerCreateWithoutRaceInput, RunnerUncheckedCreateWithoutRaceInput>
  }

  export type RunnerCreateManyRaceInputEnvelope = {
    data: RunnerCreateManyRaceInput | RunnerCreateManyRaceInput[]
    skipDuplicates?: boolean
  }

  export type ScrapeCreateWithoutRaceInput = {
    id?: string
    scrapeType: string
    scrapedAt?: Date | string
    changesDetected?: NullableJsonNullValueInput | InputJsonValue
    success?: boolean
    errorMessage?: string | null
    jobRun?: JobRunCreateNestedOneWithoutScrapesInput
  }

  export type ScrapeUncheckedCreateWithoutRaceInput = {
    id?: string
    scrapeType: string
    scrapedAt?: Date | string
    changesDetected?: NullableJsonNullValueInput | InputJsonValue
    success?: boolean
    errorMessage?: string | null
    jobRunId?: string | null
  }

  export type ScrapeCreateOrConnectWithoutRaceInput = {
    where: ScrapeWhereUniqueInput
    create: XOR<ScrapeCreateWithoutRaceInput, ScrapeUncheckedCreateWithoutRaceInput>
  }

  export type ScrapeCreateManyRaceInputEnvelope = {
    data: ScrapeCreateManyRaceInput | ScrapeCreateManyRaceInput[]
    skipDuplicates?: boolean
  }

  export type ResultCreateWithoutRaceInput = {
    id?: string
    finishPosition?: number | null
    margin?: Decimal | DecimalJsLike | number | string | null
    raceTime?: Decimal | DecimalJsLike | number | string | null
    winDividend?: Decimal | DecimalJsLike | number | string | null
    placeDividend?: Decimal | DecimalJsLike | number | string | null
    official?: boolean
    disqualified?: boolean
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: Date | string
    runner: RunnerCreateNestedOneWithoutResultsInput
  }

  export type ResultUncheckedCreateWithoutRaceInput = {
    id?: string
    runnerId: string
    finishPosition?: number | null
    margin?: Decimal | DecimalJsLike | number | string | null
    raceTime?: Decimal | DecimalJsLike | number | string | null
    winDividend?: Decimal | DecimalJsLike | number | string | null
    placeDividend?: Decimal | DecimalJsLike | number | string | null
    official?: boolean
    disqualified?: boolean
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: Date | string
  }

  export type ResultCreateOrConnectWithoutRaceInput = {
    where: ResultWhereUniqueInput
    create: XOR<ResultCreateWithoutRaceInput, ResultUncheckedCreateWithoutRaceInput>
  }

  export type ResultCreateManyRaceInputEnvelope = {
    data: ResultCreateManyRaceInput | ResultCreateManyRaceInput[]
    skipDuplicates?: boolean
  }

  export type DividendCreateWithoutRaceInput = {
    id?: string
    tote: string
    productName: string
    status: string
    dividend: Decimal | DecimalJsLike | number | string
    poolSize?: Decimal | DecimalJsLike | number | string | null
    jackpotSize?: Decimal | DecimalJsLike | number | string | null
    positions: JsonNullValueInput | InputJsonValue
    description?: string | null
    createdAt?: Date | string
  }

  export type DividendUncheckedCreateWithoutRaceInput = {
    id?: string
    tote: string
    productName: string
    status: string
    dividend: Decimal | DecimalJsLike | number | string
    poolSize?: Decimal | DecimalJsLike | number | string | null
    jackpotSize?: Decimal | DecimalJsLike | number | string | null
    positions: JsonNullValueInput | InputJsonValue
    description?: string | null
    createdAt?: Date | string
  }

  export type DividendCreateOrConnectWithoutRaceInput = {
    where: DividendWhereUniqueInput
    create: XOR<DividendCreateWithoutRaceInput, DividendUncheckedCreateWithoutRaceInput>
  }

  export type DividendCreateManyRaceInputEnvelope = {
    data: DividendCreateManyRaceInput | DividendCreateManyRaceInput[]
    skipDuplicates?: boolean
  }

  export type MeetingUpsertWithoutRacesInput = {
    update: XOR<MeetingUpdateWithoutRacesInput, MeetingUncheckedUpdateWithoutRacesInput>
    create: XOR<MeetingCreateWithoutRacesInput, MeetingUncheckedCreateWithoutRacesInput>
    where?: MeetingWhereInput
  }

  export type MeetingUpdateToOneWithWhereWithoutRacesInput = {
    where?: MeetingWhereInput
    data: XOR<MeetingUpdateWithoutRacesInput, MeetingUncheckedUpdateWithoutRacesInput>
  }

  export type MeetingUpdateWithoutRacesInput = {
    id?: StringFieldUpdateOperationsInput | string
    name?: StringFieldUpdateOperationsInput | string
    date?: DateTimeFieldUpdateOperationsInput | Date | string
    country?: StringFieldUpdateOperationsInput | string
    state?: NullableStringFieldUpdateOperationsInput | string | null
    category?: StringFieldUpdateOperationsInput | string
    categoryName?: NullableStringFieldUpdateOperationsInput | string | null
    trackCondition?: NullableStringFieldUpdateOperationsInput | string | null
    weather?: NullableStringFieldUpdateOperationsInput | string | null
    videoChannels?: NullableJsonNullValueInput | InputJsonValue
    quaddie?: MeetingUpdatequaddieInput | number[]
    earlyQuaddie?: MeetingUpdateearlyQuaddieInput | number[]
    toteMeetingNumber?: NullableIntFieldUpdateOperationsInput | number | null
    toteStatus?: NullableStringFieldUpdateOperationsInput | string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type MeetingUncheckedUpdateWithoutRacesInput = {
    id?: StringFieldUpdateOperationsInput | string
    name?: StringFieldUpdateOperationsInput | string
    date?: DateTimeFieldUpdateOperationsInput | Date | string
    country?: StringFieldUpdateOperationsInput | string
    state?: NullableStringFieldUpdateOperationsInput | string | null
    category?: StringFieldUpdateOperationsInput | string
    categoryName?: NullableStringFieldUpdateOperationsInput | string | null
    trackCondition?: NullableStringFieldUpdateOperationsInput | string | null
    weather?: NullableStringFieldUpdateOperationsInput | string | null
    videoChannels?: NullableJsonNullValueInput | InputJsonValue
    quaddie?: MeetingUpdatequaddieInput | number[]
    earlyQuaddie?: MeetingUpdateearlyQuaddieInput | number[]
    toteMeetingNumber?: NullableIntFieldUpdateOperationsInput | number | null
    toteStatus?: NullableStringFieldUpdateOperationsInput | string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type RunnerUpsertWithWhereUniqueWithoutRaceInput = {
    where: RunnerWhereUniqueInput
    update: XOR<RunnerUpdateWithoutRaceInput, RunnerUncheckedUpdateWithoutRaceInput>
    create: XOR<RunnerCreateWithoutRaceInput, RunnerUncheckedCreateWithoutRaceInput>
  }

  export type RunnerUpdateWithWhereUniqueWithoutRaceInput = {
    where: RunnerWhereUniqueInput
    data: XOR<RunnerUpdateWithoutRaceInput, RunnerUncheckedUpdateWithoutRaceInput>
  }

  export type RunnerUpdateManyWithWhereWithoutRaceInput = {
    where: RunnerScalarWhereInput
    data: XOR<RunnerUpdateManyMutationInput, RunnerUncheckedUpdateManyWithoutRaceInput>
  }

  export type RunnerScalarWhereInput = {
    AND?: RunnerScalarWhereInput | RunnerScalarWhereInput[]
    OR?: RunnerScalarWhereInput[]
    NOT?: RunnerScalarWhereInput | RunnerScalarWhereInput[]
    id?: UuidFilter<"Runner"> | string
    raceId?: UuidFilter<"Runner"> | string
    runnerNumber?: IntFilter<"Runner"> | number
    entrantId?: UuidNullableFilter<"Runner"> | string | null
    horseName?: StringFilter<"Runner"> | string
    tabHorseIdLegacy?: UuidNullableFilter<"Runner"> | string | null
    horseId?: UuidNullableFilter<"Runner"> | string | null
    barrier?: IntNullableFilter<"Runner"> | number | null
    weight?: DecimalNullableFilter<"Runner"> | Decimal | DecimalJsLike | number | string | null
    jockeyName?: StringNullableFilter<"Runner"> | string | null
    jockeyId?: UuidNullableFilter<"Runner"> | string | null
    jockeyWeightAllowance?: DecimalNullableFilter<"Runner"> | Decimal | DecimalJsLike | number | string | null
    trainerName?: StringNullableFilter<"Runner"> | string | null
    trainerId?: UuidNullableFilter<"Runner"> | string | null
    trainerLocation?: StringNullableFilter<"Runner"> | string | null
    form?: StringNullableFilter<"Runner"> | string | null
    lastStarts?: JsonNullableFilter<"Runner">
    lastTwentyStarts?: StringNullableFilter<"Runner"> | string | null
    age?: IntNullableFilter<"Runner"> | number | null
    silkColours?: StringNullableFilter<"Runner"> | string | null
    scratched?: BoolFilter<"Runner"> | boolean
    scratchedAt?: DateTimeNullableFilter<"Runner"> | Date | string | null
    openingOdds?: DecimalNullableFilter<"Runner"> | Decimal | DecimalJsLike | number | string | null
    currentOdds?: DecimalNullableFilter<"Runner"> | Decimal | DecimalJsLike | number | string | null
    metadata?: JsonNullableFilter<"Runner">
    createdAt?: DateTimeFilter<"Runner"> | Date | string
    updatedAt?: DateTimeFilter<"Runner"> | Date | string
  }

  export type ScrapeUpsertWithWhereUniqueWithoutRaceInput = {
    where: ScrapeWhereUniqueInput
    update: XOR<ScrapeUpdateWithoutRaceInput, ScrapeUncheckedUpdateWithoutRaceInput>
    create: XOR<ScrapeCreateWithoutRaceInput, ScrapeUncheckedCreateWithoutRaceInput>
  }

  export type ScrapeUpdateWithWhereUniqueWithoutRaceInput = {
    where: ScrapeWhereUniqueInput
    data: XOR<ScrapeUpdateWithoutRaceInput, ScrapeUncheckedUpdateWithoutRaceInput>
  }

  export type ScrapeUpdateManyWithWhereWithoutRaceInput = {
    where: ScrapeScalarWhereInput
    data: XOR<ScrapeUpdateManyMutationInput, ScrapeUncheckedUpdateManyWithoutRaceInput>
  }

  export type ScrapeScalarWhereInput = {
    AND?: ScrapeScalarWhereInput | ScrapeScalarWhereInput[]
    OR?: ScrapeScalarWhereInput[]
    NOT?: ScrapeScalarWhereInput | ScrapeScalarWhereInput[]
    id?: UuidFilter<"Scrape"> | string
    raceId?: UuidFilter<"Scrape"> | string
    scrapeType?: StringFilter<"Scrape"> | string
    scrapedAt?: DateTimeFilter<"Scrape"> | Date | string
    changesDetected?: JsonNullableFilter<"Scrape">
    success?: BoolFilter<"Scrape"> | boolean
    errorMessage?: StringNullableFilter<"Scrape"> | string | null
    jobRunId?: UuidNullableFilter<"Scrape"> | string | null
  }

  export type ResultUpsertWithWhereUniqueWithoutRaceInput = {
    where: ResultWhereUniqueInput
    update: XOR<ResultUpdateWithoutRaceInput, ResultUncheckedUpdateWithoutRaceInput>
    create: XOR<ResultCreateWithoutRaceInput, ResultUncheckedCreateWithoutRaceInput>
  }

  export type ResultUpdateWithWhereUniqueWithoutRaceInput = {
    where: ResultWhereUniqueInput
    data: XOR<ResultUpdateWithoutRaceInput, ResultUncheckedUpdateWithoutRaceInput>
  }

  export type ResultUpdateManyWithWhereWithoutRaceInput = {
    where: ResultScalarWhereInput
    data: XOR<ResultUpdateManyMutationInput, ResultUncheckedUpdateManyWithoutRaceInput>
  }

  export type ResultScalarWhereInput = {
    AND?: ResultScalarWhereInput | ResultScalarWhereInput[]
    OR?: ResultScalarWhereInput[]
    NOT?: ResultScalarWhereInput | ResultScalarWhereInput[]
    id?: UuidFilter<"Result"> | string
    raceId?: UuidFilter<"Result"> | string
    runnerId?: UuidFilter<"Result"> | string
    finishPosition?: IntNullableFilter<"Result"> | number | null
    margin?: DecimalNullableFilter<"Result"> | Decimal | DecimalJsLike | number | string | null
    raceTime?: DecimalNullableFilter<"Result"> | Decimal | DecimalJsLike | number | string | null
    winDividend?: DecimalNullableFilter<"Result"> | Decimal | DecimalJsLike | number | string | null
    placeDividend?: DecimalNullableFilter<"Result"> | Decimal | DecimalJsLike | number | string | null
    official?: BoolFilter<"Result"> | boolean
    disqualified?: BoolFilter<"Result"> | boolean
    metadata?: JsonNullableFilter<"Result">
    createdAt?: DateTimeFilter<"Result"> | Date | string
  }

  export type DividendUpsertWithWhereUniqueWithoutRaceInput = {
    where: DividendWhereUniqueInput
    update: XOR<DividendUpdateWithoutRaceInput, DividendUncheckedUpdateWithoutRaceInput>
    create: XOR<DividendCreateWithoutRaceInput, DividendUncheckedCreateWithoutRaceInput>
  }

  export type DividendUpdateWithWhereUniqueWithoutRaceInput = {
    where: DividendWhereUniqueInput
    data: XOR<DividendUpdateWithoutRaceInput, DividendUncheckedUpdateWithoutRaceInput>
  }

  export type DividendUpdateManyWithWhereWithoutRaceInput = {
    where: DividendScalarWhereInput
    data: XOR<DividendUpdateManyMutationInput, DividendUncheckedUpdateManyWithoutRaceInput>
  }

  export type DividendScalarWhereInput = {
    AND?: DividendScalarWhereInput | DividendScalarWhereInput[]
    OR?: DividendScalarWhereInput[]
    NOT?: DividendScalarWhereInput | DividendScalarWhereInput[]
    id?: UuidFilter<"Dividend"> | string
    raceId?: UuidFilter<"Dividend"> | string
    tote?: StringFilter<"Dividend"> | string
    productName?: StringFilter<"Dividend"> | string
    status?: StringFilter<"Dividend"> | string
    dividend?: DecimalFilter<"Dividend"> | Decimal | DecimalJsLike | number | string
    poolSize?: DecimalNullableFilter<"Dividend"> | Decimal | DecimalJsLike | number | string | null
    jackpotSize?: DecimalNullableFilter<"Dividend"> | Decimal | DecimalJsLike | number | string | null
    positions?: JsonFilter<"Dividend">
    description?: StringNullableFilter<"Dividend"> | string | null
    createdAt?: DateTimeFilter<"Dividend"> | Date | string
  }

  export type RunnerCreateWithoutHorseInput = {
    id?: string
    runnerNumber: number
    entrantId?: string | null
    horseName: string
    tabHorseIdLegacy?: string | null
    barrier?: number | null
    weight?: Decimal | DecimalJsLike | number | string | null
    jockeyName?: string | null
    jockeyId?: string | null
    jockeyWeightAllowance?: Decimal | DecimalJsLike | number | string | null
    trainerName?: string | null
    trainerId?: string | null
    trainerLocation?: string | null
    form?: string | null
    lastStarts?: NullableJsonNullValueInput | InputJsonValue
    lastTwentyStarts?: string | null
    age?: number | null
    silkColours?: string | null
    scratched?: boolean
    scratchedAt?: Date | string | null
    openingOdds?: Decimal | DecimalJsLike | number | string | null
    currentOdds?: Decimal | DecimalJsLike | number | string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: Date | string
    updatedAt?: Date | string
    race: RaceCreateNestedOneWithoutRunnersInput
    results?: ResultCreateNestedManyWithoutRunnerInput
    oddsSnapshots?: OddsSnapshotCreateNestedManyWithoutRunnerInput
  }

  export type RunnerUncheckedCreateWithoutHorseInput = {
    id?: string
    raceId: string
    runnerNumber: number
    entrantId?: string | null
    horseName: string
    tabHorseIdLegacy?: string | null
    barrier?: number | null
    weight?: Decimal | DecimalJsLike | number | string | null
    jockeyName?: string | null
    jockeyId?: string | null
    jockeyWeightAllowance?: Decimal | DecimalJsLike | number | string | null
    trainerName?: string | null
    trainerId?: string | null
    trainerLocation?: string | null
    form?: string | null
    lastStarts?: NullableJsonNullValueInput | InputJsonValue
    lastTwentyStarts?: string | null
    age?: number | null
    silkColours?: string | null
    scratched?: boolean
    scratchedAt?: Date | string | null
    openingOdds?: Decimal | DecimalJsLike | number | string | null
    currentOdds?: Decimal | DecimalJsLike | number | string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: Date | string
    updatedAt?: Date | string
    results?: ResultUncheckedCreateNestedManyWithoutRunnerInput
    oddsSnapshots?: OddsSnapshotUncheckedCreateNestedManyWithoutRunnerInput
  }

  export type RunnerCreateOrConnectWithoutHorseInput = {
    where: RunnerWhereUniqueInput
    create: XOR<RunnerCreateWithoutHorseInput, RunnerUncheckedCreateWithoutHorseInput>
  }

  export type RunnerCreateManyHorseInputEnvelope = {
    data: RunnerCreateManyHorseInput | RunnerCreateManyHorseInput[]
    skipDuplicates?: boolean
  }

  export type RunnerUpsertWithWhereUniqueWithoutHorseInput = {
    where: RunnerWhereUniqueInput
    update: XOR<RunnerUpdateWithoutHorseInput, RunnerUncheckedUpdateWithoutHorseInput>
    create: XOR<RunnerCreateWithoutHorseInput, RunnerUncheckedCreateWithoutHorseInput>
  }

  export type RunnerUpdateWithWhereUniqueWithoutHorseInput = {
    where: RunnerWhereUniqueInput
    data: XOR<RunnerUpdateWithoutHorseInput, RunnerUncheckedUpdateWithoutHorseInput>
  }

  export type RunnerUpdateManyWithWhereWithoutHorseInput = {
    where: RunnerScalarWhereInput
    data: XOR<RunnerUpdateManyMutationInput, RunnerUncheckedUpdateManyWithoutHorseInput>
  }

  export type RaceCreateWithoutRunnersInput = {
    id?: string
    raceNumber: number
    name: string
    startTime: Date | string
    toteStartTime?: Date | string | null
    distance: number
    trackCondition?: string | null
    weather?: string | null
    status: string
    country: string
    state?: string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: Date | string
    updatedAt?: Date | string
    meeting: MeetingCreateNestedOneWithoutRacesInput
    scrapes?: ScrapeCreateNestedManyWithoutRaceInput
    results?: ResultCreateNestedManyWithoutRaceInput
    dividends?: DividendCreateNestedManyWithoutRaceInput
  }

  export type RaceUncheckedCreateWithoutRunnersInput = {
    id?: string
    meetingId: string
    raceNumber: number
    name: string
    startTime: Date | string
    toteStartTime?: Date | string | null
    distance: number
    trackCondition?: string | null
    weather?: string | null
    status: string
    country: string
    state?: string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: Date | string
    updatedAt?: Date | string
    scrapes?: ScrapeUncheckedCreateNestedManyWithoutRaceInput
    results?: ResultUncheckedCreateNestedManyWithoutRaceInput
    dividends?: DividendUncheckedCreateNestedManyWithoutRaceInput
  }

  export type RaceCreateOrConnectWithoutRunnersInput = {
    where: RaceWhereUniqueInput
    create: XOR<RaceCreateWithoutRunnersInput, RaceUncheckedCreateWithoutRunnersInput>
  }

  export type HorseCreateWithoutRunnersInput = {
    id?: string
    tabEntrantId?: string | null
    tabHorseId?: number | null
    harnessNzHorseId?: bigint | number | null
    name: string
    normalizedName: string
    sire?: string | null
    dam?: string | null
    damSire?: string | null
    sex?: string | null
    colour?: string | null
    country?: string | null
    firstSeen?: Date | string
    lastSeen?: Date | string
    raceCount?: number
  }

  export type HorseUncheckedCreateWithoutRunnersInput = {
    id?: string
    tabEntrantId?: string | null
    tabHorseId?: number | null
    harnessNzHorseId?: bigint | number | null
    name: string
    normalizedName: string
    sire?: string | null
    dam?: string | null
    damSire?: string | null
    sex?: string | null
    colour?: string | null
    country?: string | null
    firstSeen?: Date | string
    lastSeen?: Date | string
    raceCount?: number
  }

  export type HorseCreateOrConnectWithoutRunnersInput = {
    where: HorseWhereUniqueInput
    create: XOR<HorseCreateWithoutRunnersInput, HorseUncheckedCreateWithoutRunnersInput>
  }

  export type ResultCreateWithoutRunnerInput = {
    id?: string
    finishPosition?: number | null
    margin?: Decimal | DecimalJsLike | number | string | null
    raceTime?: Decimal | DecimalJsLike | number | string | null
    winDividend?: Decimal | DecimalJsLike | number | string | null
    placeDividend?: Decimal | DecimalJsLike | number | string | null
    official?: boolean
    disqualified?: boolean
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: Date | string
    race: RaceCreateNestedOneWithoutResultsInput
  }

  export type ResultUncheckedCreateWithoutRunnerInput = {
    id?: string
    raceId: string
    finishPosition?: number | null
    margin?: Decimal | DecimalJsLike | number | string | null
    raceTime?: Decimal | DecimalJsLike | number | string | null
    winDividend?: Decimal | DecimalJsLike | number | string | null
    placeDividend?: Decimal | DecimalJsLike | number | string | null
    official?: boolean
    disqualified?: boolean
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: Date | string
  }

  export type ResultCreateOrConnectWithoutRunnerInput = {
    where: ResultWhereUniqueInput
    create: XOR<ResultCreateWithoutRunnerInput, ResultUncheckedCreateWithoutRunnerInput>
  }

  export type ResultCreateManyRunnerInputEnvelope = {
    data: ResultCreateManyRunnerInput | ResultCreateManyRunnerInput[]
    skipDuplicates?: boolean
  }

  export type OddsSnapshotCreateWithoutRunnerInput = {
    id?: string
    snapshotType: string
    fixedWin?: Decimal | DecimalJsLike | number | string | null
    fixedPlace?: Decimal | DecimalJsLike | number | string | null
    poolWin?: Decimal | DecimalJsLike | number | string | null
    poolPlace?: Decimal | DecimalJsLike | number | string | null
    capturedAt?: Date | string
  }

  export type OddsSnapshotUncheckedCreateWithoutRunnerInput = {
    id?: string
    snapshotType: string
    fixedWin?: Decimal | DecimalJsLike | number | string | null
    fixedPlace?: Decimal | DecimalJsLike | number | string | null
    poolWin?: Decimal | DecimalJsLike | number | string | null
    poolPlace?: Decimal | DecimalJsLike | number | string | null
    capturedAt?: Date | string
  }

  export type OddsSnapshotCreateOrConnectWithoutRunnerInput = {
    where: OddsSnapshotWhereUniqueInput
    create: XOR<OddsSnapshotCreateWithoutRunnerInput, OddsSnapshotUncheckedCreateWithoutRunnerInput>
  }

  export type OddsSnapshotCreateManyRunnerInputEnvelope = {
    data: OddsSnapshotCreateManyRunnerInput | OddsSnapshotCreateManyRunnerInput[]
    skipDuplicates?: boolean
  }

  export type RaceUpsertWithoutRunnersInput = {
    update: XOR<RaceUpdateWithoutRunnersInput, RaceUncheckedUpdateWithoutRunnersInput>
    create: XOR<RaceCreateWithoutRunnersInput, RaceUncheckedCreateWithoutRunnersInput>
    where?: RaceWhereInput
  }

  export type RaceUpdateToOneWithWhereWithoutRunnersInput = {
    where?: RaceWhereInput
    data: XOR<RaceUpdateWithoutRunnersInput, RaceUncheckedUpdateWithoutRunnersInput>
  }

  export type RaceUpdateWithoutRunnersInput = {
    id?: StringFieldUpdateOperationsInput | string
    raceNumber?: IntFieldUpdateOperationsInput | number
    name?: StringFieldUpdateOperationsInput | string
    startTime?: DateTimeFieldUpdateOperationsInput | Date | string
    toteStartTime?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    distance?: IntFieldUpdateOperationsInput | number
    trackCondition?: NullableStringFieldUpdateOperationsInput | string | null
    weather?: NullableStringFieldUpdateOperationsInput | string | null
    status?: StringFieldUpdateOperationsInput | string
    country?: StringFieldUpdateOperationsInput | string
    state?: NullableStringFieldUpdateOperationsInput | string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    meeting?: MeetingUpdateOneRequiredWithoutRacesNestedInput
    scrapes?: ScrapeUpdateManyWithoutRaceNestedInput
    results?: ResultUpdateManyWithoutRaceNestedInput
    dividends?: DividendUpdateManyWithoutRaceNestedInput
  }

  export type RaceUncheckedUpdateWithoutRunnersInput = {
    id?: StringFieldUpdateOperationsInput | string
    meetingId?: StringFieldUpdateOperationsInput | string
    raceNumber?: IntFieldUpdateOperationsInput | number
    name?: StringFieldUpdateOperationsInput | string
    startTime?: DateTimeFieldUpdateOperationsInput | Date | string
    toteStartTime?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    distance?: IntFieldUpdateOperationsInput | number
    trackCondition?: NullableStringFieldUpdateOperationsInput | string | null
    weather?: NullableStringFieldUpdateOperationsInput | string | null
    status?: StringFieldUpdateOperationsInput | string
    country?: StringFieldUpdateOperationsInput | string
    state?: NullableStringFieldUpdateOperationsInput | string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    scrapes?: ScrapeUncheckedUpdateManyWithoutRaceNestedInput
    results?: ResultUncheckedUpdateManyWithoutRaceNestedInput
    dividends?: DividendUncheckedUpdateManyWithoutRaceNestedInput
  }

  export type HorseUpsertWithoutRunnersInput = {
    update: XOR<HorseUpdateWithoutRunnersInput, HorseUncheckedUpdateWithoutRunnersInput>
    create: XOR<HorseCreateWithoutRunnersInput, HorseUncheckedCreateWithoutRunnersInput>
    where?: HorseWhereInput
  }

  export type HorseUpdateToOneWithWhereWithoutRunnersInput = {
    where?: HorseWhereInput
    data: XOR<HorseUpdateWithoutRunnersInput, HorseUncheckedUpdateWithoutRunnersInput>
  }

  export type HorseUpdateWithoutRunnersInput = {
    id?: StringFieldUpdateOperationsInput | string
    tabEntrantId?: NullableStringFieldUpdateOperationsInput | string | null
    tabHorseId?: NullableIntFieldUpdateOperationsInput | number | null
    harnessNzHorseId?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    name?: StringFieldUpdateOperationsInput | string
    normalizedName?: StringFieldUpdateOperationsInput | string
    sire?: NullableStringFieldUpdateOperationsInput | string | null
    dam?: NullableStringFieldUpdateOperationsInput | string | null
    damSire?: NullableStringFieldUpdateOperationsInput | string | null
    sex?: NullableStringFieldUpdateOperationsInput | string | null
    colour?: NullableStringFieldUpdateOperationsInput | string | null
    country?: NullableStringFieldUpdateOperationsInput | string | null
    firstSeen?: DateTimeFieldUpdateOperationsInput | Date | string
    lastSeen?: DateTimeFieldUpdateOperationsInput | Date | string
    raceCount?: IntFieldUpdateOperationsInput | number
  }

  export type HorseUncheckedUpdateWithoutRunnersInput = {
    id?: StringFieldUpdateOperationsInput | string
    tabEntrantId?: NullableStringFieldUpdateOperationsInput | string | null
    tabHorseId?: NullableIntFieldUpdateOperationsInput | number | null
    harnessNzHorseId?: NullableBigIntFieldUpdateOperationsInput | bigint | number | null
    name?: StringFieldUpdateOperationsInput | string
    normalizedName?: StringFieldUpdateOperationsInput | string
    sire?: NullableStringFieldUpdateOperationsInput | string | null
    dam?: NullableStringFieldUpdateOperationsInput | string | null
    damSire?: NullableStringFieldUpdateOperationsInput | string | null
    sex?: NullableStringFieldUpdateOperationsInput | string | null
    colour?: NullableStringFieldUpdateOperationsInput | string | null
    country?: NullableStringFieldUpdateOperationsInput | string | null
    firstSeen?: DateTimeFieldUpdateOperationsInput | Date | string
    lastSeen?: DateTimeFieldUpdateOperationsInput | Date | string
    raceCount?: IntFieldUpdateOperationsInput | number
  }

  export type ResultUpsertWithWhereUniqueWithoutRunnerInput = {
    where: ResultWhereUniqueInput
    update: XOR<ResultUpdateWithoutRunnerInput, ResultUncheckedUpdateWithoutRunnerInput>
    create: XOR<ResultCreateWithoutRunnerInput, ResultUncheckedCreateWithoutRunnerInput>
  }

  export type ResultUpdateWithWhereUniqueWithoutRunnerInput = {
    where: ResultWhereUniqueInput
    data: XOR<ResultUpdateWithoutRunnerInput, ResultUncheckedUpdateWithoutRunnerInput>
  }

  export type ResultUpdateManyWithWhereWithoutRunnerInput = {
    where: ResultScalarWhereInput
    data: XOR<ResultUpdateManyMutationInput, ResultUncheckedUpdateManyWithoutRunnerInput>
  }

  export type OddsSnapshotUpsertWithWhereUniqueWithoutRunnerInput = {
    where: OddsSnapshotWhereUniqueInput
    update: XOR<OddsSnapshotUpdateWithoutRunnerInput, OddsSnapshotUncheckedUpdateWithoutRunnerInput>
    create: XOR<OddsSnapshotCreateWithoutRunnerInput, OddsSnapshotUncheckedCreateWithoutRunnerInput>
  }

  export type OddsSnapshotUpdateWithWhereUniqueWithoutRunnerInput = {
    where: OddsSnapshotWhereUniqueInput
    data: XOR<OddsSnapshotUpdateWithoutRunnerInput, OddsSnapshotUncheckedUpdateWithoutRunnerInput>
  }

  export type OddsSnapshotUpdateManyWithWhereWithoutRunnerInput = {
    where: OddsSnapshotScalarWhereInput
    data: XOR<OddsSnapshotUpdateManyMutationInput, OddsSnapshotUncheckedUpdateManyWithoutRunnerInput>
  }

  export type OddsSnapshotScalarWhereInput = {
    AND?: OddsSnapshotScalarWhereInput | OddsSnapshotScalarWhereInput[]
    OR?: OddsSnapshotScalarWhereInput[]
    NOT?: OddsSnapshotScalarWhereInput | OddsSnapshotScalarWhereInput[]
    id?: UuidFilter<"OddsSnapshot"> | string
    runnerId?: UuidFilter<"OddsSnapshot"> | string
    snapshotType?: StringFilter<"OddsSnapshot"> | string
    fixedWin?: DecimalNullableFilter<"OddsSnapshot"> | Decimal | DecimalJsLike | number | string | null
    fixedPlace?: DecimalNullableFilter<"OddsSnapshot"> | Decimal | DecimalJsLike | number | string | null
    poolWin?: DecimalNullableFilter<"OddsSnapshot"> | Decimal | DecimalJsLike | number | string | null
    poolPlace?: DecimalNullableFilter<"OddsSnapshot"> | Decimal | DecimalJsLike | number | string | null
    capturedAt?: DateTimeFilter<"OddsSnapshot"> | Date | string
  }

  export type RaceCreateWithoutResultsInput = {
    id?: string
    raceNumber: number
    name: string
    startTime: Date | string
    toteStartTime?: Date | string | null
    distance: number
    trackCondition?: string | null
    weather?: string | null
    status: string
    country: string
    state?: string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: Date | string
    updatedAt?: Date | string
    meeting: MeetingCreateNestedOneWithoutRacesInput
    runners?: RunnerCreateNestedManyWithoutRaceInput
    scrapes?: ScrapeCreateNestedManyWithoutRaceInput
    dividends?: DividendCreateNestedManyWithoutRaceInput
  }

  export type RaceUncheckedCreateWithoutResultsInput = {
    id?: string
    meetingId: string
    raceNumber: number
    name: string
    startTime: Date | string
    toteStartTime?: Date | string | null
    distance: number
    trackCondition?: string | null
    weather?: string | null
    status: string
    country: string
    state?: string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: Date | string
    updatedAt?: Date | string
    runners?: RunnerUncheckedCreateNestedManyWithoutRaceInput
    scrapes?: ScrapeUncheckedCreateNestedManyWithoutRaceInput
    dividends?: DividendUncheckedCreateNestedManyWithoutRaceInput
  }

  export type RaceCreateOrConnectWithoutResultsInput = {
    where: RaceWhereUniqueInput
    create: XOR<RaceCreateWithoutResultsInput, RaceUncheckedCreateWithoutResultsInput>
  }

  export type RunnerCreateWithoutResultsInput = {
    id?: string
    runnerNumber: number
    entrantId?: string | null
    horseName: string
    tabHorseIdLegacy?: string | null
    barrier?: number | null
    weight?: Decimal | DecimalJsLike | number | string | null
    jockeyName?: string | null
    jockeyId?: string | null
    jockeyWeightAllowance?: Decimal | DecimalJsLike | number | string | null
    trainerName?: string | null
    trainerId?: string | null
    trainerLocation?: string | null
    form?: string | null
    lastStarts?: NullableJsonNullValueInput | InputJsonValue
    lastTwentyStarts?: string | null
    age?: number | null
    silkColours?: string | null
    scratched?: boolean
    scratchedAt?: Date | string | null
    openingOdds?: Decimal | DecimalJsLike | number | string | null
    currentOdds?: Decimal | DecimalJsLike | number | string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: Date | string
    updatedAt?: Date | string
    race: RaceCreateNestedOneWithoutRunnersInput
    horse?: HorseCreateNestedOneWithoutRunnersInput
    oddsSnapshots?: OddsSnapshotCreateNestedManyWithoutRunnerInput
  }

  export type RunnerUncheckedCreateWithoutResultsInput = {
    id?: string
    raceId: string
    runnerNumber: number
    entrantId?: string | null
    horseName: string
    tabHorseIdLegacy?: string | null
    horseId?: string | null
    barrier?: number | null
    weight?: Decimal | DecimalJsLike | number | string | null
    jockeyName?: string | null
    jockeyId?: string | null
    jockeyWeightAllowance?: Decimal | DecimalJsLike | number | string | null
    trainerName?: string | null
    trainerId?: string | null
    trainerLocation?: string | null
    form?: string | null
    lastStarts?: NullableJsonNullValueInput | InputJsonValue
    lastTwentyStarts?: string | null
    age?: number | null
    silkColours?: string | null
    scratched?: boolean
    scratchedAt?: Date | string | null
    openingOdds?: Decimal | DecimalJsLike | number | string | null
    currentOdds?: Decimal | DecimalJsLike | number | string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: Date | string
    updatedAt?: Date | string
    oddsSnapshots?: OddsSnapshotUncheckedCreateNestedManyWithoutRunnerInput
  }

  export type RunnerCreateOrConnectWithoutResultsInput = {
    where: RunnerWhereUniqueInput
    create: XOR<RunnerCreateWithoutResultsInput, RunnerUncheckedCreateWithoutResultsInput>
  }

  export type RaceUpsertWithoutResultsInput = {
    update: XOR<RaceUpdateWithoutResultsInput, RaceUncheckedUpdateWithoutResultsInput>
    create: XOR<RaceCreateWithoutResultsInput, RaceUncheckedCreateWithoutResultsInput>
    where?: RaceWhereInput
  }

  export type RaceUpdateToOneWithWhereWithoutResultsInput = {
    where?: RaceWhereInput
    data: XOR<RaceUpdateWithoutResultsInput, RaceUncheckedUpdateWithoutResultsInput>
  }

  export type RaceUpdateWithoutResultsInput = {
    id?: StringFieldUpdateOperationsInput | string
    raceNumber?: IntFieldUpdateOperationsInput | number
    name?: StringFieldUpdateOperationsInput | string
    startTime?: DateTimeFieldUpdateOperationsInput | Date | string
    toteStartTime?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    distance?: IntFieldUpdateOperationsInput | number
    trackCondition?: NullableStringFieldUpdateOperationsInput | string | null
    weather?: NullableStringFieldUpdateOperationsInput | string | null
    status?: StringFieldUpdateOperationsInput | string
    country?: StringFieldUpdateOperationsInput | string
    state?: NullableStringFieldUpdateOperationsInput | string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    meeting?: MeetingUpdateOneRequiredWithoutRacesNestedInput
    runners?: RunnerUpdateManyWithoutRaceNestedInput
    scrapes?: ScrapeUpdateManyWithoutRaceNestedInput
    dividends?: DividendUpdateManyWithoutRaceNestedInput
  }

  export type RaceUncheckedUpdateWithoutResultsInput = {
    id?: StringFieldUpdateOperationsInput | string
    meetingId?: StringFieldUpdateOperationsInput | string
    raceNumber?: IntFieldUpdateOperationsInput | number
    name?: StringFieldUpdateOperationsInput | string
    startTime?: DateTimeFieldUpdateOperationsInput | Date | string
    toteStartTime?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    distance?: IntFieldUpdateOperationsInput | number
    trackCondition?: NullableStringFieldUpdateOperationsInput | string | null
    weather?: NullableStringFieldUpdateOperationsInput | string | null
    status?: StringFieldUpdateOperationsInput | string
    country?: StringFieldUpdateOperationsInput | string
    state?: NullableStringFieldUpdateOperationsInput | string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    runners?: RunnerUncheckedUpdateManyWithoutRaceNestedInput
    scrapes?: ScrapeUncheckedUpdateManyWithoutRaceNestedInput
    dividends?: DividendUncheckedUpdateManyWithoutRaceNestedInput
  }

  export type RunnerUpsertWithoutResultsInput = {
    update: XOR<RunnerUpdateWithoutResultsInput, RunnerUncheckedUpdateWithoutResultsInput>
    create: XOR<RunnerCreateWithoutResultsInput, RunnerUncheckedCreateWithoutResultsInput>
    where?: RunnerWhereInput
  }

  export type RunnerUpdateToOneWithWhereWithoutResultsInput = {
    where?: RunnerWhereInput
    data: XOR<RunnerUpdateWithoutResultsInput, RunnerUncheckedUpdateWithoutResultsInput>
  }

  export type RunnerUpdateWithoutResultsInput = {
    id?: StringFieldUpdateOperationsInput | string
    runnerNumber?: IntFieldUpdateOperationsInput | number
    entrantId?: NullableStringFieldUpdateOperationsInput | string | null
    horseName?: StringFieldUpdateOperationsInput | string
    tabHorseIdLegacy?: NullableStringFieldUpdateOperationsInput | string | null
    barrier?: NullableIntFieldUpdateOperationsInput | number | null
    weight?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    jockeyName?: NullableStringFieldUpdateOperationsInput | string | null
    jockeyId?: NullableStringFieldUpdateOperationsInput | string | null
    jockeyWeightAllowance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    trainerName?: NullableStringFieldUpdateOperationsInput | string | null
    trainerId?: NullableStringFieldUpdateOperationsInput | string | null
    trainerLocation?: NullableStringFieldUpdateOperationsInput | string | null
    form?: NullableStringFieldUpdateOperationsInput | string | null
    lastStarts?: NullableJsonNullValueInput | InputJsonValue
    lastTwentyStarts?: NullableStringFieldUpdateOperationsInput | string | null
    age?: NullableIntFieldUpdateOperationsInput | number | null
    silkColours?: NullableStringFieldUpdateOperationsInput | string | null
    scratched?: BoolFieldUpdateOperationsInput | boolean
    scratchedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    openingOdds?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    currentOdds?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    race?: RaceUpdateOneRequiredWithoutRunnersNestedInput
    horse?: HorseUpdateOneWithoutRunnersNestedInput
    oddsSnapshots?: OddsSnapshotUpdateManyWithoutRunnerNestedInput
  }

  export type RunnerUncheckedUpdateWithoutResultsInput = {
    id?: StringFieldUpdateOperationsInput | string
    raceId?: StringFieldUpdateOperationsInput | string
    runnerNumber?: IntFieldUpdateOperationsInput | number
    entrantId?: NullableStringFieldUpdateOperationsInput | string | null
    horseName?: StringFieldUpdateOperationsInput | string
    tabHorseIdLegacy?: NullableStringFieldUpdateOperationsInput | string | null
    horseId?: NullableStringFieldUpdateOperationsInput | string | null
    barrier?: NullableIntFieldUpdateOperationsInput | number | null
    weight?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    jockeyName?: NullableStringFieldUpdateOperationsInput | string | null
    jockeyId?: NullableStringFieldUpdateOperationsInput | string | null
    jockeyWeightAllowance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    trainerName?: NullableStringFieldUpdateOperationsInput | string | null
    trainerId?: NullableStringFieldUpdateOperationsInput | string | null
    trainerLocation?: NullableStringFieldUpdateOperationsInput | string | null
    form?: NullableStringFieldUpdateOperationsInput | string | null
    lastStarts?: NullableJsonNullValueInput | InputJsonValue
    lastTwentyStarts?: NullableStringFieldUpdateOperationsInput | string | null
    age?: NullableIntFieldUpdateOperationsInput | number | null
    silkColours?: NullableStringFieldUpdateOperationsInput | string | null
    scratched?: BoolFieldUpdateOperationsInput | boolean
    scratchedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    openingOdds?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    currentOdds?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    oddsSnapshots?: OddsSnapshotUncheckedUpdateManyWithoutRunnerNestedInput
  }

  export type RaceCreateWithoutScrapesInput = {
    id?: string
    raceNumber: number
    name: string
    startTime: Date | string
    toteStartTime?: Date | string | null
    distance: number
    trackCondition?: string | null
    weather?: string | null
    status: string
    country: string
    state?: string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: Date | string
    updatedAt?: Date | string
    meeting: MeetingCreateNestedOneWithoutRacesInput
    runners?: RunnerCreateNestedManyWithoutRaceInput
    results?: ResultCreateNestedManyWithoutRaceInput
    dividends?: DividendCreateNestedManyWithoutRaceInput
  }

  export type RaceUncheckedCreateWithoutScrapesInput = {
    id?: string
    meetingId: string
    raceNumber: number
    name: string
    startTime: Date | string
    toteStartTime?: Date | string | null
    distance: number
    trackCondition?: string | null
    weather?: string | null
    status: string
    country: string
    state?: string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: Date | string
    updatedAt?: Date | string
    runners?: RunnerUncheckedCreateNestedManyWithoutRaceInput
    results?: ResultUncheckedCreateNestedManyWithoutRaceInput
    dividends?: DividendUncheckedCreateNestedManyWithoutRaceInput
  }

  export type RaceCreateOrConnectWithoutScrapesInput = {
    where: RaceWhereUniqueInput
    create: XOR<RaceCreateWithoutScrapesInput, RaceUncheckedCreateWithoutScrapesInput>
  }

  export type JobRunCreateWithoutScrapesInput = {
    id?: string
    jobType: string
    status: string
    startedAt?: Date | string
    completedAt?: Date | string | null
    durationMs?: number | null
    itemsProcessed?: number
    itemsFailed?: number
    errorMessage?: string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    retryCount?: number
    parentJobRun?: JobRunCreateNestedOneWithoutRetryJobRunsInput
    retryJobRuns?: JobRunCreateNestedManyWithoutParentJobRunInput
  }

  export type JobRunUncheckedCreateWithoutScrapesInput = {
    id?: string
    jobType: string
    status: string
    startedAt?: Date | string
    completedAt?: Date | string | null
    durationMs?: number | null
    itemsProcessed?: number
    itemsFailed?: number
    errorMessage?: string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    retryCount?: number
    parentJobRunId?: string | null
    retryJobRuns?: JobRunUncheckedCreateNestedManyWithoutParentJobRunInput
  }

  export type JobRunCreateOrConnectWithoutScrapesInput = {
    where: JobRunWhereUniqueInput
    create: XOR<JobRunCreateWithoutScrapesInput, JobRunUncheckedCreateWithoutScrapesInput>
  }

  export type RaceUpsertWithoutScrapesInput = {
    update: XOR<RaceUpdateWithoutScrapesInput, RaceUncheckedUpdateWithoutScrapesInput>
    create: XOR<RaceCreateWithoutScrapesInput, RaceUncheckedCreateWithoutScrapesInput>
    where?: RaceWhereInput
  }

  export type RaceUpdateToOneWithWhereWithoutScrapesInput = {
    where?: RaceWhereInput
    data: XOR<RaceUpdateWithoutScrapesInput, RaceUncheckedUpdateWithoutScrapesInput>
  }

  export type RaceUpdateWithoutScrapesInput = {
    id?: StringFieldUpdateOperationsInput | string
    raceNumber?: IntFieldUpdateOperationsInput | number
    name?: StringFieldUpdateOperationsInput | string
    startTime?: DateTimeFieldUpdateOperationsInput | Date | string
    toteStartTime?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    distance?: IntFieldUpdateOperationsInput | number
    trackCondition?: NullableStringFieldUpdateOperationsInput | string | null
    weather?: NullableStringFieldUpdateOperationsInput | string | null
    status?: StringFieldUpdateOperationsInput | string
    country?: StringFieldUpdateOperationsInput | string
    state?: NullableStringFieldUpdateOperationsInput | string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    meeting?: MeetingUpdateOneRequiredWithoutRacesNestedInput
    runners?: RunnerUpdateManyWithoutRaceNestedInput
    results?: ResultUpdateManyWithoutRaceNestedInput
    dividends?: DividendUpdateManyWithoutRaceNestedInput
  }

  export type RaceUncheckedUpdateWithoutScrapesInput = {
    id?: StringFieldUpdateOperationsInput | string
    meetingId?: StringFieldUpdateOperationsInput | string
    raceNumber?: IntFieldUpdateOperationsInput | number
    name?: StringFieldUpdateOperationsInput | string
    startTime?: DateTimeFieldUpdateOperationsInput | Date | string
    toteStartTime?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    distance?: IntFieldUpdateOperationsInput | number
    trackCondition?: NullableStringFieldUpdateOperationsInput | string | null
    weather?: NullableStringFieldUpdateOperationsInput | string | null
    status?: StringFieldUpdateOperationsInput | string
    country?: StringFieldUpdateOperationsInput | string
    state?: NullableStringFieldUpdateOperationsInput | string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    runners?: RunnerUncheckedUpdateManyWithoutRaceNestedInput
    results?: ResultUncheckedUpdateManyWithoutRaceNestedInput
    dividends?: DividendUncheckedUpdateManyWithoutRaceNestedInput
  }

  export type JobRunUpsertWithoutScrapesInput = {
    update: XOR<JobRunUpdateWithoutScrapesInput, JobRunUncheckedUpdateWithoutScrapesInput>
    create: XOR<JobRunCreateWithoutScrapesInput, JobRunUncheckedCreateWithoutScrapesInput>
    where?: JobRunWhereInput
  }

  export type JobRunUpdateToOneWithWhereWithoutScrapesInput = {
    where?: JobRunWhereInput
    data: XOR<JobRunUpdateWithoutScrapesInput, JobRunUncheckedUpdateWithoutScrapesInput>
  }

  export type JobRunUpdateWithoutScrapesInput = {
    id?: StringFieldUpdateOperationsInput | string
    jobType?: StringFieldUpdateOperationsInput | string
    status?: StringFieldUpdateOperationsInput | string
    startedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    completedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    durationMs?: NullableIntFieldUpdateOperationsInput | number | null
    itemsProcessed?: IntFieldUpdateOperationsInput | number
    itemsFailed?: IntFieldUpdateOperationsInput | number
    errorMessage?: NullableStringFieldUpdateOperationsInput | string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    retryCount?: IntFieldUpdateOperationsInput | number
    parentJobRun?: JobRunUpdateOneWithoutRetryJobRunsNestedInput
    retryJobRuns?: JobRunUpdateManyWithoutParentJobRunNestedInput
  }

  export type JobRunUncheckedUpdateWithoutScrapesInput = {
    id?: StringFieldUpdateOperationsInput | string
    jobType?: StringFieldUpdateOperationsInput | string
    status?: StringFieldUpdateOperationsInput | string
    startedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    completedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    durationMs?: NullableIntFieldUpdateOperationsInput | number | null
    itemsProcessed?: IntFieldUpdateOperationsInput | number
    itemsFailed?: IntFieldUpdateOperationsInput | number
    errorMessage?: NullableStringFieldUpdateOperationsInput | string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    retryCount?: IntFieldUpdateOperationsInput | number
    parentJobRunId?: NullableStringFieldUpdateOperationsInput | string | null
    retryJobRuns?: JobRunUncheckedUpdateManyWithoutParentJobRunNestedInput
  }

  export type ScrapeCreateWithoutJobRunInput = {
    id?: string
    scrapeType: string
    scrapedAt?: Date | string
    changesDetected?: NullableJsonNullValueInput | InputJsonValue
    success?: boolean
    errorMessage?: string | null
    race: RaceCreateNestedOneWithoutScrapesInput
  }

  export type ScrapeUncheckedCreateWithoutJobRunInput = {
    id?: string
    raceId: string
    scrapeType: string
    scrapedAt?: Date | string
    changesDetected?: NullableJsonNullValueInput | InputJsonValue
    success?: boolean
    errorMessage?: string | null
  }

  export type ScrapeCreateOrConnectWithoutJobRunInput = {
    where: ScrapeWhereUniqueInput
    create: XOR<ScrapeCreateWithoutJobRunInput, ScrapeUncheckedCreateWithoutJobRunInput>
  }

  export type ScrapeCreateManyJobRunInputEnvelope = {
    data: ScrapeCreateManyJobRunInput | ScrapeCreateManyJobRunInput[]
    skipDuplicates?: boolean
  }

  export type JobRunCreateWithoutRetryJobRunsInput = {
    id?: string
    jobType: string
    status: string
    startedAt?: Date | string
    completedAt?: Date | string | null
    durationMs?: number | null
    itemsProcessed?: number
    itemsFailed?: number
    errorMessage?: string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    retryCount?: number
    scrapes?: ScrapeCreateNestedManyWithoutJobRunInput
    parentJobRun?: JobRunCreateNestedOneWithoutRetryJobRunsInput
  }

  export type JobRunUncheckedCreateWithoutRetryJobRunsInput = {
    id?: string
    jobType: string
    status: string
    startedAt?: Date | string
    completedAt?: Date | string | null
    durationMs?: number | null
    itemsProcessed?: number
    itemsFailed?: number
    errorMessage?: string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    retryCount?: number
    parentJobRunId?: string | null
    scrapes?: ScrapeUncheckedCreateNestedManyWithoutJobRunInput
  }

  export type JobRunCreateOrConnectWithoutRetryJobRunsInput = {
    where: JobRunWhereUniqueInput
    create: XOR<JobRunCreateWithoutRetryJobRunsInput, JobRunUncheckedCreateWithoutRetryJobRunsInput>
  }

  export type JobRunCreateWithoutParentJobRunInput = {
    id?: string
    jobType: string
    status: string
    startedAt?: Date | string
    completedAt?: Date | string | null
    durationMs?: number | null
    itemsProcessed?: number
    itemsFailed?: number
    errorMessage?: string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    retryCount?: number
    scrapes?: ScrapeCreateNestedManyWithoutJobRunInput
    retryJobRuns?: JobRunCreateNestedManyWithoutParentJobRunInput
  }

  export type JobRunUncheckedCreateWithoutParentJobRunInput = {
    id?: string
    jobType: string
    status: string
    startedAt?: Date | string
    completedAt?: Date | string | null
    durationMs?: number | null
    itemsProcessed?: number
    itemsFailed?: number
    errorMessage?: string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    retryCount?: number
    scrapes?: ScrapeUncheckedCreateNestedManyWithoutJobRunInput
    retryJobRuns?: JobRunUncheckedCreateNestedManyWithoutParentJobRunInput
  }

  export type JobRunCreateOrConnectWithoutParentJobRunInput = {
    where: JobRunWhereUniqueInput
    create: XOR<JobRunCreateWithoutParentJobRunInput, JobRunUncheckedCreateWithoutParentJobRunInput>
  }

  export type JobRunCreateManyParentJobRunInputEnvelope = {
    data: JobRunCreateManyParentJobRunInput | JobRunCreateManyParentJobRunInput[]
    skipDuplicates?: boolean
  }

  export type ScrapeUpsertWithWhereUniqueWithoutJobRunInput = {
    where: ScrapeWhereUniqueInput
    update: XOR<ScrapeUpdateWithoutJobRunInput, ScrapeUncheckedUpdateWithoutJobRunInput>
    create: XOR<ScrapeCreateWithoutJobRunInput, ScrapeUncheckedCreateWithoutJobRunInput>
  }

  export type ScrapeUpdateWithWhereUniqueWithoutJobRunInput = {
    where: ScrapeWhereUniqueInput
    data: XOR<ScrapeUpdateWithoutJobRunInput, ScrapeUncheckedUpdateWithoutJobRunInput>
  }

  export type ScrapeUpdateManyWithWhereWithoutJobRunInput = {
    where: ScrapeScalarWhereInput
    data: XOR<ScrapeUpdateManyMutationInput, ScrapeUncheckedUpdateManyWithoutJobRunInput>
  }

  export type JobRunUpsertWithoutRetryJobRunsInput = {
    update: XOR<JobRunUpdateWithoutRetryJobRunsInput, JobRunUncheckedUpdateWithoutRetryJobRunsInput>
    create: XOR<JobRunCreateWithoutRetryJobRunsInput, JobRunUncheckedCreateWithoutRetryJobRunsInput>
    where?: JobRunWhereInput
  }

  export type JobRunUpdateToOneWithWhereWithoutRetryJobRunsInput = {
    where?: JobRunWhereInput
    data: XOR<JobRunUpdateWithoutRetryJobRunsInput, JobRunUncheckedUpdateWithoutRetryJobRunsInput>
  }

  export type JobRunUpdateWithoutRetryJobRunsInput = {
    id?: StringFieldUpdateOperationsInput | string
    jobType?: StringFieldUpdateOperationsInput | string
    status?: StringFieldUpdateOperationsInput | string
    startedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    completedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    durationMs?: NullableIntFieldUpdateOperationsInput | number | null
    itemsProcessed?: IntFieldUpdateOperationsInput | number
    itemsFailed?: IntFieldUpdateOperationsInput | number
    errorMessage?: NullableStringFieldUpdateOperationsInput | string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    retryCount?: IntFieldUpdateOperationsInput | number
    scrapes?: ScrapeUpdateManyWithoutJobRunNestedInput
    parentJobRun?: JobRunUpdateOneWithoutRetryJobRunsNestedInput
  }

  export type JobRunUncheckedUpdateWithoutRetryJobRunsInput = {
    id?: StringFieldUpdateOperationsInput | string
    jobType?: StringFieldUpdateOperationsInput | string
    status?: StringFieldUpdateOperationsInput | string
    startedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    completedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    durationMs?: NullableIntFieldUpdateOperationsInput | number | null
    itemsProcessed?: IntFieldUpdateOperationsInput | number
    itemsFailed?: IntFieldUpdateOperationsInput | number
    errorMessage?: NullableStringFieldUpdateOperationsInput | string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    retryCount?: IntFieldUpdateOperationsInput | number
    parentJobRunId?: NullableStringFieldUpdateOperationsInput | string | null
    scrapes?: ScrapeUncheckedUpdateManyWithoutJobRunNestedInput
  }

  export type JobRunUpsertWithWhereUniqueWithoutParentJobRunInput = {
    where: JobRunWhereUniqueInput
    update: XOR<JobRunUpdateWithoutParentJobRunInput, JobRunUncheckedUpdateWithoutParentJobRunInput>
    create: XOR<JobRunCreateWithoutParentJobRunInput, JobRunUncheckedCreateWithoutParentJobRunInput>
  }

  export type JobRunUpdateWithWhereUniqueWithoutParentJobRunInput = {
    where: JobRunWhereUniqueInput
    data: XOR<JobRunUpdateWithoutParentJobRunInput, JobRunUncheckedUpdateWithoutParentJobRunInput>
  }

  export type JobRunUpdateManyWithWhereWithoutParentJobRunInput = {
    where: JobRunScalarWhereInput
    data: XOR<JobRunUpdateManyMutationInput, JobRunUncheckedUpdateManyWithoutParentJobRunInput>
  }

  export type JobRunScalarWhereInput = {
    AND?: JobRunScalarWhereInput | JobRunScalarWhereInput[]
    OR?: JobRunScalarWhereInput[]
    NOT?: JobRunScalarWhereInput | JobRunScalarWhereInput[]
    id?: UuidFilter<"JobRun"> | string
    jobType?: StringFilter<"JobRun"> | string
    status?: StringFilter<"JobRun"> | string
    startedAt?: DateTimeFilter<"JobRun"> | Date | string
    completedAt?: DateTimeNullableFilter<"JobRun"> | Date | string | null
    durationMs?: IntNullableFilter<"JobRun"> | number | null
    itemsProcessed?: IntFilter<"JobRun"> | number
    itemsFailed?: IntFilter<"JobRun"> | number
    errorMessage?: StringNullableFilter<"JobRun"> | string | null
    metadata?: JsonNullableFilter<"JobRun">
    retryCount?: IntFilter<"JobRun"> | number
    parentJobRunId?: UuidNullableFilter<"JobRun"> | string | null
  }

  export type RaceCreateWithoutDividendsInput = {
    id?: string
    raceNumber: number
    name: string
    startTime: Date | string
    toteStartTime?: Date | string | null
    distance: number
    trackCondition?: string | null
    weather?: string | null
    status: string
    country: string
    state?: string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: Date | string
    updatedAt?: Date | string
    meeting: MeetingCreateNestedOneWithoutRacesInput
    runners?: RunnerCreateNestedManyWithoutRaceInput
    scrapes?: ScrapeCreateNestedManyWithoutRaceInput
    results?: ResultCreateNestedManyWithoutRaceInput
  }

  export type RaceUncheckedCreateWithoutDividendsInput = {
    id?: string
    meetingId: string
    raceNumber: number
    name: string
    startTime: Date | string
    toteStartTime?: Date | string | null
    distance: number
    trackCondition?: string | null
    weather?: string | null
    status: string
    country: string
    state?: string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: Date | string
    updatedAt?: Date | string
    runners?: RunnerUncheckedCreateNestedManyWithoutRaceInput
    scrapes?: ScrapeUncheckedCreateNestedManyWithoutRaceInput
    results?: ResultUncheckedCreateNestedManyWithoutRaceInput
  }

  export type RaceCreateOrConnectWithoutDividendsInput = {
    where: RaceWhereUniqueInput
    create: XOR<RaceCreateWithoutDividendsInput, RaceUncheckedCreateWithoutDividendsInput>
  }

  export type RaceUpsertWithoutDividendsInput = {
    update: XOR<RaceUpdateWithoutDividendsInput, RaceUncheckedUpdateWithoutDividendsInput>
    create: XOR<RaceCreateWithoutDividendsInput, RaceUncheckedCreateWithoutDividendsInput>
    where?: RaceWhereInput
  }

  export type RaceUpdateToOneWithWhereWithoutDividendsInput = {
    where?: RaceWhereInput
    data: XOR<RaceUpdateWithoutDividendsInput, RaceUncheckedUpdateWithoutDividendsInput>
  }

  export type RaceUpdateWithoutDividendsInput = {
    id?: StringFieldUpdateOperationsInput | string
    raceNumber?: IntFieldUpdateOperationsInput | number
    name?: StringFieldUpdateOperationsInput | string
    startTime?: DateTimeFieldUpdateOperationsInput | Date | string
    toteStartTime?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    distance?: IntFieldUpdateOperationsInput | number
    trackCondition?: NullableStringFieldUpdateOperationsInput | string | null
    weather?: NullableStringFieldUpdateOperationsInput | string | null
    status?: StringFieldUpdateOperationsInput | string
    country?: StringFieldUpdateOperationsInput | string
    state?: NullableStringFieldUpdateOperationsInput | string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    meeting?: MeetingUpdateOneRequiredWithoutRacesNestedInput
    runners?: RunnerUpdateManyWithoutRaceNestedInput
    scrapes?: ScrapeUpdateManyWithoutRaceNestedInput
    results?: ResultUpdateManyWithoutRaceNestedInput
  }

  export type RaceUncheckedUpdateWithoutDividendsInput = {
    id?: StringFieldUpdateOperationsInput | string
    meetingId?: StringFieldUpdateOperationsInput | string
    raceNumber?: IntFieldUpdateOperationsInput | number
    name?: StringFieldUpdateOperationsInput | string
    startTime?: DateTimeFieldUpdateOperationsInput | Date | string
    toteStartTime?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    distance?: IntFieldUpdateOperationsInput | number
    trackCondition?: NullableStringFieldUpdateOperationsInput | string | null
    weather?: NullableStringFieldUpdateOperationsInput | string | null
    status?: StringFieldUpdateOperationsInput | string
    country?: StringFieldUpdateOperationsInput | string
    state?: NullableStringFieldUpdateOperationsInput | string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    runners?: RunnerUncheckedUpdateManyWithoutRaceNestedInput
    scrapes?: ScrapeUncheckedUpdateManyWithoutRaceNestedInput
    results?: ResultUncheckedUpdateManyWithoutRaceNestedInput
  }

  export type RunnerCreateWithoutOddsSnapshotsInput = {
    id?: string
    runnerNumber: number
    entrantId?: string | null
    horseName: string
    tabHorseIdLegacy?: string | null
    barrier?: number | null
    weight?: Decimal | DecimalJsLike | number | string | null
    jockeyName?: string | null
    jockeyId?: string | null
    jockeyWeightAllowance?: Decimal | DecimalJsLike | number | string | null
    trainerName?: string | null
    trainerId?: string | null
    trainerLocation?: string | null
    form?: string | null
    lastStarts?: NullableJsonNullValueInput | InputJsonValue
    lastTwentyStarts?: string | null
    age?: number | null
    silkColours?: string | null
    scratched?: boolean
    scratchedAt?: Date | string | null
    openingOdds?: Decimal | DecimalJsLike | number | string | null
    currentOdds?: Decimal | DecimalJsLike | number | string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: Date | string
    updatedAt?: Date | string
    race: RaceCreateNestedOneWithoutRunnersInput
    horse?: HorseCreateNestedOneWithoutRunnersInput
    results?: ResultCreateNestedManyWithoutRunnerInput
  }

  export type RunnerUncheckedCreateWithoutOddsSnapshotsInput = {
    id?: string
    raceId: string
    runnerNumber: number
    entrantId?: string | null
    horseName: string
    tabHorseIdLegacy?: string | null
    horseId?: string | null
    barrier?: number | null
    weight?: Decimal | DecimalJsLike | number | string | null
    jockeyName?: string | null
    jockeyId?: string | null
    jockeyWeightAllowance?: Decimal | DecimalJsLike | number | string | null
    trainerName?: string | null
    trainerId?: string | null
    trainerLocation?: string | null
    form?: string | null
    lastStarts?: NullableJsonNullValueInput | InputJsonValue
    lastTwentyStarts?: string | null
    age?: number | null
    silkColours?: string | null
    scratched?: boolean
    scratchedAt?: Date | string | null
    openingOdds?: Decimal | DecimalJsLike | number | string | null
    currentOdds?: Decimal | DecimalJsLike | number | string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: Date | string
    updatedAt?: Date | string
    results?: ResultUncheckedCreateNestedManyWithoutRunnerInput
  }

  export type RunnerCreateOrConnectWithoutOddsSnapshotsInput = {
    where: RunnerWhereUniqueInput
    create: XOR<RunnerCreateWithoutOddsSnapshotsInput, RunnerUncheckedCreateWithoutOddsSnapshotsInput>
  }

  export type RunnerUpsertWithoutOddsSnapshotsInput = {
    update: XOR<RunnerUpdateWithoutOddsSnapshotsInput, RunnerUncheckedUpdateWithoutOddsSnapshotsInput>
    create: XOR<RunnerCreateWithoutOddsSnapshotsInput, RunnerUncheckedCreateWithoutOddsSnapshotsInput>
    where?: RunnerWhereInput
  }

  export type RunnerUpdateToOneWithWhereWithoutOddsSnapshotsInput = {
    where?: RunnerWhereInput
    data: XOR<RunnerUpdateWithoutOddsSnapshotsInput, RunnerUncheckedUpdateWithoutOddsSnapshotsInput>
  }

  export type RunnerUpdateWithoutOddsSnapshotsInput = {
    id?: StringFieldUpdateOperationsInput | string
    runnerNumber?: IntFieldUpdateOperationsInput | number
    entrantId?: NullableStringFieldUpdateOperationsInput | string | null
    horseName?: StringFieldUpdateOperationsInput | string
    tabHorseIdLegacy?: NullableStringFieldUpdateOperationsInput | string | null
    barrier?: NullableIntFieldUpdateOperationsInput | number | null
    weight?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    jockeyName?: NullableStringFieldUpdateOperationsInput | string | null
    jockeyId?: NullableStringFieldUpdateOperationsInput | string | null
    jockeyWeightAllowance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    trainerName?: NullableStringFieldUpdateOperationsInput | string | null
    trainerId?: NullableStringFieldUpdateOperationsInput | string | null
    trainerLocation?: NullableStringFieldUpdateOperationsInput | string | null
    form?: NullableStringFieldUpdateOperationsInput | string | null
    lastStarts?: NullableJsonNullValueInput | InputJsonValue
    lastTwentyStarts?: NullableStringFieldUpdateOperationsInput | string | null
    age?: NullableIntFieldUpdateOperationsInput | number | null
    silkColours?: NullableStringFieldUpdateOperationsInput | string | null
    scratched?: BoolFieldUpdateOperationsInput | boolean
    scratchedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    openingOdds?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    currentOdds?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    race?: RaceUpdateOneRequiredWithoutRunnersNestedInput
    horse?: HorseUpdateOneWithoutRunnersNestedInput
    results?: ResultUpdateManyWithoutRunnerNestedInput
  }

  export type RunnerUncheckedUpdateWithoutOddsSnapshotsInput = {
    id?: StringFieldUpdateOperationsInput | string
    raceId?: StringFieldUpdateOperationsInput | string
    runnerNumber?: IntFieldUpdateOperationsInput | number
    entrantId?: NullableStringFieldUpdateOperationsInput | string | null
    horseName?: StringFieldUpdateOperationsInput | string
    tabHorseIdLegacy?: NullableStringFieldUpdateOperationsInput | string | null
    horseId?: NullableStringFieldUpdateOperationsInput | string | null
    barrier?: NullableIntFieldUpdateOperationsInput | number | null
    weight?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    jockeyName?: NullableStringFieldUpdateOperationsInput | string | null
    jockeyId?: NullableStringFieldUpdateOperationsInput | string | null
    jockeyWeightAllowance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    trainerName?: NullableStringFieldUpdateOperationsInput | string | null
    trainerId?: NullableStringFieldUpdateOperationsInput | string | null
    trainerLocation?: NullableStringFieldUpdateOperationsInput | string | null
    form?: NullableStringFieldUpdateOperationsInput | string | null
    lastStarts?: NullableJsonNullValueInput | InputJsonValue
    lastTwentyStarts?: NullableStringFieldUpdateOperationsInput | string | null
    age?: NullableIntFieldUpdateOperationsInput | number | null
    silkColours?: NullableStringFieldUpdateOperationsInput | string | null
    scratched?: BoolFieldUpdateOperationsInput | boolean
    scratchedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    openingOdds?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    currentOdds?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    results?: ResultUncheckedUpdateManyWithoutRunnerNestedInput
  }

  export type RaceCreateManyMeetingInput = {
    id?: string
    raceNumber: number
    name: string
    startTime: Date | string
    toteStartTime?: Date | string | null
    distance: number
    trackCondition?: string | null
    weather?: string | null
    status: string
    country: string
    state?: string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type RaceUpdateWithoutMeetingInput = {
    id?: StringFieldUpdateOperationsInput | string
    raceNumber?: IntFieldUpdateOperationsInput | number
    name?: StringFieldUpdateOperationsInput | string
    startTime?: DateTimeFieldUpdateOperationsInput | Date | string
    toteStartTime?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    distance?: IntFieldUpdateOperationsInput | number
    trackCondition?: NullableStringFieldUpdateOperationsInput | string | null
    weather?: NullableStringFieldUpdateOperationsInput | string | null
    status?: StringFieldUpdateOperationsInput | string
    country?: StringFieldUpdateOperationsInput | string
    state?: NullableStringFieldUpdateOperationsInput | string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    runners?: RunnerUpdateManyWithoutRaceNestedInput
    scrapes?: ScrapeUpdateManyWithoutRaceNestedInput
    results?: ResultUpdateManyWithoutRaceNestedInput
    dividends?: DividendUpdateManyWithoutRaceNestedInput
  }

  export type RaceUncheckedUpdateWithoutMeetingInput = {
    id?: StringFieldUpdateOperationsInput | string
    raceNumber?: IntFieldUpdateOperationsInput | number
    name?: StringFieldUpdateOperationsInput | string
    startTime?: DateTimeFieldUpdateOperationsInput | Date | string
    toteStartTime?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    distance?: IntFieldUpdateOperationsInput | number
    trackCondition?: NullableStringFieldUpdateOperationsInput | string | null
    weather?: NullableStringFieldUpdateOperationsInput | string | null
    status?: StringFieldUpdateOperationsInput | string
    country?: StringFieldUpdateOperationsInput | string
    state?: NullableStringFieldUpdateOperationsInput | string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    runners?: RunnerUncheckedUpdateManyWithoutRaceNestedInput
    scrapes?: ScrapeUncheckedUpdateManyWithoutRaceNestedInput
    results?: ResultUncheckedUpdateManyWithoutRaceNestedInput
    dividends?: DividendUncheckedUpdateManyWithoutRaceNestedInput
  }

  export type RaceUncheckedUpdateManyWithoutMeetingInput = {
    id?: StringFieldUpdateOperationsInput | string
    raceNumber?: IntFieldUpdateOperationsInput | number
    name?: StringFieldUpdateOperationsInput | string
    startTime?: DateTimeFieldUpdateOperationsInput | Date | string
    toteStartTime?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    distance?: IntFieldUpdateOperationsInput | number
    trackCondition?: NullableStringFieldUpdateOperationsInput | string | null
    weather?: NullableStringFieldUpdateOperationsInput | string | null
    status?: StringFieldUpdateOperationsInput | string
    country?: StringFieldUpdateOperationsInput | string
    state?: NullableStringFieldUpdateOperationsInput | string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type RunnerCreateManyRaceInput = {
    id?: string
    runnerNumber: number
    entrantId?: string | null
    horseName: string
    tabHorseIdLegacy?: string | null
    horseId?: string | null
    barrier?: number | null
    weight?: Decimal | DecimalJsLike | number | string | null
    jockeyName?: string | null
    jockeyId?: string | null
    jockeyWeightAllowance?: Decimal | DecimalJsLike | number | string | null
    trainerName?: string | null
    trainerId?: string | null
    trainerLocation?: string | null
    form?: string | null
    lastStarts?: NullableJsonNullValueInput | InputJsonValue
    lastTwentyStarts?: string | null
    age?: number | null
    silkColours?: string | null
    scratched?: boolean
    scratchedAt?: Date | string | null
    openingOdds?: Decimal | DecimalJsLike | number | string | null
    currentOdds?: Decimal | DecimalJsLike | number | string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type ScrapeCreateManyRaceInput = {
    id?: string
    scrapeType: string
    scrapedAt?: Date | string
    changesDetected?: NullableJsonNullValueInput | InputJsonValue
    success?: boolean
    errorMessage?: string | null
    jobRunId?: string | null
  }

  export type ResultCreateManyRaceInput = {
    id?: string
    runnerId: string
    finishPosition?: number | null
    margin?: Decimal | DecimalJsLike | number | string | null
    raceTime?: Decimal | DecimalJsLike | number | string | null
    winDividend?: Decimal | DecimalJsLike | number | string | null
    placeDividend?: Decimal | DecimalJsLike | number | string | null
    official?: boolean
    disqualified?: boolean
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: Date | string
  }

  export type DividendCreateManyRaceInput = {
    id?: string
    tote: string
    productName: string
    status: string
    dividend: Decimal | DecimalJsLike | number | string
    poolSize?: Decimal | DecimalJsLike | number | string | null
    jackpotSize?: Decimal | DecimalJsLike | number | string | null
    positions: JsonNullValueInput | InputJsonValue
    description?: string | null
    createdAt?: Date | string
  }

  export type RunnerUpdateWithoutRaceInput = {
    id?: StringFieldUpdateOperationsInput | string
    runnerNumber?: IntFieldUpdateOperationsInput | number
    entrantId?: NullableStringFieldUpdateOperationsInput | string | null
    horseName?: StringFieldUpdateOperationsInput | string
    tabHorseIdLegacy?: NullableStringFieldUpdateOperationsInput | string | null
    barrier?: NullableIntFieldUpdateOperationsInput | number | null
    weight?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    jockeyName?: NullableStringFieldUpdateOperationsInput | string | null
    jockeyId?: NullableStringFieldUpdateOperationsInput | string | null
    jockeyWeightAllowance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    trainerName?: NullableStringFieldUpdateOperationsInput | string | null
    trainerId?: NullableStringFieldUpdateOperationsInput | string | null
    trainerLocation?: NullableStringFieldUpdateOperationsInput | string | null
    form?: NullableStringFieldUpdateOperationsInput | string | null
    lastStarts?: NullableJsonNullValueInput | InputJsonValue
    lastTwentyStarts?: NullableStringFieldUpdateOperationsInput | string | null
    age?: NullableIntFieldUpdateOperationsInput | number | null
    silkColours?: NullableStringFieldUpdateOperationsInput | string | null
    scratched?: BoolFieldUpdateOperationsInput | boolean
    scratchedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    openingOdds?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    currentOdds?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    horse?: HorseUpdateOneWithoutRunnersNestedInput
    results?: ResultUpdateManyWithoutRunnerNestedInput
    oddsSnapshots?: OddsSnapshotUpdateManyWithoutRunnerNestedInput
  }

  export type RunnerUncheckedUpdateWithoutRaceInput = {
    id?: StringFieldUpdateOperationsInput | string
    runnerNumber?: IntFieldUpdateOperationsInput | number
    entrantId?: NullableStringFieldUpdateOperationsInput | string | null
    horseName?: StringFieldUpdateOperationsInput | string
    tabHorseIdLegacy?: NullableStringFieldUpdateOperationsInput | string | null
    horseId?: NullableStringFieldUpdateOperationsInput | string | null
    barrier?: NullableIntFieldUpdateOperationsInput | number | null
    weight?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    jockeyName?: NullableStringFieldUpdateOperationsInput | string | null
    jockeyId?: NullableStringFieldUpdateOperationsInput | string | null
    jockeyWeightAllowance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    trainerName?: NullableStringFieldUpdateOperationsInput | string | null
    trainerId?: NullableStringFieldUpdateOperationsInput | string | null
    trainerLocation?: NullableStringFieldUpdateOperationsInput | string | null
    form?: NullableStringFieldUpdateOperationsInput | string | null
    lastStarts?: NullableJsonNullValueInput | InputJsonValue
    lastTwentyStarts?: NullableStringFieldUpdateOperationsInput | string | null
    age?: NullableIntFieldUpdateOperationsInput | number | null
    silkColours?: NullableStringFieldUpdateOperationsInput | string | null
    scratched?: BoolFieldUpdateOperationsInput | boolean
    scratchedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    openingOdds?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    currentOdds?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    results?: ResultUncheckedUpdateManyWithoutRunnerNestedInput
    oddsSnapshots?: OddsSnapshotUncheckedUpdateManyWithoutRunnerNestedInput
  }

  export type RunnerUncheckedUpdateManyWithoutRaceInput = {
    id?: StringFieldUpdateOperationsInput | string
    runnerNumber?: IntFieldUpdateOperationsInput | number
    entrantId?: NullableStringFieldUpdateOperationsInput | string | null
    horseName?: StringFieldUpdateOperationsInput | string
    tabHorseIdLegacy?: NullableStringFieldUpdateOperationsInput | string | null
    horseId?: NullableStringFieldUpdateOperationsInput | string | null
    barrier?: NullableIntFieldUpdateOperationsInput | number | null
    weight?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    jockeyName?: NullableStringFieldUpdateOperationsInput | string | null
    jockeyId?: NullableStringFieldUpdateOperationsInput | string | null
    jockeyWeightAllowance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    trainerName?: NullableStringFieldUpdateOperationsInput | string | null
    trainerId?: NullableStringFieldUpdateOperationsInput | string | null
    trainerLocation?: NullableStringFieldUpdateOperationsInput | string | null
    form?: NullableStringFieldUpdateOperationsInput | string | null
    lastStarts?: NullableJsonNullValueInput | InputJsonValue
    lastTwentyStarts?: NullableStringFieldUpdateOperationsInput | string | null
    age?: NullableIntFieldUpdateOperationsInput | number | null
    silkColours?: NullableStringFieldUpdateOperationsInput | string | null
    scratched?: BoolFieldUpdateOperationsInput | boolean
    scratchedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    openingOdds?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    currentOdds?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type ScrapeUpdateWithoutRaceInput = {
    id?: StringFieldUpdateOperationsInput | string
    scrapeType?: StringFieldUpdateOperationsInput | string
    scrapedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    changesDetected?: NullableJsonNullValueInput | InputJsonValue
    success?: BoolFieldUpdateOperationsInput | boolean
    errorMessage?: NullableStringFieldUpdateOperationsInput | string | null
    jobRun?: JobRunUpdateOneWithoutScrapesNestedInput
  }

  export type ScrapeUncheckedUpdateWithoutRaceInput = {
    id?: StringFieldUpdateOperationsInput | string
    scrapeType?: StringFieldUpdateOperationsInput | string
    scrapedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    changesDetected?: NullableJsonNullValueInput | InputJsonValue
    success?: BoolFieldUpdateOperationsInput | boolean
    errorMessage?: NullableStringFieldUpdateOperationsInput | string | null
    jobRunId?: NullableStringFieldUpdateOperationsInput | string | null
  }

  export type ScrapeUncheckedUpdateManyWithoutRaceInput = {
    id?: StringFieldUpdateOperationsInput | string
    scrapeType?: StringFieldUpdateOperationsInput | string
    scrapedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    changesDetected?: NullableJsonNullValueInput | InputJsonValue
    success?: BoolFieldUpdateOperationsInput | boolean
    errorMessage?: NullableStringFieldUpdateOperationsInput | string | null
    jobRunId?: NullableStringFieldUpdateOperationsInput | string | null
  }

  export type ResultUpdateWithoutRaceInput = {
    id?: StringFieldUpdateOperationsInput | string
    finishPosition?: NullableIntFieldUpdateOperationsInput | number | null
    margin?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    raceTime?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    winDividend?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    placeDividend?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    official?: BoolFieldUpdateOperationsInput | boolean
    disqualified?: BoolFieldUpdateOperationsInput | boolean
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    runner?: RunnerUpdateOneRequiredWithoutResultsNestedInput
  }

  export type ResultUncheckedUpdateWithoutRaceInput = {
    id?: StringFieldUpdateOperationsInput | string
    runnerId?: StringFieldUpdateOperationsInput | string
    finishPosition?: NullableIntFieldUpdateOperationsInput | number | null
    margin?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    raceTime?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    winDividend?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    placeDividend?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    official?: BoolFieldUpdateOperationsInput | boolean
    disqualified?: BoolFieldUpdateOperationsInput | boolean
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type ResultUncheckedUpdateManyWithoutRaceInput = {
    id?: StringFieldUpdateOperationsInput | string
    runnerId?: StringFieldUpdateOperationsInput | string
    finishPosition?: NullableIntFieldUpdateOperationsInput | number | null
    margin?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    raceTime?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    winDividend?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    placeDividend?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    official?: BoolFieldUpdateOperationsInput | boolean
    disqualified?: BoolFieldUpdateOperationsInput | boolean
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type DividendUpdateWithoutRaceInput = {
    id?: StringFieldUpdateOperationsInput | string
    tote?: StringFieldUpdateOperationsInput | string
    productName?: StringFieldUpdateOperationsInput | string
    status?: StringFieldUpdateOperationsInput | string
    dividend?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    poolSize?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    jackpotSize?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    positions?: JsonNullValueInput | InputJsonValue
    description?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type DividendUncheckedUpdateWithoutRaceInput = {
    id?: StringFieldUpdateOperationsInput | string
    tote?: StringFieldUpdateOperationsInput | string
    productName?: StringFieldUpdateOperationsInput | string
    status?: StringFieldUpdateOperationsInput | string
    dividend?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    poolSize?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    jackpotSize?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    positions?: JsonNullValueInput | InputJsonValue
    description?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type DividendUncheckedUpdateManyWithoutRaceInput = {
    id?: StringFieldUpdateOperationsInput | string
    tote?: StringFieldUpdateOperationsInput | string
    productName?: StringFieldUpdateOperationsInput | string
    status?: StringFieldUpdateOperationsInput | string
    dividend?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string
    poolSize?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    jackpotSize?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    positions?: JsonNullValueInput | InputJsonValue
    description?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type RunnerCreateManyHorseInput = {
    id?: string
    raceId: string
    runnerNumber: number
    entrantId?: string | null
    horseName: string
    tabHorseIdLegacy?: string | null
    barrier?: number | null
    weight?: Decimal | DecimalJsLike | number | string | null
    jockeyName?: string | null
    jockeyId?: string | null
    jockeyWeightAllowance?: Decimal | DecimalJsLike | number | string | null
    trainerName?: string | null
    trainerId?: string | null
    trainerLocation?: string | null
    form?: string | null
    lastStarts?: NullableJsonNullValueInput | InputJsonValue
    lastTwentyStarts?: string | null
    age?: number | null
    silkColours?: string | null
    scratched?: boolean
    scratchedAt?: Date | string | null
    openingOdds?: Decimal | DecimalJsLike | number | string | null
    currentOdds?: Decimal | DecimalJsLike | number | string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type RunnerUpdateWithoutHorseInput = {
    id?: StringFieldUpdateOperationsInput | string
    runnerNumber?: IntFieldUpdateOperationsInput | number
    entrantId?: NullableStringFieldUpdateOperationsInput | string | null
    horseName?: StringFieldUpdateOperationsInput | string
    tabHorseIdLegacy?: NullableStringFieldUpdateOperationsInput | string | null
    barrier?: NullableIntFieldUpdateOperationsInput | number | null
    weight?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    jockeyName?: NullableStringFieldUpdateOperationsInput | string | null
    jockeyId?: NullableStringFieldUpdateOperationsInput | string | null
    jockeyWeightAllowance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    trainerName?: NullableStringFieldUpdateOperationsInput | string | null
    trainerId?: NullableStringFieldUpdateOperationsInput | string | null
    trainerLocation?: NullableStringFieldUpdateOperationsInput | string | null
    form?: NullableStringFieldUpdateOperationsInput | string | null
    lastStarts?: NullableJsonNullValueInput | InputJsonValue
    lastTwentyStarts?: NullableStringFieldUpdateOperationsInput | string | null
    age?: NullableIntFieldUpdateOperationsInput | number | null
    silkColours?: NullableStringFieldUpdateOperationsInput | string | null
    scratched?: BoolFieldUpdateOperationsInput | boolean
    scratchedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    openingOdds?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    currentOdds?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    race?: RaceUpdateOneRequiredWithoutRunnersNestedInput
    results?: ResultUpdateManyWithoutRunnerNestedInput
    oddsSnapshots?: OddsSnapshotUpdateManyWithoutRunnerNestedInput
  }

  export type RunnerUncheckedUpdateWithoutHorseInput = {
    id?: StringFieldUpdateOperationsInput | string
    raceId?: StringFieldUpdateOperationsInput | string
    runnerNumber?: IntFieldUpdateOperationsInput | number
    entrantId?: NullableStringFieldUpdateOperationsInput | string | null
    horseName?: StringFieldUpdateOperationsInput | string
    tabHorseIdLegacy?: NullableStringFieldUpdateOperationsInput | string | null
    barrier?: NullableIntFieldUpdateOperationsInput | number | null
    weight?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    jockeyName?: NullableStringFieldUpdateOperationsInput | string | null
    jockeyId?: NullableStringFieldUpdateOperationsInput | string | null
    jockeyWeightAllowance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    trainerName?: NullableStringFieldUpdateOperationsInput | string | null
    trainerId?: NullableStringFieldUpdateOperationsInput | string | null
    trainerLocation?: NullableStringFieldUpdateOperationsInput | string | null
    form?: NullableStringFieldUpdateOperationsInput | string | null
    lastStarts?: NullableJsonNullValueInput | InputJsonValue
    lastTwentyStarts?: NullableStringFieldUpdateOperationsInput | string | null
    age?: NullableIntFieldUpdateOperationsInput | number | null
    silkColours?: NullableStringFieldUpdateOperationsInput | string | null
    scratched?: BoolFieldUpdateOperationsInput | boolean
    scratchedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    openingOdds?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    currentOdds?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    results?: ResultUncheckedUpdateManyWithoutRunnerNestedInput
    oddsSnapshots?: OddsSnapshotUncheckedUpdateManyWithoutRunnerNestedInput
  }

  export type RunnerUncheckedUpdateManyWithoutHorseInput = {
    id?: StringFieldUpdateOperationsInput | string
    raceId?: StringFieldUpdateOperationsInput | string
    runnerNumber?: IntFieldUpdateOperationsInput | number
    entrantId?: NullableStringFieldUpdateOperationsInput | string | null
    horseName?: StringFieldUpdateOperationsInput | string
    tabHorseIdLegacy?: NullableStringFieldUpdateOperationsInput | string | null
    barrier?: NullableIntFieldUpdateOperationsInput | number | null
    weight?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    jockeyName?: NullableStringFieldUpdateOperationsInput | string | null
    jockeyId?: NullableStringFieldUpdateOperationsInput | string | null
    jockeyWeightAllowance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    trainerName?: NullableStringFieldUpdateOperationsInput | string | null
    trainerId?: NullableStringFieldUpdateOperationsInput | string | null
    trainerLocation?: NullableStringFieldUpdateOperationsInput | string | null
    form?: NullableStringFieldUpdateOperationsInput | string | null
    lastStarts?: NullableJsonNullValueInput | InputJsonValue
    lastTwentyStarts?: NullableStringFieldUpdateOperationsInput | string | null
    age?: NullableIntFieldUpdateOperationsInput | number | null
    silkColours?: NullableStringFieldUpdateOperationsInput | string | null
    scratched?: BoolFieldUpdateOperationsInput | boolean
    scratchedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    openingOdds?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    currentOdds?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type ResultCreateManyRunnerInput = {
    id?: string
    raceId: string
    finishPosition?: number | null
    margin?: Decimal | DecimalJsLike | number | string | null
    raceTime?: Decimal | DecimalJsLike | number | string | null
    winDividend?: Decimal | DecimalJsLike | number | string | null
    placeDividend?: Decimal | DecimalJsLike | number | string | null
    official?: boolean
    disqualified?: boolean
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: Date | string
  }

  export type OddsSnapshotCreateManyRunnerInput = {
    id?: string
    snapshotType: string
    fixedWin?: Decimal | DecimalJsLike | number | string | null
    fixedPlace?: Decimal | DecimalJsLike | number | string | null
    poolWin?: Decimal | DecimalJsLike | number | string | null
    poolPlace?: Decimal | DecimalJsLike | number | string | null
    capturedAt?: Date | string
  }

  export type ResultUpdateWithoutRunnerInput = {
    id?: StringFieldUpdateOperationsInput | string
    finishPosition?: NullableIntFieldUpdateOperationsInput | number | null
    margin?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    raceTime?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    winDividend?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    placeDividend?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    official?: BoolFieldUpdateOperationsInput | boolean
    disqualified?: BoolFieldUpdateOperationsInput | boolean
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    race?: RaceUpdateOneRequiredWithoutResultsNestedInput
  }

  export type ResultUncheckedUpdateWithoutRunnerInput = {
    id?: StringFieldUpdateOperationsInput | string
    raceId?: StringFieldUpdateOperationsInput | string
    finishPosition?: NullableIntFieldUpdateOperationsInput | number | null
    margin?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    raceTime?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    winDividend?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    placeDividend?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    official?: BoolFieldUpdateOperationsInput | boolean
    disqualified?: BoolFieldUpdateOperationsInput | boolean
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type ResultUncheckedUpdateManyWithoutRunnerInput = {
    id?: StringFieldUpdateOperationsInput | string
    raceId?: StringFieldUpdateOperationsInput | string
    finishPosition?: NullableIntFieldUpdateOperationsInput | number | null
    margin?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    raceTime?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    winDividend?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    placeDividend?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    official?: BoolFieldUpdateOperationsInput | boolean
    disqualified?: BoolFieldUpdateOperationsInput | boolean
    metadata?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type OddsSnapshotUpdateWithoutRunnerInput = {
    id?: StringFieldUpdateOperationsInput | string
    snapshotType?: StringFieldUpdateOperationsInput | string
    fixedWin?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    fixedPlace?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    poolWin?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    poolPlace?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    capturedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type OddsSnapshotUncheckedUpdateWithoutRunnerInput = {
    id?: StringFieldUpdateOperationsInput | string
    snapshotType?: StringFieldUpdateOperationsInput | string
    fixedWin?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    fixedPlace?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    poolWin?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    poolPlace?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    capturedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type OddsSnapshotUncheckedUpdateManyWithoutRunnerInput = {
    id?: StringFieldUpdateOperationsInput | string
    snapshotType?: StringFieldUpdateOperationsInput | string
    fixedWin?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    fixedPlace?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    poolWin?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    poolPlace?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null
    capturedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type ScrapeCreateManyJobRunInput = {
    id?: string
    raceId: string
    scrapeType: string
    scrapedAt?: Date | string
    changesDetected?: NullableJsonNullValueInput | InputJsonValue
    success?: boolean
    errorMessage?: string | null
  }

  export type JobRunCreateManyParentJobRunInput = {
    id?: string
    jobType: string
    status: string
    startedAt?: Date | string
    completedAt?: Date | string | null
    durationMs?: number | null
    itemsProcessed?: number
    itemsFailed?: number
    errorMessage?: string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    retryCount?: number
  }

  export type ScrapeUpdateWithoutJobRunInput = {
    id?: StringFieldUpdateOperationsInput | string
    scrapeType?: StringFieldUpdateOperationsInput | string
    scrapedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    changesDetected?: NullableJsonNullValueInput | InputJsonValue
    success?: BoolFieldUpdateOperationsInput | boolean
    errorMessage?: NullableStringFieldUpdateOperationsInput | string | null
    race?: RaceUpdateOneRequiredWithoutScrapesNestedInput
  }

  export type ScrapeUncheckedUpdateWithoutJobRunInput = {
    id?: StringFieldUpdateOperationsInput | string
    raceId?: StringFieldUpdateOperationsInput | string
    scrapeType?: StringFieldUpdateOperationsInput | string
    scrapedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    changesDetected?: NullableJsonNullValueInput | InputJsonValue
    success?: BoolFieldUpdateOperationsInput | boolean
    errorMessage?: NullableStringFieldUpdateOperationsInput | string | null
  }

  export type ScrapeUncheckedUpdateManyWithoutJobRunInput = {
    id?: StringFieldUpdateOperationsInput | string
    raceId?: StringFieldUpdateOperationsInput | string
    scrapeType?: StringFieldUpdateOperationsInput | string
    scrapedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    changesDetected?: NullableJsonNullValueInput | InputJsonValue
    success?: BoolFieldUpdateOperationsInput | boolean
    errorMessage?: NullableStringFieldUpdateOperationsInput | string | null
  }

  export type JobRunUpdateWithoutParentJobRunInput = {
    id?: StringFieldUpdateOperationsInput | string
    jobType?: StringFieldUpdateOperationsInput | string
    status?: StringFieldUpdateOperationsInput | string
    startedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    completedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    durationMs?: NullableIntFieldUpdateOperationsInput | number | null
    itemsProcessed?: IntFieldUpdateOperationsInput | number
    itemsFailed?: IntFieldUpdateOperationsInput | number
    errorMessage?: NullableStringFieldUpdateOperationsInput | string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    retryCount?: IntFieldUpdateOperationsInput | number
    scrapes?: ScrapeUpdateManyWithoutJobRunNestedInput
    retryJobRuns?: JobRunUpdateManyWithoutParentJobRunNestedInput
  }

  export type JobRunUncheckedUpdateWithoutParentJobRunInput = {
    id?: StringFieldUpdateOperationsInput | string
    jobType?: StringFieldUpdateOperationsInput | string
    status?: StringFieldUpdateOperationsInput | string
    startedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    completedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    durationMs?: NullableIntFieldUpdateOperationsInput | number | null
    itemsProcessed?: IntFieldUpdateOperationsInput | number
    itemsFailed?: IntFieldUpdateOperationsInput | number
    errorMessage?: NullableStringFieldUpdateOperationsInput | string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    retryCount?: IntFieldUpdateOperationsInput | number
    scrapes?: ScrapeUncheckedUpdateManyWithoutJobRunNestedInput
    retryJobRuns?: JobRunUncheckedUpdateManyWithoutParentJobRunNestedInput
  }

  export type JobRunUncheckedUpdateManyWithoutParentJobRunInput = {
    id?: StringFieldUpdateOperationsInput | string
    jobType?: StringFieldUpdateOperationsInput | string
    status?: StringFieldUpdateOperationsInput | string
    startedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    completedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
    durationMs?: NullableIntFieldUpdateOperationsInput | number | null
    itemsProcessed?: IntFieldUpdateOperationsInput | number
    itemsFailed?: IntFieldUpdateOperationsInput | number
    errorMessage?: NullableStringFieldUpdateOperationsInput | string | null
    metadata?: NullableJsonNullValueInput | InputJsonValue
    retryCount?: IntFieldUpdateOperationsInput | number
  }



  /**
   * Aliases for legacy arg types
   */
    /**
     * @deprecated Use MeetingCountOutputTypeDefaultArgs instead
     */
    export type MeetingCountOutputTypeArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = MeetingCountOutputTypeDefaultArgs<ExtArgs>
    /**
     * @deprecated Use RaceCountOutputTypeDefaultArgs instead
     */
    export type RaceCountOutputTypeArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = RaceCountOutputTypeDefaultArgs<ExtArgs>
    /**
     * @deprecated Use HorseCountOutputTypeDefaultArgs instead
     */
    export type HorseCountOutputTypeArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = HorseCountOutputTypeDefaultArgs<ExtArgs>
    /**
     * @deprecated Use RunnerCountOutputTypeDefaultArgs instead
     */
    export type RunnerCountOutputTypeArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = RunnerCountOutputTypeDefaultArgs<ExtArgs>
    /**
     * @deprecated Use JobRunCountOutputTypeDefaultArgs instead
     */
    export type JobRunCountOutputTypeArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = JobRunCountOutputTypeDefaultArgs<ExtArgs>
    /**
     * @deprecated Use MeetingDefaultArgs instead
     */
    export type MeetingArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = MeetingDefaultArgs<ExtArgs>
    /**
     * @deprecated Use RaceDefaultArgs instead
     */
    export type RaceArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = RaceDefaultArgs<ExtArgs>
    /**
     * @deprecated Use HorseDefaultArgs instead
     */
    export type HorseArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = HorseDefaultArgs<ExtArgs>
    /**
     * @deprecated Use RunnerDefaultArgs instead
     */
    export type RunnerArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = RunnerDefaultArgs<ExtArgs>
    /**
     * @deprecated Use ResultDefaultArgs instead
     */
    export type ResultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = ResultDefaultArgs<ExtArgs>
    /**
     * @deprecated Use ScrapeDefaultArgs instead
     */
    export type ScrapeArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = ScrapeDefaultArgs<ExtArgs>
    /**
     * @deprecated Use JobRunDefaultArgs instead
     */
    export type JobRunArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = JobRunDefaultArgs<ExtArgs>
    /**
     * @deprecated Use DividendDefaultArgs instead
     */
    export type DividendArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = DividendDefaultArgs<ExtArgs>
    /**
     * @deprecated Use OddsSnapshotDefaultArgs instead
     */
    export type OddsSnapshotArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = OddsSnapshotDefaultArgs<ExtArgs>

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

  export type BatchPayload = {
    count: number
  }

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