iboard/generated/prisma/models/News.ts
2026-08-06 16:41:47 +08:00

1205 lines
38 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 `News` 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 News
*
*/
export type NewsModel = runtime.Types.Result.DefaultSelection<Prisma.$NewsPayload>
export type AggregateNews = {
_count: NewsCountAggregateOutputType | null
_avg: NewsAvgAggregateOutputType | null
_sum: NewsSumAggregateOutputType | null
_min: NewsMinAggregateOutputType | null
_max: NewsMaxAggregateOutputType | null
}
export type NewsAvgAggregateOutputType = {
id: number | null
impactRank: number | null
}
export type NewsSumAggregateOutputType = {
id: number | null
impactRank: number | null
}
export type NewsMinAggregateOutputType = {
id: number | null
title: string | null
summary: string | null
content: string | null
source: string | null
url: string | null
publishedAt: Date | null
impactRank: number | null
createdAt: Date | null
}
export type NewsMaxAggregateOutputType = {
id: number | null
title: string | null
summary: string | null
content: string | null
source: string | null
url: string | null
publishedAt: Date | null
impactRank: number | null
createdAt: Date | null
}
export type NewsCountAggregateOutputType = {
id: number
title: number
summary: number
content: number
source: number
url: number
publishedAt: number
impactRank: number
createdAt: number
_all: number
}
export type NewsAvgAggregateInputType = {
id?: true
impactRank?: true
}
export type NewsSumAggregateInputType = {
id?: true
impactRank?: true
}
export type NewsMinAggregateInputType = {
id?: true
title?: true
summary?: true
content?: true
source?: true
url?: true
publishedAt?: true
impactRank?: true
createdAt?: true
}
export type NewsMaxAggregateInputType = {
id?: true
title?: true
summary?: true
content?: true
source?: true
url?: true
publishedAt?: true
impactRank?: true
createdAt?: true
}
export type NewsCountAggregateInputType = {
id?: true
title?: true
summary?: true
content?: true
source?: true
url?: true
publishedAt?: true
impactRank?: true
createdAt?: true
_all?: true
}
export type NewsAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Filter which News to aggregate.
*/
where?: Prisma.NewsWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of News to fetch.
*/
orderBy?: Prisma.NewsOrderByWithRelationInput | Prisma.NewsOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the start position
*/
cursor?: Prisma.NewsWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` News 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` News.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Count returned News
**/
_count?: true | NewsCountAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to average
**/
_avg?: NewsAvgAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to sum
**/
_sum?: NewsSumAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to find the minimum value
**/
_min?: NewsMinAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to find the maximum value
**/
_max?: NewsMaxAggregateInputType
}
export type GetNewsAggregateType<T extends NewsAggregateArgs> = {
[P in keyof T & keyof AggregateNews]: P extends '_count' | 'count'
? T[P] extends true
? number
: Prisma.GetScalarType<T[P], AggregateNews[P]>
: Prisma.GetScalarType<T[P], AggregateNews[P]>
}
export type NewsGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
where?: Prisma.NewsWhereInput
orderBy?: Prisma.NewsOrderByWithAggregationInput | Prisma.NewsOrderByWithAggregationInput[]
by: Prisma.NewsScalarFieldEnum[] | Prisma.NewsScalarFieldEnum
having?: Prisma.NewsScalarWhereWithAggregatesInput
take?: number
skip?: number
_count?: NewsCountAggregateInputType | true
_avg?: NewsAvgAggregateInputType
_sum?: NewsSumAggregateInputType
_min?: NewsMinAggregateInputType
_max?: NewsMaxAggregateInputType
}
export type NewsGroupByOutputType = {
id: number
title: string
summary: string
content: string | null
source: string
url: string
publishedAt: Date
impactRank: number
createdAt: Date
_count: NewsCountAggregateOutputType | null
_avg: NewsAvgAggregateOutputType | null
_sum: NewsSumAggregateOutputType | null
_min: NewsMinAggregateOutputType | null
_max: NewsMaxAggregateOutputType | null
}
export type GetNewsGroupByPayload<T extends NewsGroupByArgs> = Prisma.PrismaPromise<
Array<
Prisma.PickEnumerable<NewsGroupByOutputType, T['by']> &
{
[P in ((keyof T) & (keyof NewsGroupByOutputType))]: P extends '_count'
? T[P] extends boolean
? number
: Prisma.GetScalarType<T[P], NewsGroupByOutputType[P]>
: Prisma.GetScalarType<T[P], NewsGroupByOutputType[P]>
}
>
>
export type NewsWhereInput = {
AND?: Prisma.NewsWhereInput | Prisma.NewsWhereInput[]
OR?: Prisma.NewsWhereInput[]
NOT?: Prisma.NewsWhereInput | Prisma.NewsWhereInput[]
id?: Prisma.IntFilter<"News"> | number
title?: Prisma.StringFilter<"News"> | string
summary?: Prisma.StringFilter<"News"> | string
content?: Prisma.StringNullableFilter<"News"> | string | null
source?: Prisma.StringFilter<"News"> | string
url?: Prisma.StringFilter<"News"> | string
publishedAt?: Prisma.DateTimeFilter<"News"> | Date | string
impactRank?: Prisma.IntFilter<"News"> | number
createdAt?: Prisma.DateTimeFilter<"News"> | Date | string
}
export type NewsOrderByWithRelationInput = {
id?: Prisma.SortOrder
title?: Prisma.SortOrder
summary?: Prisma.SortOrder
content?: Prisma.SortOrderInput | Prisma.SortOrder
source?: Prisma.SortOrder
url?: Prisma.SortOrder
publishedAt?: Prisma.SortOrder
impactRank?: Prisma.SortOrder
createdAt?: Prisma.SortOrder
_relevance?: Prisma.NewsOrderByRelevanceInput
}
export type NewsWhereUniqueInput = Prisma.AtLeast<{
id?: number
title_publishedAt?: Prisma.NewsTitlePublishedAtCompoundUniqueInput
AND?: Prisma.NewsWhereInput | Prisma.NewsWhereInput[]
OR?: Prisma.NewsWhereInput[]
NOT?: Prisma.NewsWhereInput | Prisma.NewsWhereInput[]
title?: Prisma.StringFilter<"News"> | string
summary?: Prisma.StringFilter<"News"> | string
content?: Prisma.StringNullableFilter<"News"> | string | null
source?: Prisma.StringFilter<"News"> | string
url?: Prisma.StringFilter<"News"> | string
publishedAt?: Prisma.DateTimeFilter<"News"> | Date | string
impactRank?: Prisma.IntFilter<"News"> | number
createdAt?: Prisma.DateTimeFilter<"News"> | Date | string
}, "id" | "title_publishedAt">
export type NewsOrderByWithAggregationInput = {
id?: Prisma.SortOrder
title?: Prisma.SortOrder
summary?: Prisma.SortOrder
content?: Prisma.SortOrderInput | Prisma.SortOrder
source?: Prisma.SortOrder
url?: Prisma.SortOrder
publishedAt?: Prisma.SortOrder
impactRank?: Prisma.SortOrder
createdAt?: Prisma.SortOrder
_count?: Prisma.NewsCountOrderByAggregateInput
_avg?: Prisma.NewsAvgOrderByAggregateInput
_max?: Prisma.NewsMaxOrderByAggregateInput
_min?: Prisma.NewsMinOrderByAggregateInput
_sum?: Prisma.NewsSumOrderByAggregateInput
}
export type NewsScalarWhereWithAggregatesInput = {
AND?: Prisma.NewsScalarWhereWithAggregatesInput | Prisma.NewsScalarWhereWithAggregatesInput[]
OR?: Prisma.NewsScalarWhereWithAggregatesInput[]
NOT?: Prisma.NewsScalarWhereWithAggregatesInput | Prisma.NewsScalarWhereWithAggregatesInput[]
id?: Prisma.IntWithAggregatesFilter<"News"> | number
title?: Prisma.StringWithAggregatesFilter<"News"> | string
summary?: Prisma.StringWithAggregatesFilter<"News"> | string
content?: Prisma.StringNullableWithAggregatesFilter<"News"> | string | null
source?: Prisma.StringWithAggregatesFilter<"News"> | string
url?: Prisma.StringWithAggregatesFilter<"News"> | string
publishedAt?: Prisma.DateTimeWithAggregatesFilter<"News"> | Date | string
impactRank?: Prisma.IntWithAggregatesFilter<"News"> | number
createdAt?: Prisma.DateTimeWithAggregatesFilter<"News"> | Date | string
}
export type NewsCreateInput = {
title: string
summary?: string
content?: string | null
source?: string
url?: string
publishedAt: Date | string
impactRank: number
createdAt?: Date | string
}
export type NewsUncheckedCreateInput = {
id?: number
title: string
summary?: string
content?: string | null
source?: string
url?: string
publishedAt: Date | string
impactRank: number
createdAt?: Date | string
}
export type NewsUpdateInput = {
title?: Prisma.StringFieldUpdateOperationsInput | string
summary?: Prisma.StringFieldUpdateOperationsInput | string
content?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
source?: Prisma.StringFieldUpdateOperationsInput | string
url?: Prisma.StringFieldUpdateOperationsInput | string
publishedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
impactRank?: Prisma.IntFieldUpdateOperationsInput | number
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}
export type NewsUncheckedUpdateInput = {
id?: Prisma.IntFieldUpdateOperationsInput | number
title?: Prisma.StringFieldUpdateOperationsInput | string
summary?: Prisma.StringFieldUpdateOperationsInput | string
content?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
source?: Prisma.StringFieldUpdateOperationsInput | string
url?: Prisma.StringFieldUpdateOperationsInput | string
publishedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
impactRank?: Prisma.IntFieldUpdateOperationsInput | number
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}
export type NewsCreateManyInput = {
id?: number
title: string
summary?: string
content?: string | null
source?: string
url?: string
publishedAt: Date | string
impactRank: number
createdAt?: Date | string
}
export type NewsUpdateManyMutationInput = {
title?: Prisma.StringFieldUpdateOperationsInput | string
summary?: Prisma.StringFieldUpdateOperationsInput | string
content?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
source?: Prisma.StringFieldUpdateOperationsInput | string
url?: Prisma.StringFieldUpdateOperationsInput | string
publishedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
impactRank?: Prisma.IntFieldUpdateOperationsInput | number
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}
export type NewsUncheckedUpdateManyInput = {
id?: Prisma.IntFieldUpdateOperationsInput | number
title?: Prisma.StringFieldUpdateOperationsInput | string
summary?: Prisma.StringFieldUpdateOperationsInput | string
content?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
source?: Prisma.StringFieldUpdateOperationsInput | string
url?: Prisma.StringFieldUpdateOperationsInput | string
publishedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
impactRank?: Prisma.IntFieldUpdateOperationsInput | number
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}
export type NewsOrderByRelevanceInput = {
fields: Prisma.NewsOrderByRelevanceFieldEnum | Prisma.NewsOrderByRelevanceFieldEnum[]
sort: Prisma.SortOrder
search: string
}
export type NewsTitlePublishedAtCompoundUniqueInput = {
title: string
publishedAt: Date | string
}
export type NewsCountOrderByAggregateInput = {
id?: Prisma.SortOrder
title?: Prisma.SortOrder
summary?: Prisma.SortOrder
content?: Prisma.SortOrder
source?: Prisma.SortOrder
url?: Prisma.SortOrder
publishedAt?: Prisma.SortOrder
impactRank?: Prisma.SortOrder
createdAt?: Prisma.SortOrder
}
export type NewsAvgOrderByAggregateInput = {
id?: Prisma.SortOrder
impactRank?: Prisma.SortOrder
}
export type NewsMaxOrderByAggregateInput = {
id?: Prisma.SortOrder
title?: Prisma.SortOrder
summary?: Prisma.SortOrder
content?: Prisma.SortOrder
source?: Prisma.SortOrder
url?: Prisma.SortOrder
publishedAt?: Prisma.SortOrder
impactRank?: Prisma.SortOrder
createdAt?: Prisma.SortOrder
}
export type NewsMinOrderByAggregateInput = {
id?: Prisma.SortOrder
title?: Prisma.SortOrder
summary?: Prisma.SortOrder
content?: Prisma.SortOrder
source?: Prisma.SortOrder
url?: Prisma.SortOrder
publishedAt?: Prisma.SortOrder
impactRank?: Prisma.SortOrder
createdAt?: Prisma.SortOrder
}
export type NewsSumOrderByAggregateInput = {
id?: Prisma.SortOrder
impactRank?: Prisma.SortOrder
}
export type NullableStringFieldUpdateOperationsInput = {
set?: string | null
}
export type NewsSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
id?: boolean
title?: boolean
summary?: boolean
content?: boolean
source?: boolean
url?: boolean
publishedAt?: boolean
impactRank?: boolean
createdAt?: boolean
}, ExtArgs["result"]["news"]>
export type NewsSelectScalar = {
id?: boolean
title?: boolean
summary?: boolean
content?: boolean
source?: boolean
url?: boolean
publishedAt?: boolean
impactRank?: boolean
createdAt?: boolean
}
export type NewsOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "title" | "summary" | "content" | "source" | "url" | "publishedAt" | "impactRank" | "createdAt", ExtArgs["result"]["news"]>
export type $NewsPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
name: "News"
objects: {}
scalars: runtime.Types.Extensions.GetPayloadResult<{
id: number
title: string
summary: string
content: string | null
source: string
url: string
publishedAt: Date
impactRank: number
createdAt: Date
}, ExtArgs["result"]["news"]>
composites: {}
}
export type NewsGetPayload<S extends boolean | null | undefined | NewsDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$NewsPayload, S>
export type NewsCountArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> =
Omit<NewsFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
select?: NewsCountAggregateInputType | true
}
export interface NewsDelegate<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> {
[K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['News'], meta: { name: 'News' } }
/**
* Find zero or one News that matches the filter.
* @param {NewsFindUniqueArgs} args - Arguments to find a News
* @example
* // Get one News
* const news = await prisma.news.findUnique({
* where: {
* // ... provide filter here
* }
* })
*/
findUnique<T extends NewsFindUniqueArgs>(args: Prisma.SelectSubset<T, NewsFindUniqueArgs<ExtArgs>>): Prisma.Prisma__NewsClient<runtime.Types.Result.GetResult<Prisma.$NewsPayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
/**
* Find one News that matches the filter or throw an error with `error.code='P2025'`
* if no matches were found.
* @param {NewsFindUniqueOrThrowArgs} args - Arguments to find a News
* @example
* // Get one News
* const news = await prisma.news.findUniqueOrThrow({
* where: {
* // ... provide filter here
* }
* })
*/
findUniqueOrThrow<T extends NewsFindUniqueOrThrowArgs>(args: Prisma.SelectSubset<T, NewsFindUniqueOrThrowArgs<ExtArgs>>): Prisma.Prisma__NewsClient<runtime.Types.Result.GetResult<Prisma.$NewsPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Find the first News 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 {NewsFindFirstArgs} args - Arguments to find a News
* @example
* // Get one News
* const news = await prisma.news.findFirst({
* where: {
* // ... provide filter here
* }
* })
*/
findFirst<T extends NewsFindFirstArgs>(args?: Prisma.SelectSubset<T, NewsFindFirstArgs<ExtArgs>>): Prisma.Prisma__NewsClient<runtime.Types.Result.GetResult<Prisma.$NewsPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
/**
* Find the first News 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 {NewsFindFirstOrThrowArgs} args - Arguments to find a News
* @example
* // Get one News
* const news = await prisma.news.findFirstOrThrow({
* where: {
* // ... provide filter here
* }
* })
*/
findFirstOrThrow<T extends NewsFindFirstOrThrowArgs>(args?: Prisma.SelectSubset<T, NewsFindFirstOrThrowArgs<ExtArgs>>): Prisma.Prisma__NewsClient<runtime.Types.Result.GetResult<Prisma.$NewsPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Find zero or more News 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 {NewsFindManyArgs} args - Arguments to filter and select certain fields only.
* @example
* // Get all News
* const news = await prisma.news.findMany()
*
* // Get first 10 News
* const news = await prisma.news.findMany({ take: 10 })
*
* // Only select the `id`
* const newsWithIdOnly = await prisma.news.findMany({ select: { id: true } })
*
*/
findMany<T extends NewsFindManyArgs>(args?: Prisma.SelectSubset<T, NewsFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$NewsPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>
/**
* Create a News.
* @param {NewsCreateArgs} args - Arguments to create a News.
* @example
* // Create one News
* const News = await prisma.news.create({
* data: {
* // ... data to create a News
* }
* })
*
*/
create<T extends NewsCreateArgs>(args: Prisma.SelectSubset<T, NewsCreateArgs<ExtArgs>>): Prisma.Prisma__NewsClient<runtime.Types.Result.GetResult<Prisma.$NewsPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Create many News.
* @param {NewsCreateManyArgs} args - Arguments to create many News.
* @example
* // Create many News
* const news = await prisma.news.createMany({
* data: [
* // ... provide data here
* ]
* })
*
*/
createMany<T extends NewsCreateManyArgs>(args?: Prisma.SelectSubset<T, NewsCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
/**
* Delete a News.
* @param {NewsDeleteArgs} args - Arguments to delete one News.
* @example
* // Delete one News
* const News = await prisma.news.delete({
* where: {
* // ... filter to delete one News
* }
* })
*
*/
delete<T extends NewsDeleteArgs>(args: Prisma.SelectSubset<T, NewsDeleteArgs<ExtArgs>>): Prisma.Prisma__NewsClient<runtime.Types.Result.GetResult<Prisma.$NewsPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Update one News.
* @param {NewsUpdateArgs} args - Arguments to update one News.
* @example
* // Update one News
* const news = await prisma.news.update({
* where: {
* // ... provide filter here
* },
* data: {
* // ... provide data here
* }
* })
*
*/
update<T extends NewsUpdateArgs>(args: Prisma.SelectSubset<T, NewsUpdateArgs<ExtArgs>>): Prisma.Prisma__NewsClient<runtime.Types.Result.GetResult<Prisma.$NewsPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Delete zero or more News.
* @param {NewsDeleteManyArgs} args - Arguments to filter News to delete.
* @example
* // Delete a few News
* const { count } = await prisma.news.deleteMany({
* where: {
* // ... provide filter here
* }
* })
*
*/
deleteMany<T extends NewsDeleteManyArgs>(args?: Prisma.SelectSubset<T, NewsDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
/**
* Update zero or more News.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {NewsUpdateManyArgs} args - Arguments to update one or more rows.
* @example
* // Update many News
* const news = await prisma.news.updateMany({
* where: {
* // ... provide filter here
* },
* data: {
* // ... provide data here
* }
* })
*
*/
updateMany<T extends NewsUpdateManyArgs>(args: Prisma.SelectSubset<T, NewsUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
/**
* Create or update one News.
* @param {NewsUpsertArgs} args - Arguments to update or create a News.
* @example
* // Update or create a News
* const news = await prisma.news.upsert({
* create: {
* // ... data to create a News
* },
* update: {
* // ... in case it already exists, update
* },
* where: {
* // ... the filter for the News we want to update
* }
* })
*/
upsert<T extends NewsUpsertArgs>(args: Prisma.SelectSubset<T, NewsUpsertArgs<ExtArgs>>): Prisma.Prisma__NewsClient<runtime.Types.Result.GetResult<Prisma.$NewsPayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Count the number of News.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {NewsCountArgs} args - Arguments to filter News to count.
* @example
* // Count the number of News
* const count = await prisma.news.count({
* where: {
* // ... the filter for the News we want to count
* }
* })
**/
count<T extends NewsCountArgs>(
args?: Prisma.Subset<T, NewsCountArgs>,
): Prisma.PrismaPromise<
T extends runtime.Types.Utils.Record<'select', any>
? T['select'] extends true
? number
: Prisma.GetScalarType<T['select'], NewsCountAggregateOutputType>
: number
>
/**
* Allows you to perform aggregations operations on a News.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {NewsAggregateArgs} 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 NewsAggregateArgs>(args: Prisma.Subset<T, NewsAggregateArgs>): Prisma.PrismaPromise<GetNewsAggregateType<T>>
/**
* Group by News.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {NewsGroupByArgs} 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 NewsGroupByArgs,
HasSelectOrTake extends Prisma.Or<
Prisma.Extends<'skip', Prisma.Keys<T>>,
Prisma.Extends<'take', Prisma.Keys<T>>
>,
OrderByArg extends Prisma.True extends HasSelectOrTake
? { orderBy: NewsGroupByArgs['orderBy'] }
: { orderBy?: NewsGroupByArgs['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, NewsGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetNewsGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
/**
* Fields of the News model
*/
readonly fields: NewsFieldRefs;
}
/**
* The delegate class that acts as a "Promise-like" for News.
* 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__NewsClient<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 News model
*/
export interface NewsFieldRefs {
readonly id: Prisma.FieldRef<"News", 'Int'>
readonly title: Prisma.FieldRef<"News", 'String'>
readonly summary: Prisma.FieldRef<"News", 'String'>
readonly content: Prisma.FieldRef<"News", 'String'>
readonly source: Prisma.FieldRef<"News", 'String'>
readonly url: Prisma.FieldRef<"News", 'String'>
readonly publishedAt: Prisma.FieldRef<"News", 'DateTime'>
readonly impactRank: Prisma.FieldRef<"News", 'Int'>
readonly createdAt: Prisma.FieldRef<"News", 'DateTime'>
}
// Custom InputTypes
/**
* News findUnique
*/
export type NewsFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the News
*/
select?: Prisma.NewsSelect<ExtArgs> | null
/**
* Omit specific fields from the News
*/
omit?: Prisma.NewsOmit<ExtArgs> | null
/**
* Filter, which News to fetch.
*/
where: Prisma.NewsWhereUniqueInput
}
/**
* News findUniqueOrThrow
*/
export type NewsFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the News
*/
select?: Prisma.NewsSelect<ExtArgs> | null
/**
* Omit specific fields from the News
*/
omit?: Prisma.NewsOmit<ExtArgs> | null
/**
* Filter, which News to fetch.
*/
where: Prisma.NewsWhereUniqueInput
}
/**
* News findFirst
*/
export type NewsFindFirstArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the News
*/
select?: Prisma.NewsSelect<ExtArgs> | null
/**
* Omit specific fields from the News
*/
omit?: Prisma.NewsOmit<ExtArgs> | null
/**
* Filter, which News to fetch.
*/
where?: Prisma.NewsWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of News to fetch.
*/
orderBy?: Prisma.NewsOrderByWithRelationInput | Prisma.NewsOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for searching for News.
*/
cursor?: Prisma.NewsWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` News 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` News.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
*
* Filter by unique combinations of News.
*/
distinct?: Prisma.NewsScalarFieldEnum | Prisma.NewsScalarFieldEnum[]
}
/**
* News findFirstOrThrow
*/
export type NewsFindFirstOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the News
*/
select?: Prisma.NewsSelect<ExtArgs> | null
/**
* Omit specific fields from the News
*/
omit?: Prisma.NewsOmit<ExtArgs> | null
/**
* Filter, which News to fetch.
*/
where?: Prisma.NewsWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of News to fetch.
*/
orderBy?: Prisma.NewsOrderByWithRelationInput | Prisma.NewsOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for searching for News.
*/
cursor?: Prisma.NewsWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` News 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` News.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
*
* Filter by unique combinations of News.
*/
distinct?: Prisma.NewsScalarFieldEnum | Prisma.NewsScalarFieldEnum[]
}
/**
* News findMany
*/
export type NewsFindManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the News
*/
select?: Prisma.NewsSelect<ExtArgs> | null
/**
* Omit specific fields from the News
*/
omit?: Prisma.NewsOmit<ExtArgs> | null
/**
* Filter, which News to fetch.
*/
where?: Prisma.NewsWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of News to fetch.
*/
orderBy?: Prisma.NewsOrderByWithRelationInput | Prisma.NewsOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for listing News.
*/
cursor?: Prisma.NewsWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` News 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` News.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
*
* Filter by unique combinations of News.
*/
distinct?: Prisma.NewsScalarFieldEnum | Prisma.NewsScalarFieldEnum[]
}
/**
* News create
*/
export type NewsCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the News
*/
select?: Prisma.NewsSelect<ExtArgs> | null
/**
* Omit specific fields from the News
*/
omit?: Prisma.NewsOmit<ExtArgs> | null
/**
* The data needed to create a News.
*/
data: Prisma.XOR<Prisma.NewsCreateInput, Prisma.NewsUncheckedCreateInput>
}
/**
* News createMany
*/
export type NewsCreateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* The data used to create many News.
*/
data: Prisma.NewsCreateManyInput | Prisma.NewsCreateManyInput[]
skipDuplicates?: boolean
}
/**
* News update
*/
export type NewsUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the News
*/
select?: Prisma.NewsSelect<ExtArgs> | null
/**
* Omit specific fields from the News
*/
omit?: Prisma.NewsOmit<ExtArgs> | null
/**
* The data needed to update a News.
*/
data: Prisma.XOR<Prisma.NewsUpdateInput, Prisma.NewsUncheckedUpdateInput>
/**
* Choose, which News to update.
*/
where: Prisma.NewsWhereUniqueInput
}
/**
* News updateMany
*/
export type NewsUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* The data used to update News.
*/
data: Prisma.XOR<Prisma.NewsUpdateManyMutationInput, Prisma.NewsUncheckedUpdateManyInput>
/**
* Filter which News to update
*/
where?: Prisma.NewsWhereInput
/**
* Limit how many News to update.
*/
limit?: number
}
/**
* News upsert
*/
export type NewsUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the News
*/
select?: Prisma.NewsSelect<ExtArgs> | null
/**
* Omit specific fields from the News
*/
omit?: Prisma.NewsOmit<ExtArgs> | null
/**
* The filter to search for the News to update in case it exists.
*/
where: Prisma.NewsWhereUniqueInput
/**
* In case the News found by the `where` argument doesn't exist, create a new News with this data.
*/
create: Prisma.XOR<Prisma.NewsCreateInput, Prisma.NewsUncheckedCreateInput>
/**
* In case the News was found with the provided `where` argument, update it with this data.
*/
update: Prisma.XOR<Prisma.NewsUpdateInput, Prisma.NewsUncheckedUpdateInput>
}
/**
* News delete
*/
export type NewsDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the News
*/
select?: Prisma.NewsSelect<ExtArgs> | null
/**
* Omit specific fields from the News
*/
omit?: Prisma.NewsOmit<ExtArgs> | null
/**
* Filter which News to delete.
*/
where: Prisma.NewsWhereUniqueInput
}
/**
* News deleteMany
*/
export type NewsDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Filter which News to delete
*/
where?: Prisma.NewsWhereInput
/**
* Limit how many News to delete.
*/
limit?: number
}
/**
* News without action
*/
export type NewsDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the News
*/
select?: Prisma.NewsSelect<ExtArgs> | null
/**
* Omit specific fields from the News
*/
omit?: Prisma.NewsOmit<ExtArgs> | null
}