iboard/generated/prisma/models/Alert.ts
2026-08-06 15:39:59 +08:00

1239 lines
39 KiB
TypeScript

/* !!! This is code generated by Prisma. Do not edit directly. !!! */
/* eslint-disable */
// biome-ignore-all lint: generated file
// @ts-nocheck
/*
* This file exports the `Alert` 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.ts"
import type * as Prisma from "../internal/prismaNamespace.ts"
/**
* Model Alert
*
*/
export type AlertModel = runtime.Types.Result.DefaultSelection<Prisma.$AlertPayload>
export type AggregateAlert = {
_count: AlertCountAggregateOutputType | null
_avg: AlertAvgAggregateOutputType | null
_sum: AlertSumAggregateOutputType | null
_min: AlertMinAggregateOutputType | null
_max: AlertMaxAggregateOutputType | null
}
export type AlertAvgAggregateOutputType = {
id: number | null
valueA: number | null
valueB: number | null
diff: number | null
diffRatio: number | null
}
export type AlertSumAggregateOutputType = {
id: number | null
valueA: number | null
valueB: number | null
diff: number | null
diffRatio: number | null
}
export type AlertMinAggregateOutputType = {
id: number | null
indicatorName: string | null
period: string | null
valueA: number | null
valueB: number | null
sourceA: string | null
sourceB: string | null
diff: number | null
diffRatio: number | null
createdAt: Date | null
}
export type AlertMaxAggregateOutputType = {
id: number | null
indicatorName: string | null
period: string | null
valueA: number | null
valueB: number | null
sourceA: string | null
sourceB: string | null
diff: number | null
diffRatio: number | null
createdAt: Date | null
}
export type AlertCountAggregateOutputType = {
id: number
indicatorName: number
period: number
valueA: number
valueB: number
sourceA: number
sourceB: number
diff: number
diffRatio: number
createdAt: number
_all: number
}
export type AlertAvgAggregateInputType = {
id?: true
valueA?: true
valueB?: true
diff?: true
diffRatio?: true
}
export type AlertSumAggregateInputType = {
id?: true
valueA?: true
valueB?: true
diff?: true
diffRatio?: true
}
export type AlertMinAggregateInputType = {
id?: true
indicatorName?: true
period?: true
valueA?: true
valueB?: true
sourceA?: true
sourceB?: true
diff?: true
diffRatio?: true
createdAt?: true
}
export type AlertMaxAggregateInputType = {
id?: true
indicatorName?: true
period?: true
valueA?: true
valueB?: true
sourceA?: true
sourceB?: true
diff?: true
diffRatio?: true
createdAt?: true
}
export type AlertCountAggregateInputType = {
id?: true
indicatorName?: true
period?: true
valueA?: true
valueB?: true
sourceA?: true
sourceB?: true
diff?: true
diffRatio?: true
createdAt?: true
_all?: true
}
export type AlertAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Filter which Alert to aggregate.
*/
where?: Prisma.AlertWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of Alerts to fetch.
*/
orderBy?: Prisma.AlertOrderByWithRelationInput | Prisma.AlertOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the start position
*/
cursor?: Prisma.AlertWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` Alerts 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` Alerts.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Count returned Alerts
**/
_count?: true | AlertCountAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to average
**/
_avg?: AlertAvgAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to sum
**/
_sum?: AlertSumAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to find the minimum value
**/
_min?: AlertMinAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to find the maximum value
**/
_max?: AlertMaxAggregateInputType
}
export type GetAlertAggregateType<T extends AlertAggregateArgs> = {
[P in keyof T & keyof AggregateAlert]: P extends '_count' | 'count'
? T[P] extends true
? number
: Prisma.GetScalarType<T[P], AggregateAlert[P]>
: Prisma.GetScalarType<T[P], AggregateAlert[P]>
}
export type AlertGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
where?: Prisma.AlertWhereInput
orderBy?: Prisma.AlertOrderByWithAggregationInput | Prisma.AlertOrderByWithAggregationInput[]
by: Prisma.AlertScalarFieldEnum[] | Prisma.AlertScalarFieldEnum
having?: Prisma.AlertScalarWhereWithAggregatesInput
take?: number
skip?: number
_count?: AlertCountAggregateInputType | true
_avg?: AlertAvgAggregateInputType
_sum?: AlertSumAggregateInputType
_min?: AlertMinAggregateInputType
_max?: AlertMaxAggregateInputType
}
export type AlertGroupByOutputType = {
id: number
indicatorName: string
period: string
valueA: number
valueB: number
sourceA: string
sourceB: string
diff: number
diffRatio: number
createdAt: Date
_count: AlertCountAggregateOutputType | null
_avg: AlertAvgAggregateOutputType | null
_sum: AlertSumAggregateOutputType | null
_min: AlertMinAggregateOutputType | null
_max: AlertMaxAggregateOutputType | null
}
export type GetAlertGroupByPayload<T extends AlertGroupByArgs> = Prisma.PrismaPromise<
Array<
Prisma.PickEnumerable<AlertGroupByOutputType, T['by']> &
{
[P in ((keyof T) & (keyof AlertGroupByOutputType))]: P extends '_count'
? T[P] extends boolean
? number
: Prisma.GetScalarType<T[P], AlertGroupByOutputType[P]>
: Prisma.GetScalarType<T[P], AlertGroupByOutputType[P]>
}
>
>
export type AlertWhereInput = {
AND?: Prisma.AlertWhereInput | Prisma.AlertWhereInput[]
OR?: Prisma.AlertWhereInput[]
NOT?: Prisma.AlertWhereInput | Prisma.AlertWhereInput[]
id?: Prisma.IntFilter<"Alert"> | number
indicatorName?: Prisma.StringFilter<"Alert"> | string
period?: Prisma.StringFilter<"Alert"> | string
valueA?: Prisma.FloatFilter<"Alert"> | number
valueB?: Prisma.FloatFilter<"Alert"> | number
sourceA?: Prisma.StringFilter<"Alert"> | string
sourceB?: Prisma.StringFilter<"Alert"> | string
diff?: Prisma.FloatFilter<"Alert"> | number
diffRatio?: Prisma.FloatFilter<"Alert"> | number
createdAt?: Prisma.DateTimeFilter<"Alert"> | Date | string
}
export type AlertOrderByWithRelationInput = {
id?: Prisma.SortOrder
indicatorName?: Prisma.SortOrder
period?: Prisma.SortOrder
valueA?: Prisma.SortOrder
valueB?: Prisma.SortOrder
sourceA?: Prisma.SortOrder
sourceB?: Prisma.SortOrder
diff?: Prisma.SortOrder
diffRatio?: Prisma.SortOrder
createdAt?: Prisma.SortOrder
_relevance?: Prisma.AlertOrderByRelevanceInput
}
export type AlertWhereUniqueInput = Prisma.AtLeast<{
id?: number
AND?: Prisma.AlertWhereInput | Prisma.AlertWhereInput[]
OR?: Prisma.AlertWhereInput[]
NOT?: Prisma.AlertWhereInput | Prisma.AlertWhereInput[]
indicatorName?: Prisma.StringFilter<"Alert"> | string
period?: Prisma.StringFilter<"Alert"> | string
valueA?: Prisma.FloatFilter<"Alert"> | number
valueB?: Prisma.FloatFilter<"Alert"> | number
sourceA?: Prisma.StringFilter<"Alert"> | string
sourceB?: Prisma.StringFilter<"Alert"> | string
diff?: Prisma.FloatFilter<"Alert"> | number
diffRatio?: Prisma.FloatFilter<"Alert"> | number
createdAt?: Prisma.DateTimeFilter<"Alert"> | Date | string
}, "id">
export type AlertOrderByWithAggregationInput = {
id?: Prisma.SortOrder
indicatorName?: Prisma.SortOrder
period?: Prisma.SortOrder
valueA?: Prisma.SortOrder
valueB?: Prisma.SortOrder
sourceA?: Prisma.SortOrder
sourceB?: Prisma.SortOrder
diff?: Prisma.SortOrder
diffRatio?: Prisma.SortOrder
createdAt?: Prisma.SortOrder
_count?: Prisma.AlertCountOrderByAggregateInput
_avg?: Prisma.AlertAvgOrderByAggregateInput
_max?: Prisma.AlertMaxOrderByAggregateInput
_min?: Prisma.AlertMinOrderByAggregateInput
_sum?: Prisma.AlertSumOrderByAggregateInput
}
export type AlertScalarWhereWithAggregatesInput = {
AND?: Prisma.AlertScalarWhereWithAggregatesInput | Prisma.AlertScalarWhereWithAggregatesInput[]
OR?: Prisma.AlertScalarWhereWithAggregatesInput[]
NOT?: Prisma.AlertScalarWhereWithAggregatesInput | Prisma.AlertScalarWhereWithAggregatesInput[]
id?: Prisma.IntWithAggregatesFilter<"Alert"> | number
indicatorName?: Prisma.StringWithAggregatesFilter<"Alert"> | string
period?: Prisma.StringWithAggregatesFilter<"Alert"> | string
valueA?: Prisma.FloatWithAggregatesFilter<"Alert"> | number
valueB?: Prisma.FloatWithAggregatesFilter<"Alert"> | number
sourceA?: Prisma.StringWithAggregatesFilter<"Alert"> | string
sourceB?: Prisma.StringWithAggregatesFilter<"Alert"> | string
diff?: Prisma.FloatWithAggregatesFilter<"Alert"> | number
diffRatio?: Prisma.FloatWithAggregatesFilter<"Alert"> | number
createdAt?: Prisma.DateTimeWithAggregatesFilter<"Alert"> | Date | string
}
export type AlertCreateInput = {
indicatorName: string
period: string
valueA: number
valueB: number
sourceA: string
sourceB: string
diff: number
diffRatio: number
createdAt?: Date | string
}
export type AlertUncheckedCreateInput = {
id?: number
indicatorName: string
period: string
valueA: number
valueB: number
sourceA: string
sourceB: string
diff: number
diffRatio: number
createdAt?: Date | string
}
export type AlertUpdateInput = {
indicatorName?: Prisma.StringFieldUpdateOperationsInput | string
period?: Prisma.StringFieldUpdateOperationsInput | string
valueA?: Prisma.FloatFieldUpdateOperationsInput | number
valueB?: Prisma.FloatFieldUpdateOperationsInput | number
sourceA?: Prisma.StringFieldUpdateOperationsInput | string
sourceB?: Prisma.StringFieldUpdateOperationsInput | string
diff?: Prisma.FloatFieldUpdateOperationsInput | number
diffRatio?: Prisma.FloatFieldUpdateOperationsInput | number
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}
export type AlertUncheckedUpdateInput = {
id?: Prisma.IntFieldUpdateOperationsInput | number
indicatorName?: Prisma.StringFieldUpdateOperationsInput | string
period?: Prisma.StringFieldUpdateOperationsInput | string
valueA?: Prisma.FloatFieldUpdateOperationsInput | number
valueB?: Prisma.FloatFieldUpdateOperationsInput | number
sourceA?: Prisma.StringFieldUpdateOperationsInput | string
sourceB?: Prisma.StringFieldUpdateOperationsInput | string
diff?: Prisma.FloatFieldUpdateOperationsInput | number
diffRatio?: Prisma.FloatFieldUpdateOperationsInput | number
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}
export type AlertCreateManyInput = {
id?: number
indicatorName: string
period: string
valueA: number
valueB: number
sourceA: string
sourceB: string
diff: number
diffRatio: number
createdAt?: Date | string
}
export type AlertUpdateManyMutationInput = {
indicatorName?: Prisma.StringFieldUpdateOperationsInput | string
period?: Prisma.StringFieldUpdateOperationsInput | string
valueA?: Prisma.FloatFieldUpdateOperationsInput | number
valueB?: Prisma.FloatFieldUpdateOperationsInput | number
sourceA?: Prisma.StringFieldUpdateOperationsInput | string
sourceB?: Prisma.StringFieldUpdateOperationsInput | string
diff?: Prisma.FloatFieldUpdateOperationsInput | number
diffRatio?: Prisma.FloatFieldUpdateOperationsInput | number
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}
export type AlertUncheckedUpdateManyInput = {
id?: Prisma.IntFieldUpdateOperationsInput | number
indicatorName?: Prisma.StringFieldUpdateOperationsInput | string
period?: Prisma.StringFieldUpdateOperationsInput | string
valueA?: Prisma.FloatFieldUpdateOperationsInput | number
valueB?: Prisma.FloatFieldUpdateOperationsInput | number
sourceA?: Prisma.StringFieldUpdateOperationsInput | string
sourceB?: Prisma.StringFieldUpdateOperationsInput | string
diff?: Prisma.FloatFieldUpdateOperationsInput | number
diffRatio?: Prisma.FloatFieldUpdateOperationsInput | number
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}
export type AlertOrderByRelevanceInput = {
fields: Prisma.AlertOrderByRelevanceFieldEnum | Prisma.AlertOrderByRelevanceFieldEnum[]
sort: Prisma.SortOrder
search: string
}
export type AlertCountOrderByAggregateInput = {
id?: Prisma.SortOrder
indicatorName?: Prisma.SortOrder
period?: Prisma.SortOrder
valueA?: Prisma.SortOrder
valueB?: Prisma.SortOrder
sourceA?: Prisma.SortOrder
sourceB?: Prisma.SortOrder
diff?: Prisma.SortOrder
diffRatio?: Prisma.SortOrder
createdAt?: Prisma.SortOrder
}
export type AlertAvgOrderByAggregateInput = {
id?: Prisma.SortOrder
valueA?: Prisma.SortOrder
valueB?: Prisma.SortOrder
diff?: Prisma.SortOrder
diffRatio?: Prisma.SortOrder
}
export type AlertMaxOrderByAggregateInput = {
id?: Prisma.SortOrder
indicatorName?: Prisma.SortOrder
period?: Prisma.SortOrder
valueA?: Prisma.SortOrder
valueB?: Prisma.SortOrder
sourceA?: Prisma.SortOrder
sourceB?: Prisma.SortOrder
diff?: Prisma.SortOrder
diffRatio?: Prisma.SortOrder
createdAt?: Prisma.SortOrder
}
export type AlertMinOrderByAggregateInput = {
id?: Prisma.SortOrder
indicatorName?: Prisma.SortOrder
period?: Prisma.SortOrder
valueA?: Prisma.SortOrder
valueB?: Prisma.SortOrder
sourceA?: Prisma.SortOrder
sourceB?: Prisma.SortOrder
diff?: Prisma.SortOrder
diffRatio?: Prisma.SortOrder
createdAt?: Prisma.SortOrder
}
export type AlertSumOrderByAggregateInput = {
id?: Prisma.SortOrder
valueA?: Prisma.SortOrder
valueB?: Prisma.SortOrder
diff?: Prisma.SortOrder
diffRatio?: Prisma.SortOrder
}
export type AlertSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
id?: boolean
indicatorName?: boolean
period?: boolean
valueA?: boolean
valueB?: boolean
sourceA?: boolean
sourceB?: boolean
diff?: boolean
diffRatio?: boolean
createdAt?: boolean
}, ExtArgs["result"]["alert"]>
export type AlertSelectScalar = {
id?: boolean
indicatorName?: boolean
period?: boolean
valueA?: boolean
valueB?: boolean
sourceA?: boolean
sourceB?: boolean
diff?: boolean
diffRatio?: boolean
createdAt?: boolean
}
export type AlertOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "indicatorName" | "period" | "valueA" | "valueB" | "sourceA" | "sourceB" | "diff" | "diffRatio" | "createdAt", ExtArgs["result"]["alert"]>
export type $AlertPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
name: "Alert"
objects: {}
scalars: runtime.Types.Extensions.GetPayloadResult<{
id: number
indicatorName: string
period: string
valueA: number
valueB: number
sourceA: string
sourceB: string
diff: number
diffRatio: number
createdAt: Date
}, ExtArgs["result"]["alert"]>
composites: {}
}
export type AlertGetPayload<S extends boolean | null | undefined | AlertDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$AlertPayload, S>
export type AlertCountArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> =
Omit<AlertFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
select?: AlertCountAggregateInputType | true
}
export interface AlertDelegate<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> {
[K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['Alert'], meta: { name: 'Alert' } }
/**
* Find zero or one Alert that matches the filter.
* @param {AlertFindUniqueArgs} args - Arguments to find a Alert
* @example
* // Get one Alert
* const alert = await prisma.alert.findUnique({
* where: {
* // ... provide filter here
* }
* })
*/
findUnique<T extends AlertFindUniqueArgs>(args: Prisma.SelectSubset<T, AlertFindUniqueArgs<ExtArgs>>): Prisma.Prisma__AlertClient<runtime.Types.Result.GetResult<Prisma.$AlertPayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
/**
* Find one Alert that matches the filter or throw an error with `error.code='P2025'`
* if no matches were found.
* @param {AlertFindUniqueOrThrowArgs} args - Arguments to find a Alert
* @example
* // Get one Alert
* const alert = await prisma.alert.findUniqueOrThrow({
* where: {
* // ... provide filter here
* }
* })
*/
findUniqueOrThrow<T extends AlertFindUniqueOrThrowArgs>(args: Prisma.SelectSubset<T, AlertFindUniqueOrThrowArgs<ExtArgs>>): Prisma.Prisma__AlertClient<runtime.Types.Result.GetResult<Prisma.$AlertPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Find the first Alert 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 {AlertFindFirstArgs} args - Arguments to find a Alert
* @example
* // Get one Alert
* const alert = await prisma.alert.findFirst({
* where: {
* // ... provide filter here
* }
* })
*/
findFirst<T extends AlertFindFirstArgs>(args?: Prisma.SelectSubset<T, AlertFindFirstArgs<ExtArgs>>): Prisma.Prisma__AlertClient<runtime.Types.Result.GetResult<Prisma.$AlertPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
/**
* Find the first Alert 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 {AlertFindFirstOrThrowArgs} args - Arguments to find a Alert
* @example
* // Get one Alert
* const alert = await prisma.alert.findFirstOrThrow({
* where: {
* // ... provide filter here
* }
* })
*/
findFirstOrThrow<T extends AlertFindFirstOrThrowArgs>(args?: Prisma.SelectSubset<T, AlertFindFirstOrThrowArgs<ExtArgs>>): Prisma.Prisma__AlertClient<runtime.Types.Result.GetResult<Prisma.$AlertPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Find zero or more Alerts 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 {AlertFindManyArgs} args - Arguments to filter and select certain fields only.
* @example
* // Get all Alerts
* const alerts = await prisma.alert.findMany()
*
* // Get first 10 Alerts
* const alerts = await prisma.alert.findMany({ take: 10 })
*
* // Only select the `id`
* const alertWithIdOnly = await prisma.alert.findMany({ select: { id: true } })
*
*/
findMany<T extends AlertFindManyArgs>(args?: Prisma.SelectSubset<T, AlertFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$AlertPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>
/**
* Create a Alert.
* @param {AlertCreateArgs} args - Arguments to create a Alert.
* @example
* // Create one Alert
* const Alert = await prisma.alert.create({
* data: {
* // ... data to create a Alert
* }
* })
*
*/
create<T extends AlertCreateArgs>(args: Prisma.SelectSubset<T, AlertCreateArgs<ExtArgs>>): Prisma.Prisma__AlertClient<runtime.Types.Result.GetResult<Prisma.$AlertPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Create many Alerts.
* @param {AlertCreateManyArgs} args - Arguments to create many Alerts.
* @example
* // Create many Alerts
* const alert = await prisma.alert.createMany({
* data: [
* // ... provide data here
* ]
* })
*
*/
createMany<T extends AlertCreateManyArgs>(args?: Prisma.SelectSubset<T, AlertCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
/**
* Delete a Alert.
* @param {AlertDeleteArgs} args - Arguments to delete one Alert.
* @example
* // Delete one Alert
* const Alert = await prisma.alert.delete({
* where: {
* // ... filter to delete one Alert
* }
* })
*
*/
delete<T extends AlertDeleteArgs>(args: Prisma.SelectSubset<T, AlertDeleteArgs<ExtArgs>>): Prisma.Prisma__AlertClient<runtime.Types.Result.GetResult<Prisma.$AlertPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Update one Alert.
* @param {AlertUpdateArgs} args - Arguments to update one Alert.
* @example
* // Update one Alert
* const alert = await prisma.alert.update({
* where: {
* // ... provide filter here
* },
* data: {
* // ... provide data here
* }
* })
*
*/
update<T extends AlertUpdateArgs>(args: Prisma.SelectSubset<T, AlertUpdateArgs<ExtArgs>>): Prisma.Prisma__AlertClient<runtime.Types.Result.GetResult<Prisma.$AlertPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Delete zero or more Alerts.
* @param {AlertDeleteManyArgs} args - Arguments to filter Alerts to delete.
* @example
* // Delete a few Alerts
* const { count } = await prisma.alert.deleteMany({
* where: {
* // ... provide filter here
* }
* })
*
*/
deleteMany<T extends AlertDeleteManyArgs>(args?: Prisma.SelectSubset<T, AlertDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
/**
* Update zero or more Alerts.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {AlertUpdateManyArgs} args - Arguments to update one or more rows.
* @example
* // Update many Alerts
* const alert = await prisma.alert.updateMany({
* where: {
* // ... provide filter here
* },
* data: {
* // ... provide data here
* }
* })
*
*/
updateMany<T extends AlertUpdateManyArgs>(args: Prisma.SelectSubset<T, AlertUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
/**
* Create or update one Alert.
* @param {AlertUpsertArgs} args - Arguments to update or create a Alert.
* @example
* // Update or create a Alert
* const alert = await prisma.alert.upsert({
* create: {
* // ... data to create a Alert
* },
* update: {
* // ... in case it already exists, update
* },
* where: {
* // ... the filter for the Alert we want to update
* }
* })
*/
upsert<T extends AlertUpsertArgs>(args: Prisma.SelectSubset<T, AlertUpsertArgs<ExtArgs>>): Prisma.Prisma__AlertClient<runtime.Types.Result.GetResult<Prisma.$AlertPayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Count the number of Alerts.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {AlertCountArgs} args - Arguments to filter Alerts to count.
* @example
* // Count the number of Alerts
* const count = await prisma.alert.count({
* where: {
* // ... the filter for the Alerts we want to count
* }
* })
**/
count<T extends AlertCountArgs>(
args?: Prisma.Subset<T, AlertCountArgs>,
): Prisma.PrismaPromise<
T extends runtime.Types.Utils.Record<'select', any>
? T['select'] extends true
? number
: Prisma.GetScalarType<T['select'], AlertCountAggregateOutputType>
: number
>
/**
* Allows you to perform aggregations operations on a Alert.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {AlertAggregateArgs} 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 AlertAggregateArgs>(args: Prisma.Subset<T, AlertAggregateArgs>): Prisma.PrismaPromise<GetAlertAggregateType<T>>
/**
* Group by Alert.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {AlertGroupByArgs} 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 AlertGroupByArgs,
HasSelectOrTake extends Prisma.Or<
Prisma.Extends<'skip', Prisma.Keys<T>>,
Prisma.Extends<'take', Prisma.Keys<T>>
>,
OrderByArg extends Prisma.True extends HasSelectOrTake
? { orderBy: AlertGroupByArgs['orderBy'] }
: { orderBy?: AlertGroupByArgs['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, AlertGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetAlertGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
/**
* Fields of the Alert model
*/
readonly fields: AlertFieldRefs;
}
/**
* The delegate class that acts as a "Promise-like" for Alert.
* 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__AlertClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
readonly [Symbol.toStringTag]: "PrismaPromise"
/**
* Attaches callbacks for the resolution and/or rejection of the Promise.
* @param onfulfilled The callback to execute when the Promise is resolved.
* @param onrejected The callback to execute when the Promise is rejected.
* @returns A Promise for the completion of which ever callback is executed.
*/
then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): runtime.Types.Utils.JsPromise<TResult1 | TResult2>
/**
* Attaches a callback for only the rejection of the Promise.
* @param onrejected The callback to execute when the Promise is rejected.
* @returns A Promise for the completion of the callback.
*/
catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): runtime.Types.Utils.JsPromise<T | TResult>
/**
* Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
* resolved value cannot be modified from the callback.
* @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
* @returns A Promise for the completion of the callback.
*/
finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise<T>
}
/**
* Fields of the Alert model
*/
export interface AlertFieldRefs {
readonly id: Prisma.FieldRef<"Alert", 'Int'>
readonly indicatorName: Prisma.FieldRef<"Alert", 'String'>
readonly period: Prisma.FieldRef<"Alert", 'String'>
readonly valueA: Prisma.FieldRef<"Alert", 'Float'>
readonly valueB: Prisma.FieldRef<"Alert", 'Float'>
readonly sourceA: Prisma.FieldRef<"Alert", 'String'>
readonly sourceB: Prisma.FieldRef<"Alert", 'String'>
readonly diff: Prisma.FieldRef<"Alert", 'Float'>
readonly diffRatio: Prisma.FieldRef<"Alert", 'Float'>
readonly createdAt: Prisma.FieldRef<"Alert", 'DateTime'>
}
// Custom InputTypes
/**
* Alert findUnique
*/
export type AlertFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Alert
*/
select?: Prisma.AlertSelect<ExtArgs> | null
/**
* Omit specific fields from the Alert
*/
omit?: Prisma.AlertOmit<ExtArgs> | null
/**
* Filter, which Alert to fetch.
*/
where: Prisma.AlertWhereUniqueInput
}
/**
* Alert findUniqueOrThrow
*/
export type AlertFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Alert
*/
select?: Prisma.AlertSelect<ExtArgs> | null
/**
* Omit specific fields from the Alert
*/
omit?: Prisma.AlertOmit<ExtArgs> | null
/**
* Filter, which Alert to fetch.
*/
where: Prisma.AlertWhereUniqueInput
}
/**
* Alert findFirst
*/
export type AlertFindFirstArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Alert
*/
select?: Prisma.AlertSelect<ExtArgs> | null
/**
* Omit specific fields from the Alert
*/
omit?: Prisma.AlertOmit<ExtArgs> | null
/**
* Filter, which Alert to fetch.
*/
where?: Prisma.AlertWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of Alerts to fetch.
*/
orderBy?: Prisma.AlertOrderByWithRelationInput | Prisma.AlertOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for searching for Alerts.
*/
cursor?: Prisma.AlertWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` Alerts 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` Alerts.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
*
* Filter by unique combinations of Alerts.
*/
distinct?: Prisma.AlertScalarFieldEnum | Prisma.AlertScalarFieldEnum[]
}
/**
* Alert findFirstOrThrow
*/
export type AlertFindFirstOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Alert
*/
select?: Prisma.AlertSelect<ExtArgs> | null
/**
* Omit specific fields from the Alert
*/
omit?: Prisma.AlertOmit<ExtArgs> | null
/**
* Filter, which Alert to fetch.
*/
where?: Prisma.AlertWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of Alerts to fetch.
*/
orderBy?: Prisma.AlertOrderByWithRelationInput | Prisma.AlertOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for searching for Alerts.
*/
cursor?: Prisma.AlertWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` Alerts 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` Alerts.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
*
* Filter by unique combinations of Alerts.
*/
distinct?: Prisma.AlertScalarFieldEnum | Prisma.AlertScalarFieldEnum[]
}
/**
* Alert findMany
*/
export type AlertFindManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Alert
*/
select?: Prisma.AlertSelect<ExtArgs> | null
/**
* Omit specific fields from the Alert
*/
omit?: Prisma.AlertOmit<ExtArgs> | null
/**
* Filter, which Alerts to fetch.
*/
where?: Prisma.AlertWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of Alerts to fetch.
*/
orderBy?: Prisma.AlertOrderByWithRelationInput | Prisma.AlertOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for listing Alerts.
*/
cursor?: Prisma.AlertWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` Alerts 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` Alerts.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
*
* Filter by unique combinations of Alerts.
*/
distinct?: Prisma.AlertScalarFieldEnum | Prisma.AlertScalarFieldEnum[]
}
/**
* Alert create
*/
export type AlertCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Alert
*/
select?: Prisma.AlertSelect<ExtArgs> | null
/**
* Omit specific fields from the Alert
*/
omit?: Prisma.AlertOmit<ExtArgs> | null
/**
* The data needed to create a Alert.
*/
data: Prisma.XOR<Prisma.AlertCreateInput, Prisma.AlertUncheckedCreateInput>
}
/**
* Alert createMany
*/
export type AlertCreateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* The data used to create many Alerts.
*/
data: Prisma.AlertCreateManyInput | Prisma.AlertCreateManyInput[]
skipDuplicates?: boolean
}
/**
* Alert update
*/
export type AlertUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Alert
*/
select?: Prisma.AlertSelect<ExtArgs> | null
/**
* Omit specific fields from the Alert
*/
omit?: Prisma.AlertOmit<ExtArgs> | null
/**
* The data needed to update a Alert.
*/
data: Prisma.XOR<Prisma.AlertUpdateInput, Prisma.AlertUncheckedUpdateInput>
/**
* Choose, which Alert to update.
*/
where: Prisma.AlertWhereUniqueInput
}
/**
* Alert updateMany
*/
export type AlertUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* The data used to update Alerts.
*/
data: Prisma.XOR<Prisma.AlertUpdateManyMutationInput, Prisma.AlertUncheckedUpdateManyInput>
/**
* Filter which Alerts to update
*/
where?: Prisma.AlertWhereInput
/**
* Limit how many Alerts to update.
*/
limit?: number
}
/**
* Alert upsert
*/
export type AlertUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Alert
*/
select?: Prisma.AlertSelect<ExtArgs> | null
/**
* Omit specific fields from the Alert
*/
omit?: Prisma.AlertOmit<ExtArgs> | null
/**
* The filter to search for the Alert to update in case it exists.
*/
where: Prisma.AlertWhereUniqueInput
/**
* In case the Alert found by the `where` argument doesn't exist, create a new Alert with this data.
*/
create: Prisma.XOR<Prisma.AlertCreateInput, Prisma.AlertUncheckedCreateInput>
/**
* In case the Alert was found with the provided `where` argument, update it with this data.
*/
update: Prisma.XOR<Prisma.AlertUpdateInput, Prisma.AlertUncheckedUpdateInput>
}
/**
* Alert delete
*/
export type AlertDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Alert
*/
select?: Prisma.AlertSelect<ExtArgs> | null
/**
* Omit specific fields from the Alert
*/
omit?: Prisma.AlertOmit<ExtArgs> | null
/**
* Filter which Alert to delete.
*/
where: Prisma.AlertWhereUniqueInput
}
/**
* Alert deleteMany
*/
export type AlertDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Filter which Alerts to delete
*/
where?: Prisma.AlertWhereInput
/**
* Limit how many Alerts to delete.
*/
limit?: number
}
/**
* Alert without action
*/
export type AlertDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Alert
*/
select?: Prisma.AlertSelect<ExtArgs> | null
/**
* Omit specific fields from the Alert
*/
omit?: Prisma.AlertOmit<ExtArgs> | null
}