
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
/* eslint-disable */
// biome-ignore-all lint: generated file
// @ts-nocheck 
/*
 * This file exports the `Plan` model and its related types.
 *
 * 🟢 You can import this file directly.
 */
import type * as runtime from "@prisma/client/runtime/client"
import type * as $Enums from "../enums"
import type * as Prisma from "../internal/prismaNamespace"

/**
 * Model Plan
 * 
 */
export type PlanModel = runtime.Types.Result.DefaultSelection<Prisma.$PlanPayload>

export type AggregatePlan = {
  _count: PlanCountAggregateOutputType | null
  _avg: PlanAvgAggregateOutputType | null
  _sum: PlanSumAggregateOutputType | null
  _min: PlanMinAggregateOutputType | null
  _max: PlanMaxAggregateOutputType | null
}

export type PlanAvgAggregateOutputType = {
  priceCents: number | null
  setupFeeCents: number | null
}

export type PlanSumAggregateOutputType = {
  priceCents: number | null
  setupFeeCents: number | null
}

export type PlanMinAggregateOutputType = {
  id: string | null
  code: string | null
  name: string | null
  priceCents: number | null
  setupFeeCents: number | null
  active: boolean | null
}

export type PlanMaxAggregateOutputType = {
  id: string | null
  code: string | null
  name: string | null
  priceCents: number | null
  setupFeeCents: number | null
  active: boolean | null
}

export type PlanCountAggregateOutputType = {
  id: number
  code: number
  name: number
  priceCents: number
  setupFeeCents: number
  active: number
  _all: number
}


export type PlanAvgAggregateInputType = {
  priceCents?: true
  setupFeeCents?: true
}

export type PlanSumAggregateInputType = {
  priceCents?: true
  setupFeeCents?: true
}

export type PlanMinAggregateInputType = {
  id?: true
  code?: true
  name?: true
  priceCents?: true
  setupFeeCents?: true
  active?: true
}

export type PlanMaxAggregateInputType = {
  id?: true
  code?: true
  name?: true
  priceCents?: true
  setupFeeCents?: true
  active?: true
}

export type PlanCountAggregateInputType = {
  id?: true
  code?: true
  name?: true
  priceCents?: true
  setupFeeCents?: true
  active?: true
  _all?: true
}

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

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




export type PlanGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.PlanWhereInput
  orderBy?: Prisma.PlanOrderByWithAggregationInput | Prisma.PlanOrderByWithAggregationInput[]
  by: Prisma.PlanScalarFieldEnum[] | Prisma.PlanScalarFieldEnum
  having?: Prisma.PlanScalarWhereWithAggregatesInput
  take?: number
  skip?: number
  _count?: PlanCountAggregateInputType | true
  _avg?: PlanAvgAggregateInputType
  _sum?: PlanSumAggregateInputType
  _min?: PlanMinAggregateInputType
  _max?: PlanMaxAggregateInputType
}

export type PlanGroupByOutputType = {
  id: string
  code: string
  name: string
  priceCents: number
  setupFeeCents: number
  active: boolean
  _count: PlanCountAggregateOutputType | null
  _avg: PlanAvgAggregateOutputType | null
  _sum: PlanSumAggregateOutputType | null
  _min: PlanMinAggregateOutputType | null
  _max: PlanMaxAggregateOutputType | null
}

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



export type PlanWhereInput = {
  AND?: Prisma.PlanWhereInput | Prisma.PlanWhereInput[]
  OR?: Prisma.PlanWhereInput[]
  NOT?: Prisma.PlanWhereInput | Prisma.PlanWhereInput[]
  id?: Prisma.StringFilter<"Plan"> | string
  code?: Prisma.StringFilter<"Plan"> | string
  name?: Prisma.StringFilter<"Plan"> | string
  priceCents?: Prisma.IntFilter<"Plan"> | number
  setupFeeCents?: Prisma.IntFilter<"Plan"> | number
  active?: Prisma.BoolFilter<"Plan"> | boolean
  features?: Prisma.PlanFeatureListRelationFilter
  subscriptions?: Prisma.SubscriptionListRelationFilter
}

export type PlanOrderByWithRelationInput = {
  id?: Prisma.SortOrder
  code?: Prisma.SortOrder
  name?: Prisma.SortOrder
  priceCents?: Prisma.SortOrder
  setupFeeCents?: Prisma.SortOrder
  active?: Prisma.SortOrder
  features?: Prisma.PlanFeatureOrderByRelationAggregateInput
  subscriptions?: Prisma.SubscriptionOrderByRelationAggregateInput
}

export type PlanWhereUniqueInput = Prisma.AtLeast<{
  id?: string
  code?: string
  AND?: Prisma.PlanWhereInput | Prisma.PlanWhereInput[]
  OR?: Prisma.PlanWhereInput[]
  NOT?: Prisma.PlanWhereInput | Prisma.PlanWhereInput[]
  name?: Prisma.StringFilter<"Plan"> | string
  priceCents?: Prisma.IntFilter<"Plan"> | number
  setupFeeCents?: Prisma.IntFilter<"Plan"> | number
  active?: Prisma.BoolFilter<"Plan"> | boolean
  features?: Prisma.PlanFeatureListRelationFilter
  subscriptions?: Prisma.SubscriptionListRelationFilter
}, "id" | "code">

export type PlanOrderByWithAggregationInput = {
  id?: Prisma.SortOrder
  code?: Prisma.SortOrder
  name?: Prisma.SortOrder
  priceCents?: Prisma.SortOrder
  setupFeeCents?: Prisma.SortOrder
  active?: Prisma.SortOrder
  _count?: Prisma.PlanCountOrderByAggregateInput
  _avg?: Prisma.PlanAvgOrderByAggregateInput
  _max?: Prisma.PlanMaxOrderByAggregateInput
  _min?: Prisma.PlanMinOrderByAggregateInput
  _sum?: Prisma.PlanSumOrderByAggregateInput
}

export type PlanScalarWhereWithAggregatesInput = {
  AND?: Prisma.PlanScalarWhereWithAggregatesInput | Prisma.PlanScalarWhereWithAggregatesInput[]
  OR?: Prisma.PlanScalarWhereWithAggregatesInput[]
  NOT?: Prisma.PlanScalarWhereWithAggregatesInput | Prisma.PlanScalarWhereWithAggregatesInput[]
  id?: Prisma.StringWithAggregatesFilter<"Plan"> | string
  code?: Prisma.StringWithAggregatesFilter<"Plan"> | string
  name?: Prisma.StringWithAggregatesFilter<"Plan"> | string
  priceCents?: Prisma.IntWithAggregatesFilter<"Plan"> | number
  setupFeeCents?: Prisma.IntWithAggregatesFilter<"Plan"> | number
  active?: Prisma.BoolWithAggregatesFilter<"Plan"> | boolean
}

export type PlanCreateInput = {
  id?: string
  code: string
  name: string
  priceCents: number
  setupFeeCents?: number
  active?: boolean
  features?: Prisma.PlanFeatureCreateNestedManyWithoutPlanInput
  subscriptions?: Prisma.SubscriptionCreateNestedManyWithoutPlanInput
}

export type PlanUncheckedCreateInput = {
  id?: string
  code: string
  name: string
  priceCents: number
  setupFeeCents?: number
  active?: boolean
  features?: Prisma.PlanFeatureUncheckedCreateNestedManyWithoutPlanInput
  subscriptions?: Prisma.SubscriptionUncheckedCreateNestedManyWithoutPlanInput
}

export type PlanUpdateInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  code?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  priceCents?: Prisma.IntFieldUpdateOperationsInput | number
  setupFeeCents?: Prisma.IntFieldUpdateOperationsInput | number
  active?: Prisma.BoolFieldUpdateOperationsInput | boolean
  features?: Prisma.PlanFeatureUpdateManyWithoutPlanNestedInput
  subscriptions?: Prisma.SubscriptionUpdateManyWithoutPlanNestedInput
}

export type PlanUncheckedUpdateInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  code?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  priceCents?: Prisma.IntFieldUpdateOperationsInput | number
  setupFeeCents?: Prisma.IntFieldUpdateOperationsInput | number
  active?: Prisma.BoolFieldUpdateOperationsInput | boolean
  features?: Prisma.PlanFeatureUncheckedUpdateManyWithoutPlanNestedInput
  subscriptions?: Prisma.SubscriptionUncheckedUpdateManyWithoutPlanNestedInput
}

export type PlanCreateManyInput = {
  id?: string
  code: string
  name: string
  priceCents: number
  setupFeeCents?: number
  active?: boolean
}

export type PlanUpdateManyMutationInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  code?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  priceCents?: Prisma.IntFieldUpdateOperationsInput | number
  setupFeeCents?: Prisma.IntFieldUpdateOperationsInput | number
  active?: Prisma.BoolFieldUpdateOperationsInput | boolean
}

export type PlanUncheckedUpdateManyInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  code?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  priceCents?: Prisma.IntFieldUpdateOperationsInput | number
  setupFeeCents?: Prisma.IntFieldUpdateOperationsInput | number
  active?: Prisma.BoolFieldUpdateOperationsInput | boolean
}

export type PlanCountOrderByAggregateInput = {
  id?: Prisma.SortOrder
  code?: Prisma.SortOrder
  name?: Prisma.SortOrder
  priceCents?: Prisma.SortOrder
  setupFeeCents?: Prisma.SortOrder
  active?: Prisma.SortOrder
}

export type PlanAvgOrderByAggregateInput = {
  priceCents?: Prisma.SortOrder
  setupFeeCents?: Prisma.SortOrder
}

export type PlanMaxOrderByAggregateInput = {
  id?: Prisma.SortOrder
  code?: Prisma.SortOrder
  name?: Prisma.SortOrder
  priceCents?: Prisma.SortOrder
  setupFeeCents?: Prisma.SortOrder
  active?: Prisma.SortOrder
}

export type PlanMinOrderByAggregateInput = {
  id?: Prisma.SortOrder
  code?: Prisma.SortOrder
  name?: Prisma.SortOrder
  priceCents?: Prisma.SortOrder
  setupFeeCents?: Prisma.SortOrder
  active?: Prisma.SortOrder
}

export type PlanSumOrderByAggregateInput = {
  priceCents?: Prisma.SortOrder
  setupFeeCents?: Prisma.SortOrder
}

export type PlanScalarRelationFilter = {
  is?: Prisma.PlanWhereInput
  isNot?: Prisma.PlanWhereInput
}

export type PlanCreateNestedOneWithoutFeaturesInput = {
  create?: Prisma.XOR<Prisma.PlanCreateWithoutFeaturesInput, Prisma.PlanUncheckedCreateWithoutFeaturesInput>
  connectOrCreate?: Prisma.PlanCreateOrConnectWithoutFeaturesInput
  connect?: Prisma.PlanWhereUniqueInput
}

export type PlanUpdateOneRequiredWithoutFeaturesNestedInput = {
  create?: Prisma.XOR<Prisma.PlanCreateWithoutFeaturesInput, Prisma.PlanUncheckedCreateWithoutFeaturesInput>
  connectOrCreate?: Prisma.PlanCreateOrConnectWithoutFeaturesInput
  upsert?: Prisma.PlanUpsertWithoutFeaturesInput
  connect?: Prisma.PlanWhereUniqueInput
  update?: Prisma.XOR<Prisma.XOR<Prisma.PlanUpdateToOneWithWhereWithoutFeaturesInput, Prisma.PlanUpdateWithoutFeaturesInput>, Prisma.PlanUncheckedUpdateWithoutFeaturesInput>
}

export type PlanCreateNestedOneWithoutSubscriptionsInput = {
  create?: Prisma.XOR<Prisma.PlanCreateWithoutSubscriptionsInput, Prisma.PlanUncheckedCreateWithoutSubscriptionsInput>
  connectOrCreate?: Prisma.PlanCreateOrConnectWithoutSubscriptionsInput
  connect?: Prisma.PlanWhereUniqueInput
}

export type PlanUpdateOneRequiredWithoutSubscriptionsNestedInput = {
  create?: Prisma.XOR<Prisma.PlanCreateWithoutSubscriptionsInput, Prisma.PlanUncheckedCreateWithoutSubscriptionsInput>
  connectOrCreate?: Prisma.PlanCreateOrConnectWithoutSubscriptionsInput
  upsert?: Prisma.PlanUpsertWithoutSubscriptionsInput
  connect?: Prisma.PlanWhereUniqueInput
  update?: Prisma.XOR<Prisma.XOR<Prisma.PlanUpdateToOneWithWhereWithoutSubscriptionsInput, Prisma.PlanUpdateWithoutSubscriptionsInput>, Prisma.PlanUncheckedUpdateWithoutSubscriptionsInput>
}

export type PlanCreateWithoutFeaturesInput = {
  id?: string
  code: string
  name: string
  priceCents: number
  setupFeeCents?: number
  active?: boolean
  subscriptions?: Prisma.SubscriptionCreateNestedManyWithoutPlanInput
}

export type PlanUncheckedCreateWithoutFeaturesInput = {
  id?: string
  code: string
  name: string
  priceCents: number
  setupFeeCents?: number
  active?: boolean
  subscriptions?: Prisma.SubscriptionUncheckedCreateNestedManyWithoutPlanInput
}

export type PlanCreateOrConnectWithoutFeaturesInput = {
  where: Prisma.PlanWhereUniqueInput
  create: Prisma.XOR<Prisma.PlanCreateWithoutFeaturesInput, Prisma.PlanUncheckedCreateWithoutFeaturesInput>
}

export type PlanUpsertWithoutFeaturesInput = {
  update: Prisma.XOR<Prisma.PlanUpdateWithoutFeaturesInput, Prisma.PlanUncheckedUpdateWithoutFeaturesInput>
  create: Prisma.XOR<Prisma.PlanCreateWithoutFeaturesInput, Prisma.PlanUncheckedCreateWithoutFeaturesInput>
  where?: Prisma.PlanWhereInput
}

export type PlanUpdateToOneWithWhereWithoutFeaturesInput = {
  where?: Prisma.PlanWhereInput
  data: Prisma.XOR<Prisma.PlanUpdateWithoutFeaturesInput, Prisma.PlanUncheckedUpdateWithoutFeaturesInput>
}

export type PlanUpdateWithoutFeaturesInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  code?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  priceCents?: Prisma.IntFieldUpdateOperationsInput | number
  setupFeeCents?: Prisma.IntFieldUpdateOperationsInput | number
  active?: Prisma.BoolFieldUpdateOperationsInput | boolean
  subscriptions?: Prisma.SubscriptionUpdateManyWithoutPlanNestedInput
}

export type PlanUncheckedUpdateWithoutFeaturesInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  code?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  priceCents?: Prisma.IntFieldUpdateOperationsInput | number
  setupFeeCents?: Prisma.IntFieldUpdateOperationsInput | number
  active?: Prisma.BoolFieldUpdateOperationsInput | boolean
  subscriptions?: Prisma.SubscriptionUncheckedUpdateManyWithoutPlanNestedInput
}

export type PlanCreateWithoutSubscriptionsInput = {
  id?: string
  code: string
  name: string
  priceCents: number
  setupFeeCents?: number
  active?: boolean
  features?: Prisma.PlanFeatureCreateNestedManyWithoutPlanInput
}

export type PlanUncheckedCreateWithoutSubscriptionsInput = {
  id?: string
  code: string
  name: string
  priceCents: number
  setupFeeCents?: number
  active?: boolean
  features?: Prisma.PlanFeatureUncheckedCreateNestedManyWithoutPlanInput
}

export type PlanCreateOrConnectWithoutSubscriptionsInput = {
  where: Prisma.PlanWhereUniqueInput
  create: Prisma.XOR<Prisma.PlanCreateWithoutSubscriptionsInput, Prisma.PlanUncheckedCreateWithoutSubscriptionsInput>
}

export type PlanUpsertWithoutSubscriptionsInput = {
  update: Prisma.XOR<Prisma.PlanUpdateWithoutSubscriptionsInput, Prisma.PlanUncheckedUpdateWithoutSubscriptionsInput>
  create: Prisma.XOR<Prisma.PlanCreateWithoutSubscriptionsInput, Prisma.PlanUncheckedCreateWithoutSubscriptionsInput>
  where?: Prisma.PlanWhereInput
}

export type PlanUpdateToOneWithWhereWithoutSubscriptionsInput = {
  where?: Prisma.PlanWhereInput
  data: Prisma.XOR<Prisma.PlanUpdateWithoutSubscriptionsInput, Prisma.PlanUncheckedUpdateWithoutSubscriptionsInput>
}

export type PlanUpdateWithoutSubscriptionsInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  code?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  priceCents?: Prisma.IntFieldUpdateOperationsInput | number
  setupFeeCents?: Prisma.IntFieldUpdateOperationsInput | number
  active?: Prisma.BoolFieldUpdateOperationsInput | boolean
  features?: Prisma.PlanFeatureUpdateManyWithoutPlanNestedInput
}

export type PlanUncheckedUpdateWithoutSubscriptionsInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  code?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  priceCents?: Prisma.IntFieldUpdateOperationsInput | number
  setupFeeCents?: Prisma.IntFieldUpdateOperationsInput | number
  active?: Prisma.BoolFieldUpdateOperationsInput | boolean
  features?: Prisma.PlanFeatureUncheckedUpdateManyWithoutPlanNestedInput
}


/**
 * Count Type PlanCountOutputType
 */

export type PlanCountOutputType = {
  features: number
  subscriptions: number
}

export type PlanCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  features?: boolean | PlanCountOutputTypeCountFeaturesArgs
  subscriptions?: boolean | PlanCountOutputTypeCountSubscriptionsArgs
}

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

/**
 * PlanCountOutputType without action
 */
export type PlanCountOutputTypeCountFeaturesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.PlanFeatureWhereInput
}

/**
 * PlanCountOutputType without action
 */
export type PlanCountOutputTypeCountSubscriptionsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.SubscriptionWhereInput
}


export type PlanSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  code?: boolean
  name?: boolean
  priceCents?: boolean
  setupFeeCents?: boolean
  active?: boolean
  features?: boolean | Prisma.Plan$featuresArgs<ExtArgs>
  subscriptions?: boolean | Prisma.Plan$subscriptionsArgs<ExtArgs>
  _count?: boolean | Prisma.PlanCountOutputTypeDefaultArgs<ExtArgs>
}, ExtArgs["result"]["plan"]>

export type PlanSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  code?: boolean
  name?: boolean
  priceCents?: boolean
  setupFeeCents?: boolean
  active?: boolean
}, ExtArgs["result"]["plan"]>

export type PlanSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  code?: boolean
  name?: boolean
  priceCents?: boolean
  setupFeeCents?: boolean
  active?: boolean
}, ExtArgs["result"]["plan"]>

export type PlanSelectScalar = {
  id?: boolean
  code?: boolean
  name?: boolean
  priceCents?: boolean
  setupFeeCents?: boolean
  active?: boolean
}

export type PlanOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "code" | "name" | "priceCents" | "setupFeeCents" | "active", ExtArgs["result"]["plan"]>
export type PlanInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  features?: boolean | Prisma.Plan$featuresArgs<ExtArgs>
  subscriptions?: boolean | Prisma.Plan$subscriptionsArgs<ExtArgs>
  _count?: boolean | Prisma.PlanCountOutputTypeDefaultArgs<ExtArgs>
}
export type PlanIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {}
export type PlanIncludeUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {}

export type $PlanPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  name: "Plan"
  objects: {
    features: Prisma.$PlanFeaturePayload<ExtArgs>[]
    subscriptions: Prisma.$SubscriptionPayload<ExtArgs>[]
  }
  scalars: runtime.Types.Extensions.GetPayloadResult<{
    id: string
    code: string
    name: string
    priceCents: number
    setupFeeCents: number
    active: boolean
  }, ExtArgs["result"]["plan"]>
  composites: {}
}

export type PlanGetPayload<S extends boolean | null | undefined | PlanDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$PlanPayload, S>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

/**
 * The delegate class that acts as a "Promise-like" for Plan.
 * 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__PlanClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
  readonly [Symbol.toStringTag]: "PrismaPromise"
  features<T extends Prisma.Plan$featuresArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Plan$featuresArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$PlanFeaturePayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
  subscriptions<T extends Prisma.Plan$subscriptionsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Plan$subscriptionsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$SubscriptionPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
  /**
   * Attaches callbacks for the resolution and/or rejection of the Promise.
   * @param onfulfilled The callback to execute when the Promise is resolved.
   * @param onrejected The callback to execute when the Promise is rejected.
   * @returns A Promise for the completion of which ever callback is executed.
   */
  then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): runtime.Types.Utils.JsPromise<TResult1 | TResult2>
  /**
   * Attaches a callback for only the rejection of the Promise.
   * @param onrejected The callback to execute when the Promise is rejected.
   * @returns A Promise for the completion of the callback.
   */
  catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): runtime.Types.Utils.JsPromise<T | TResult>
  /**
   * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
   * resolved value cannot be modified from the callback.
   * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
   * @returns A Promise for the completion of the callback.
   */
  finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise<T>
}




/**
 * Fields of the Plan model
 */
export interface PlanFieldRefs {
  readonly id: Prisma.FieldRef<"Plan", 'String'>
  readonly code: Prisma.FieldRef<"Plan", 'String'>
  readonly name: Prisma.FieldRef<"Plan", 'String'>
  readonly priceCents: Prisma.FieldRef<"Plan", 'Int'>
  readonly setupFeeCents: Prisma.FieldRef<"Plan", 'Int'>
  readonly active: Prisma.FieldRef<"Plan", 'Boolean'>
}
    

// Custom InputTypes
/**
 * Plan findUnique
 */
export type PlanFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Plan
   */
  select?: Prisma.PlanSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Plan
   */
  omit?: Prisma.PlanOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.PlanInclude<ExtArgs> | null
  /**
   * Filter, which Plan to fetch.
   */
  where: Prisma.PlanWhereUniqueInput
}

/**
 * Plan findUniqueOrThrow
 */
export type PlanFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Plan
   */
  select?: Prisma.PlanSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Plan
   */
  omit?: Prisma.PlanOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.PlanInclude<ExtArgs> | null
  /**
   * Filter, which Plan to fetch.
   */
  where: Prisma.PlanWhereUniqueInput
}

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

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

/**
 * Plan findMany
 */
export type PlanFindManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Plan
   */
  select?: Prisma.PlanSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Plan
   */
  omit?: Prisma.PlanOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.PlanInclude<ExtArgs> | null
  /**
   * Filter, which Plans to fetch.
   */
  where?: Prisma.PlanWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of Plans to fetch.
   */
  orderBy?: Prisma.PlanOrderByWithRelationInput | Prisma.PlanOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the position for listing Plans.
   */
  cursor?: Prisma.PlanWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Take `±n` Plans 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` Plans.
   */
  skip?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
   * 
   * Filter by unique combinations of Plans.
   */
  distinct?: Prisma.PlanScalarFieldEnum | Prisma.PlanScalarFieldEnum[]
}

/**
 * Plan create
 */
export type PlanCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Plan
   */
  select?: Prisma.PlanSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Plan
   */
  omit?: Prisma.PlanOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.PlanInclude<ExtArgs> | null
  /**
   * The data needed to create a Plan.
   */
  data: Prisma.XOR<Prisma.PlanCreateInput, Prisma.PlanUncheckedCreateInput>
}

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

/**
 * Plan createManyAndReturn
 */
export type PlanCreateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Plan
   */
  select?: Prisma.PlanSelectCreateManyAndReturn<ExtArgs> | null
  /**
   * Omit specific fields from the Plan
   */
  omit?: Prisma.PlanOmit<ExtArgs> | null
  /**
   * The data used to create many Plans.
   */
  data: Prisma.PlanCreateManyInput | Prisma.PlanCreateManyInput[]
  skipDuplicates?: boolean
}

/**
 * Plan update
 */
export type PlanUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Plan
   */
  select?: Prisma.PlanSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Plan
   */
  omit?: Prisma.PlanOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.PlanInclude<ExtArgs> | null
  /**
   * The data needed to update a Plan.
   */
  data: Prisma.XOR<Prisma.PlanUpdateInput, Prisma.PlanUncheckedUpdateInput>
  /**
   * Choose, which Plan to update.
   */
  where: Prisma.PlanWhereUniqueInput
}

/**
 * Plan updateMany
 */
export type PlanUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * The data used to update Plans.
   */
  data: Prisma.XOR<Prisma.PlanUpdateManyMutationInput, Prisma.PlanUncheckedUpdateManyInput>
  /**
   * Filter which Plans to update
   */
  where?: Prisma.PlanWhereInput
  /**
   * Limit how many Plans to update.
   */
  limit?: number
}

/**
 * Plan updateManyAndReturn
 */
export type PlanUpdateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Plan
   */
  select?: Prisma.PlanSelectUpdateManyAndReturn<ExtArgs> | null
  /**
   * Omit specific fields from the Plan
   */
  omit?: Prisma.PlanOmit<ExtArgs> | null
  /**
   * The data used to update Plans.
   */
  data: Prisma.XOR<Prisma.PlanUpdateManyMutationInput, Prisma.PlanUncheckedUpdateManyInput>
  /**
   * Filter which Plans to update
   */
  where?: Prisma.PlanWhereInput
  /**
   * Limit how many Plans to update.
   */
  limit?: number
}

/**
 * Plan upsert
 */
export type PlanUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Plan
   */
  select?: Prisma.PlanSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Plan
   */
  omit?: Prisma.PlanOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.PlanInclude<ExtArgs> | null
  /**
   * The filter to search for the Plan to update in case it exists.
   */
  where: Prisma.PlanWhereUniqueInput
  /**
   * In case the Plan found by the `where` argument doesn't exist, create a new Plan with this data.
   */
  create: Prisma.XOR<Prisma.PlanCreateInput, Prisma.PlanUncheckedCreateInput>
  /**
   * In case the Plan was found with the provided `where` argument, update it with this data.
   */
  update: Prisma.XOR<Prisma.PlanUpdateInput, Prisma.PlanUncheckedUpdateInput>
}

/**
 * Plan delete
 */
export type PlanDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Plan
   */
  select?: Prisma.PlanSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Plan
   */
  omit?: Prisma.PlanOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.PlanInclude<ExtArgs> | null
  /**
   * Filter which Plan to delete.
   */
  where: Prisma.PlanWhereUniqueInput
}

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

/**
 * Plan.features
 */
export type Plan$featuresArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the PlanFeature
   */
  select?: Prisma.PlanFeatureSelect<ExtArgs> | null
  /**
   * Omit specific fields from the PlanFeature
   */
  omit?: Prisma.PlanFeatureOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.PlanFeatureInclude<ExtArgs> | null
  where?: Prisma.PlanFeatureWhereInput
  orderBy?: Prisma.PlanFeatureOrderByWithRelationInput | Prisma.PlanFeatureOrderByWithRelationInput[]
  cursor?: Prisma.PlanFeatureWhereUniqueInput
  take?: number
  skip?: number
  distinct?: Prisma.PlanFeatureScalarFieldEnum | Prisma.PlanFeatureScalarFieldEnum[]
}

/**
 * Plan.subscriptions
 */
export type Plan$subscriptionsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Subscription
   */
  select?: Prisma.SubscriptionSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Subscription
   */
  omit?: Prisma.SubscriptionOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.SubscriptionInclude<ExtArgs> | null
  where?: Prisma.SubscriptionWhereInput
  orderBy?: Prisma.SubscriptionOrderByWithRelationInput | Prisma.SubscriptionOrderByWithRelationInput[]
  cursor?: Prisma.SubscriptionWhereUniqueInput
  take?: number
  skip?: number
  distinct?: Prisma.SubscriptionScalarFieldEnum | Prisma.SubscriptionScalarFieldEnum[]
}

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