diff --git a/generated/prisma/browser.ts b/generated/prisma/browser.ts index e57d972..d5b6da2 100644 --- a/generated/prisma/browser.ts +++ b/generated/prisma/browser.ts @@ -38,7 +38,12 @@ export type Strategy = Prisma.StrategyModel */ export type Indicator = Prisma.IndicatorModel /** - * Model SowInventory + * Model Econ_SowInventory * */ -export type SowInventory = Prisma.SowInventoryModel +export type Econ_SowInventory = Prisma.Econ_SowInventoryModel +/** + * Model ScraperCache + * + */ +export type ScraperCache = Prisma.ScraperCacheModel diff --git a/generated/prisma/client.ts b/generated/prisma/client.ts index e3d557e..bb7054a 100644 --- a/generated/prisma/client.ts +++ b/generated/prisma/client.ts @@ -62,7 +62,12 @@ export type Strategy = Prisma.StrategyModel */ export type Indicator = Prisma.IndicatorModel /** - * Model SowInventory + * Model Econ_SowInventory * */ -export type SowInventory = Prisma.SowInventoryModel +export type Econ_SowInventory = Prisma.Econ_SowInventoryModel +/** + * Model ScraperCache + * + */ +export type ScraperCache = Prisma.ScraperCacheModel diff --git a/generated/prisma/commonInputTypes.ts b/generated/prisma/commonInputTypes.ts index 3e8af79..6238128 100644 --- a/generated/prisma/commonInputTypes.ts +++ b/generated/prisma/commonInputTypes.ts @@ -150,6 +150,95 @@ export type JsonWithAggregatesFilterBase<$PrismaModel = never> = { _max?: Prisma.NestedJsonFilter<$PrismaModel> } +export type StringNullableFilter<$PrismaModel = never> = { + equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null + in?: string[] | null + notIn?: string[] | null + lt?: string | Prisma.StringFieldRefInput<$PrismaModel> + lte?: string | Prisma.StringFieldRefInput<$PrismaModel> + gt?: string | Prisma.StringFieldRefInput<$PrismaModel> + gte?: string | Prisma.StringFieldRefInput<$PrismaModel> + contains?: string | Prisma.StringFieldRefInput<$PrismaModel> + startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + search?: string + not?: Prisma.NestedStringNullableFilter<$PrismaModel> | string | null +} + +export type JsonNullableFilter<$PrismaModel = never> = +| Prisma.PatchUndefined< + Prisma.Either>, Exclude>, 'path'>>, + Required> + > +| Prisma.OptionalFlat>, 'path'>> + +export type JsonNullableFilterBase<$PrismaModel = never> = { + equals?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter + path?: string + mode?: Prisma.QueryMode | Prisma.EnumQueryModeFieldRefInput<$PrismaModel> + string_contains?: string | Prisma.StringFieldRefInput<$PrismaModel> + string_starts_with?: string | Prisma.StringFieldRefInput<$PrismaModel> + string_ends_with?: string | Prisma.StringFieldRefInput<$PrismaModel> + array_starts_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null + array_ends_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null + array_contains?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null + lt?: runtime.InputJsonValue + lte?: runtime.InputJsonValue + gt?: runtime.InputJsonValue + gte?: runtime.InputJsonValue + not?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter +} + +export type SortOrderInput = { + sort: Prisma.SortOrder + nulls?: Prisma.NullsOrder +} + +export type StringNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null + in?: string[] | null + notIn?: string[] | null + lt?: string | Prisma.StringFieldRefInput<$PrismaModel> + lte?: string | Prisma.StringFieldRefInput<$PrismaModel> + gt?: string | Prisma.StringFieldRefInput<$PrismaModel> + gte?: string | Prisma.StringFieldRefInput<$PrismaModel> + contains?: string | Prisma.StringFieldRefInput<$PrismaModel> + startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + search?: string + not?: Prisma.NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null + _count?: Prisma.NestedIntNullableFilter<$PrismaModel> + _min?: Prisma.NestedStringNullableFilter<$PrismaModel> + _max?: Prisma.NestedStringNullableFilter<$PrismaModel> +} + +export type JsonNullableWithAggregatesFilter<$PrismaModel = never> = +| Prisma.PatchUndefined< + Prisma.Either>, Exclude>, 'path'>>, + Required> + > +| Prisma.OptionalFlat>, 'path'>> + +export type JsonNullableWithAggregatesFilterBase<$PrismaModel = never> = { + equals?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter + path?: string + mode?: Prisma.QueryMode | Prisma.EnumQueryModeFieldRefInput<$PrismaModel> + string_contains?: string | Prisma.StringFieldRefInput<$PrismaModel> + string_starts_with?: string | Prisma.StringFieldRefInput<$PrismaModel> + string_ends_with?: string | Prisma.StringFieldRefInput<$PrismaModel> + array_starts_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null + array_ends_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null + array_contains?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null + lt?: runtime.InputJsonValue + lte?: runtime.InputJsonValue + gt?: runtime.InputJsonValue + gte?: runtime.InputJsonValue + not?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter + _count?: Prisma.NestedIntNullableFilter<$PrismaModel> + _min?: Prisma.NestedJsonNullableFilter<$PrismaModel> + _max?: Prisma.NestedJsonNullableFilter<$PrismaModel> +} + export type NestedIntFilter<$PrismaModel = never> = { equals?: number | Prisma.IntFieldRefInput<$PrismaModel> in?: number[] @@ -270,4 +359,72 @@ export type NestedJsonFilterBase<$PrismaModel = never> = { not?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter } +export type NestedStringNullableFilter<$PrismaModel = never> = { + equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null + in?: string[] | null + notIn?: string[] | null + lt?: string | Prisma.StringFieldRefInput<$PrismaModel> + lte?: string | Prisma.StringFieldRefInput<$PrismaModel> + gt?: string | Prisma.StringFieldRefInput<$PrismaModel> + gte?: string | Prisma.StringFieldRefInput<$PrismaModel> + contains?: string | Prisma.StringFieldRefInput<$PrismaModel> + startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + search?: string + not?: Prisma.NestedStringNullableFilter<$PrismaModel> | string | null +} + +export type NestedStringNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null + in?: string[] | null + notIn?: string[] | null + lt?: string | Prisma.StringFieldRefInput<$PrismaModel> + lte?: string | Prisma.StringFieldRefInput<$PrismaModel> + gt?: string | Prisma.StringFieldRefInput<$PrismaModel> + gte?: string | Prisma.StringFieldRefInput<$PrismaModel> + contains?: string | Prisma.StringFieldRefInput<$PrismaModel> + startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + search?: string + not?: Prisma.NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null + _count?: Prisma.NestedIntNullableFilter<$PrismaModel> + _min?: Prisma.NestedStringNullableFilter<$PrismaModel> + _max?: Prisma.NestedStringNullableFilter<$PrismaModel> +} + +export type NestedIntNullableFilter<$PrismaModel = never> = { + equals?: number | Prisma.IntFieldRefInput<$PrismaModel> | null + in?: number[] | null + notIn?: number[] | null + lt?: number | Prisma.IntFieldRefInput<$PrismaModel> + lte?: number | Prisma.IntFieldRefInput<$PrismaModel> + gt?: number | Prisma.IntFieldRefInput<$PrismaModel> + gte?: number | Prisma.IntFieldRefInput<$PrismaModel> + not?: Prisma.NestedIntNullableFilter<$PrismaModel> | number | null +} + +export type NestedJsonNullableFilter<$PrismaModel = never> = +| Prisma.PatchUndefined< + Prisma.Either>, Exclude>, 'path'>>, + Required> + > +| Prisma.OptionalFlat>, 'path'>> + +export type NestedJsonNullableFilterBase<$PrismaModel = never> = { + equals?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter + path?: string + mode?: Prisma.QueryMode | Prisma.EnumQueryModeFieldRefInput<$PrismaModel> + string_contains?: string | Prisma.StringFieldRefInput<$PrismaModel> + string_starts_with?: string | Prisma.StringFieldRefInput<$PrismaModel> + string_ends_with?: string | Prisma.StringFieldRefInput<$PrismaModel> + array_starts_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null + array_ends_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null + array_contains?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null + lt?: runtime.InputJsonValue + lte?: runtime.InputJsonValue + gt?: runtime.InputJsonValue + gte?: runtime.InputJsonValue + not?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter +} + diff --git a/generated/prisma/internal/class.ts b/generated/prisma/internal/class.ts index dc55c58..b098285 100644 --- a/generated/prisma/internal/class.ts +++ b/generated/prisma/internal/class.ts @@ -20,7 +20,7 @@ const config: runtime.GetPrismaClientConfig = { "clientVersion": "7.7.0", "engineVersion": "75cbdc1eb7150937890ad5465d861175c6624711", "activeProvider": "mysql", - "inlineSchema": "// This is your Prisma schema file,\n// learn more about it in the docs: https://pris.ly/d/prisma-schema\n\n// Get a free hosted Postgres database in seconds: `npx create-db`\n\ngenerator client {\n provider = \"prisma-client\"\n output = \"../generated/prisma\"\n}\n\ndatasource db {\n provider = \"mysql\"\n}\n\nmodel User {\n id Int @id @default(autoincrement())\n name String\n email String @unique\n password String\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel Article {\n id Int @id @default(autoincrement())\n title String\n slug String @unique\n content String\n date String\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel Strategy {\n id Int @id @default(autoincrement())\n name String\n description String\n data Json\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel Indicator {\n id Int @id @default(autoincrement())\n name String\n groupName String\n data Json\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel SowInventory {\n id Int @id @default(autoincrement())\n month String @unique\n inventory Int // 能繁母猪数量(万头)\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n", + "inlineSchema": "// This is your Prisma schema file,\n// learn more about it in the docs: https://pris.ly/d/prisma-schema\n\n// Get a free hosted Postgres database in seconds: `npx create-db`\n\ngenerator client {\n provider = \"prisma-client\"\n output = \"../generated/prisma\"\n}\n\ndatasource db {\n provider = \"mysql\"\n}\n\nmodel User {\n id Int @id @default(autoincrement())\n name String\n email String @unique\n password String\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel Article {\n id Int @id @default(autoincrement())\n title String\n slug String @unique\n content String\n date String\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel Strategy {\n id Int @id @default(autoincrement())\n name String\n description String\n data Json\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel Indicator {\n id Int @id @default(autoincrement())\n name String\n groupName String\n data Json\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel Econ_SowInventory {\n id Int @id @default(autoincrement())\n month String @unique\n inventory Int // 能繁母猪数量(万头)\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel ScraperCache {\n id Int @id @default(autoincrement())\n scraperName String @unique // 爬虫名称,如:sow-inventory\n lastDataHash String? // 上次数据指纹\n lastUpdateAt DateTime // 上次更新时间\n metadata Json? // 其他元数据\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n", "runtimeDataModel": { "models": {}, "enums": {}, @@ -32,10 +32,10 @@ const config: runtime.GetPrismaClientConfig = { } } -config.runtimeDataModel = JSON.parse("{\"models\":{\"User\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"email\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"password\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"Article\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"title\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"slug\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"content\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"Strategy\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"data\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"Indicator\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"groupName\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"data\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"SowInventory\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"month\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"inventory\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null}},\"enums\":{},\"types\":{}}") +config.runtimeDataModel = JSON.parse("{\"models\":{\"User\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"email\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"password\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"Article\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"title\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"slug\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"content\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"Strategy\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"data\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"Indicator\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"groupName\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"data\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"Econ_SowInventory\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"month\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"inventory\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"ScraperCache\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"scraperName\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"lastDataHash\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"lastUpdateAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"metadata\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null}},\"enums\":{},\"types\":{}}") config.parameterizationSchema = { - strings: JSON.parse("[\"where\",\"User.findUnique\",\"User.findUniqueOrThrow\",\"orderBy\",\"cursor\",\"User.findFirst\",\"User.findFirstOrThrow\",\"User.findMany\",\"data\",\"User.createOne\",\"User.createMany\",\"User.updateOne\",\"User.updateMany\",\"create\",\"update\",\"User.upsertOne\",\"User.deleteOne\",\"User.deleteMany\",\"having\",\"_count\",\"_avg\",\"_sum\",\"_min\",\"_max\",\"User.groupBy\",\"User.aggregate\",\"Article.findUnique\",\"Article.findUniqueOrThrow\",\"Article.findFirst\",\"Article.findFirstOrThrow\",\"Article.findMany\",\"Article.createOne\",\"Article.createMany\",\"Article.updateOne\",\"Article.updateMany\",\"Article.upsertOne\",\"Article.deleteOne\",\"Article.deleteMany\",\"Article.groupBy\",\"Article.aggregate\",\"Strategy.findUnique\",\"Strategy.findUniqueOrThrow\",\"Strategy.findFirst\",\"Strategy.findFirstOrThrow\",\"Strategy.findMany\",\"Strategy.createOne\",\"Strategy.createMany\",\"Strategy.updateOne\",\"Strategy.updateMany\",\"Strategy.upsertOne\",\"Strategy.deleteOne\",\"Strategy.deleteMany\",\"Strategy.groupBy\",\"Strategy.aggregate\",\"Indicator.findUnique\",\"Indicator.findUniqueOrThrow\",\"Indicator.findFirst\",\"Indicator.findFirstOrThrow\",\"Indicator.findMany\",\"Indicator.createOne\",\"Indicator.createMany\",\"Indicator.updateOne\",\"Indicator.updateMany\",\"Indicator.upsertOne\",\"Indicator.deleteOne\",\"Indicator.deleteMany\",\"Indicator.groupBy\",\"Indicator.aggregate\",\"SowInventory.findUnique\",\"SowInventory.findUniqueOrThrow\",\"SowInventory.findFirst\",\"SowInventory.findFirstOrThrow\",\"SowInventory.findMany\",\"SowInventory.createOne\",\"SowInventory.createMany\",\"SowInventory.updateOne\",\"SowInventory.updateMany\",\"SowInventory.upsertOne\",\"SowInventory.deleteOne\",\"SowInventory.deleteMany\",\"SowInventory.groupBy\",\"SowInventory.aggregate\",\"AND\",\"OR\",\"NOT\",\"id\",\"month\",\"inventory\",\"createdAt\",\"updatedAt\",\"equals\",\"in\",\"notIn\",\"lt\",\"lte\",\"gt\",\"gte\",\"not\",\"contains\",\"startsWith\",\"endsWith\",\"search\",\"name\",\"groupName\",\"string_contains\",\"string_starts_with\",\"string_ends_with\",\"array_starts_with\",\"array_ends_with\",\"array_contains\",\"description\",\"title\",\"slug\",\"content\",\"date\",\"email\",\"password\",\"_relevance\",\"set\",\"increment\",\"decrement\",\"multiply\",\"divide\"]"), - graph: "rgEpRglSAACNAQAwUwAAB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ei04Ei46Ai88EjA-AjE_EjJAEjNBAjREEzVFGTZHGjdIGjhLGjlMGjpNGjtPGjxRAj1TGj5VAj9WGkBXGkFYAkJbG0NcIUReIkVfIkZiIkdjIkhkIklmIkpoAktqIkxsAk1tIk5uIk9vAlByI1FzKQ" + strings: JSON.parse("[\"where\",\"User.findUnique\",\"User.findUniqueOrThrow\",\"orderBy\",\"cursor\",\"User.findFirst\",\"User.findFirstOrThrow\",\"User.findMany\",\"data\",\"User.createOne\",\"User.createMany\",\"User.updateOne\",\"User.updateMany\",\"create\",\"update\",\"User.upsertOne\",\"User.deleteOne\",\"User.deleteMany\",\"having\",\"_count\",\"_avg\",\"_sum\",\"_min\",\"_max\",\"User.groupBy\",\"User.aggregate\",\"Article.findUnique\",\"Article.findUniqueOrThrow\",\"Article.findFirst\",\"Article.findFirstOrThrow\",\"Article.findMany\",\"Article.createOne\",\"Article.createMany\",\"Article.updateOne\",\"Article.updateMany\",\"Article.upsertOne\",\"Article.deleteOne\",\"Article.deleteMany\",\"Article.groupBy\",\"Article.aggregate\",\"Strategy.findUnique\",\"Strategy.findUniqueOrThrow\",\"Strategy.findFirst\",\"Strategy.findFirstOrThrow\",\"Strategy.findMany\",\"Strategy.createOne\",\"Strategy.createMany\",\"Strategy.updateOne\",\"Strategy.updateMany\",\"Strategy.upsertOne\",\"Strategy.deleteOne\",\"Strategy.deleteMany\",\"Strategy.groupBy\",\"Strategy.aggregate\",\"Indicator.findUnique\",\"Indicator.findUniqueOrThrow\",\"Indicator.findFirst\",\"Indicator.findFirstOrThrow\",\"Indicator.findMany\",\"Indicator.createOne\",\"Indicator.createMany\",\"Indicator.updateOne\",\"Indicator.updateMany\",\"Indicator.upsertOne\",\"Indicator.deleteOne\",\"Indicator.deleteMany\",\"Indicator.groupBy\",\"Indicator.aggregate\",\"Econ_SowInventory.findUnique\",\"Econ_SowInventory.findUniqueOrThrow\",\"Econ_SowInventory.findFirst\",\"Econ_SowInventory.findFirstOrThrow\",\"Econ_SowInventory.findMany\",\"Econ_SowInventory.createOne\",\"Econ_SowInventory.createMany\",\"Econ_SowInventory.updateOne\",\"Econ_SowInventory.updateMany\",\"Econ_SowInventory.upsertOne\",\"Econ_SowInventory.deleteOne\",\"Econ_SowInventory.deleteMany\",\"Econ_SowInventory.groupBy\",\"Econ_SowInventory.aggregate\",\"ScraperCache.findUnique\",\"ScraperCache.findUniqueOrThrow\",\"ScraperCache.findFirst\",\"ScraperCache.findFirstOrThrow\",\"ScraperCache.findMany\",\"ScraperCache.createOne\",\"ScraperCache.createMany\",\"ScraperCache.updateOne\",\"ScraperCache.updateMany\",\"ScraperCache.upsertOne\",\"ScraperCache.deleteOne\",\"ScraperCache.deleteMany\",\"ScraperCache.groupBy\",\"ScraperCache.aggregate\",\"AND\",\"OR\",\"NOT\",\"id\",\"scraperName\",\"lastDataHash\",\"lastUpdateAt\",\"metadata\",\"createdAt\",\"updatedAt\",\"equals\",\"string_contains\",\"string_starts_with\",\"string_ends_with\",\"array_starts_with\",\"array_ends_with\",\"array_contains\",\"lt\",\"lte\",\"gt\",\"gte\",\"not\",\"in\",\"notIn\",\"contains\",\"startsWith\",\"endsWith\",\"search\",\"month\",\"inventory\",\"name\",\"groupName\",\"description\",\"title\",\"slug\",\"content\",\"date\",\"email\",\"password\",\"_relevance\",\"set\",\"increment\",\"decrement\",\"multiply\",\"divide\"]"), + graph: "1wExVAlgAACuAQAwYQAABAAQYgAArgEAMGMCAAAAAWhAAKABACFpQACgAQAhfgEAngEAIYUBAQAAAAGGAQEAngEAIQEAAAABACABAAAAAQAgCWAAAK4BADBhAAAEABBiAACuAQAwYwIAnQEAIWhAAKABACFpQACgAQAhfgEAngEAIYUBAQCeAQAhhgEBAJ4BACEBhwEAANcBACADAAAABAAgAwAABQAwBAAAAQAgAwAAAAQAIAMAAAUAMAQAAAEAIAMAAAAEACADAAAFADAEAAABACAGYwIAAAABaEAAAAABaUAAAAABfgEAAAABhQEBAAAAAYYBAQAAAAEBCAAACQAgBmMCAAA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AQAhhgEBAI0BACEJYAAArgEAMGEAAAQAEGIAAK4BADBjAgCdAQAhaEAAoAEAIWlAAKABACF-AQCeAQAhhQEBAJ4BACGGAQEAngEAIQAAAAAAAAGIAQEAAAABAYgBAQAAAAEBiAFAAAAAAQWIAQIAAAABiQECAAAAAYoBAgAAAAGLAQIAAAABjAECAAAAAQF7AQAAAAEAAAAAAAF7AQAAAAEAAAAAAAF7AQAAAAEAAAAAAAF7AQAAAAEAAAAAAAF7AQAAAAEAAAAAAAF7AQAAAAEAAAUTAAQUAAUVAAYWAAcXAAgAAAAAAAUTAAQUAAUVAAYWAAcXAAgABRMADBQADRUADhYADxcAEAAAAAAABRMADBQADRUADhYADxcAEAAFEwAUFAAVFQAWFgAXFwAYAAAAAAAFEwAUFAAVFQAWFgAXFwAYAAUTABwUAB0VAB4WAB8XACAAAAAAAAUTABwUAB0VAB4WAB8XACAABRMAJBQAJRUAJhYAJxcAKAAAAAAABRMAJBQAJRUAJhYAJxcAKAAFEwAsFAAtFQAuFgAvFwAwAAAAAAAFEwAsFAAtFQAuFgAvFwAwAQIBAgMBBQYBBgcBBwgBCQoBCgwCCw4BDBACDxEBEBIBERMCGBYDGRcJGhkKGxoKHB0KHR4KHh8KHyEKICMCISUKIicCIygKJCkKJSoCJi0LJy4RKDASKTESKjQSKzUSLDYSLTgSLjoCLzwSMD4CMT8SMkASM0ECNEQTNUUZNkcaN0gaOEsaOUwaOk0aO08aPFECPVMaPlUCP1YaQFcaQVgCQlsbQ1whRF4iRV8iRmIiR2MiSGQiSWYiSmgCS2oiTGwCTW0iTm4iT28CUHIjUXMpUnUqU3YqVHkqVXoqVnsqV30qWH8CWYEBKlqDAQJbhAEqXIUBKl2GAQJeiQErX4oBMQ" } async function decodeBase64AsWasm(wasmBase64: string): Promise { @@ -229,14 +229,24 @@ export interface PrismaClient< get indicator(): Prisma.IndicatorDelegate; /** - * `prisma.sowInventory`: Exposes CRUD operations for the **SowInventory** model. + * `prisma.econ_SowInventory`: Exposes CRUD operations for the **Econ_SowInventory** model. * Example usage: * ```ts - * // Fetch zero or more SowInventories - * const sowInventories = await prisma.sowInventory.findMany() + * // Fetch zero or more Econ_SowInventories + * const econ_SowInventories = await prisma.econ_SowInventory.findMany() * ``` */ - get sowInventory(): Prisma.SowInventoryDelegate; + get econ_SowInventory(): Prisma.Econ_SowInventoryDelegate; + + /** + * `prisma.scraperCache`: Exposes CRUD operations for the **ScraperCache** model. + * Example usage: + * ```ts + * // Fetch zero or more ScraperCaches + * const scraperCaches = await prisma.scraperCache.findMany() + * ``` + */ + get scraperCache(): Prisma.ScraperCacheDelegate; } export function getPrismaClientClass(): PrismaClientConstructor { diff --git a/generated/prisma/internal/prismaNamespace.ts b/generated/prisma/internal/prismaNamespace.ts index 615a522..1d3036b 100644 --- a/generated/prisma/internal/prismaNamespace.ts +++ b/generated/prisma/internal/prismaNamespace.ts @@ -388,7 +388,8 @@ export const ModelName = { Article: 'Article', Strategy: 'Strategy', Indicator: 'Indicator', - SowInventory: 'SowInventory' + Econ_SowInventory: 'Econ_SowInventory', + ScraperCache: 'ScraperCache' } as const export type ModelName = (typeof ModelName)[keyof typeof ModelName] @@ -404,7 +405,7 @@ export type TypeMap - fields: Prisma.SowInventoryFieldRefs + Econ_SowInventory: { + payload: Prisma.$Econ_SowInventoryPayload + fields: Prisma.Econ_SowInventoryFieldRefs operations: { findUnique: { - args: Prisma.SowInventoryFindUniqueArgs - result: runtime.Types.Utils.PayloadToResult | null + args: Prisma.Econ_SowInventoryFindUniqueArgs + result: runtime.Types.Utils.PayloadToResult | null } findUniqueOrThrow: { - args: Prisma.SowInventoryFindUniqueOrThrowArgs - result: runtime.Types.Utils.PayloadToResult + args: Prisma.Econ_SowInventoryFindUniqueOrThrowArgs + result: runtime.Types.Utils.PayloadToResult } findFirst: { - args: Prisma.SowInventoryFindFirstArgs - result: runtime.Types.Utils.PayloadToResult | null + args: Prisma.Econ_SowInventoryFindFirstArgs + result: runtime.Types.Utils.PayloadToResult | null } findFirstOrThrow: { - args: Prisma.SowInventoryFindFirstOrThrowArgs - result: runtime.Types.Utils.PayloadToResult + args: Prisma.Econ_SowInventoryFindFirstOrThrowArgs + result: runtime.Types.Utils.PayloadToResult } findMany: { - args: Prisma.SowInventoryFindManyArgs - result: runtime.Types.Utils.PayloadToResult[] + args: Prisma.Econ_SowInventoryFindManyArgs + result: runtime.Types.Utils.PayloadToResult[] } create: { - args: Prisma.SowInventoryCreateArgs - result: runtime.Types.Utils.PayloadToResult + args: Prisma.Econ_SowInventoryCreateArgs + result: runtime.Types.Utils.PayloadToResult } createMany: { - args: Prisma.SowInventoryCreateManyArgs + args: Prisma.Econ_SowInventoryCreateManyArgs result: BatchPayload } delete: { - args: Prisma.SowInventoryDeleteArgs - result: runtime.Types.Utils.PayloadToResult + args: Prisma.Econ_SowInventoryDeleteArgs + result: runtime.Types.Utils.PayloadToResult } update: { - args: Prisma.SowInventoryUpdateArgs - result: runtime.Types.Utils.PayloadToResult + args: Prisma.Econ_SowInventoryUpdateArgs + result: runtime.Types.Utils.PayloadToResult } deleteMany: { - args: Prisma.SowInventoryDeleteManyArgs + args: Prisma.Econ_SowInventoryDeleteManyArgs result: BatchPayload } updateMany: { - args: Prisma.SowInventoryUpdateManyArgs + args: Prisma.Econ_SowInventoryUpdateManyArgs result: BatchPayload } upsert: { - args: Prisma.SowInventoryUpsertArgs - result: runtime.Types.Utils.PayloadToResult + args: Prisma.Econ_SowInventoryUpsertArgs + result: runtime.Types.Utils.PayloadToResult } aggregate: { - args: Prisma.SowInventoryAggregateArgs - result: runtime.Types.Utils.Optional + args: Prisma.Econ_SowInventoryAggregateArgs + result: runtime.Types.Utils.Optional } groupBy: { - args: Prisma.SowInventoryGroupByArgs - result: runtime.Types.Utils.Optional[] + args: Prisma.Econ_SowInventoryGroupByArgs + result: runtime.Types.Utils.Optional[] } count: { - args: Prisma.SowInventoryCountArgs - result: runtime.Types.Utils.Optional | number + args: Prisma.Econ_SowInventoryCountArgs + result: runtime.Types.Utils.Optional | number + } + } + } + ScraperCache: { + payload: Prisma.$ScraperCachePayload + fields: Prisma.ScraperCacheFieldRefs + operations: { + findUnique: { + args: Prisma.ScraperCacheFindUniqueArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.ScraperCacheFindUniqueOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findFirst: { + args: Prisma.ScraperCacheFindFirstArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.ScraperCacheFindFirstOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findMany: { + args: Prisma.ScraperCacheFindManyArgs + result: runtime.Types.Utils.PayloadToResult[] + } + create: { + args: Prisma.ScraperCacheCreateArgs + result: runtime.Types.Utils.PayloadToResult + } + createMany: { + args: Prisma.ScraperCacheCreateManyArgs + result: BatchPayload + } + delete: { + args: Prisma.ScraperCacheDeleteArgs + result: runtime.Types.Utils.PayloadToResult + } + update: { + args: Prisma.ScraperCacheUpdateArgs + result: runtime.Types.Utils.PayloadToResult + } + deleteMany: { + args: Prisma.ScraperCacheDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.ScraperCacheUpdateManyArgs + result: BatchPayload + } + upsert: { + args: Prisma.ScraperCacheUpsertArgs + result: runtime.Types.Utils.PayloadToResult + } + aggregate: { + args: Prisma.ScraperCacheAggregateArgs + result: runtime.Types.Utils.Optional + } + groupBy: { + args: Prisma.ScraperCacheGroupByArgs + result: runtime.Types.Utils.Optional[] + } + count: { + args: Prisma.ScraperCacheCountArgs + result: runtime.Types.Utils.Optional | number } } } @@ -826,7 +893,7 @@ export const IndicatorScalarFieldEnum = { export type IndicatorScalarFieldEnum = (typeof IndicatorScalarFieldEnum)[keyof typeof IndicatorScalarFieldEnum] -export const SowInventoryScalarFieldEnum = { +export const Econ_SowInventoryScalarFieldEnum = { id: 'id', month: 'month', inventory: 'inventory', @@ -834,7 +901,20 @@ export const SowInventoryScalarFieldEnum = { updatedAt: 'updatedAt' } as const -export type SowInventoryScalarFieldEnum = (typeof SowInventoryScalarFieldEnum)[keyof typeof SowInventoryScalarFieldEnum] +export type Econ_SowInventoryScalarFieldEnum = (typeof Econ_SowInventoryScalarFieldEnum)[keyof typeof Econ_SowInventoryScalarFieldEnum] + + +export const ScraperCacheScalarFieldEnum = { + id: 'id', + scraperName: 'scraperName', + lastDataHash: 'lastDataHash', + lastUpdateAt: 'lastUpdateAt', + metadata: 'metadata', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +} as const + +export type ScraperCacheScalarFieldEnum = (typeof ScraperCacheScalarFieldEnum)[keyof typeof ScraperCacheScalarFieldEnum] export const SortOrder = { @@ -852,6 +932,14 @@ export const JsonNullValueInput = { export type JsonNullValueInput = (typeof JsonNullValueInput)[keyof typeof JsonNullValueInput] +export const NullableJsonNullValueInput = { + DbNull: DbNull, + JsonNull: JsonNull +} as const + +export type NullableJsonNullValueInput = (typeof NullableJsonNullValueInput)[keyof typeof NullableJsonNullValueInput] + + export const UserOrderByRelevanceFieldEnum = { name: 'name', email: 'email', @@ -904,11 +992,27 @@ export const IndicatorOrderByRelevanceFieldEnum = { export type IndicatorOrderByRelevanceFieldEnum = (typeof IndicatorOrderByRelevanceFieldEnum)[keyof typeof IndicatorOrderByRelevanceFieldEnum] -export const SowInventoryOrderByRelevanceFieldEnum = { +export const Econ_SowInventoryOrderByRelevanceFieldEnum = { month: 'month' } as const -export type SowInventoryOrderByRelevanceFieldEnum = (typeof SowInventoryOrderByRelevanceFieldEnum)[keyof typeof SowInventoryOrderByRelevanceFieldEnum] +export type Econ_SowInventoryOrderByRelevanceFieldEnum = (typeof Econ_SowInventoryOrderByRelevanceFieldEnum)[keyof typeof Econ_SowInventoryOrderByRelevanceFieldEnum] + + +export const NullsOrder = { + first: 'first', + last: 'last' +} as const + +export type NullsOrder = (typeof NullsOrder)[keyof typeof NullsOrder] + + +export const ScraperCacheOrderByRelevanceFieldEnum = { + scraperName: 'scraperName', + lastDataHash: 'lastDataHash' +} as const + +export type ScraperCacheOrderByRelevanceFieldEnum = (typeof ScraperCacheOrderByRelevanceFieldEnum)[keyof typeof ScraperCacheOrderByRelevanceFieldEnum] @@ -1057,7 +1161,8 @@ export type GlobalOmitConfig = { article?: Prisma.ArticleOmit strategy?: Prisma.StrategyOmit indicator?: Prisma.IndicatorOmit - sowInventory?: Prisma.SowInventoryOmit + econ_SowInventory?: Prisma.Econ_SowInventoryOmit + scraperCache?: Prisma.ScraperCacheOmit } /* Types for Logging */ diff --git a/generated/prisma/internal/prismaNamespaceBrowser.ts b/generated/prisma/internal/prismaNamespaceBrowser.ts index 24b1129..a490d3b 100644 --- a/generated/prisma/internal/prismaNamespaceBrowser.ts +++ b/generated/prisma/internal/prismaNamespaceBrowser.ts @@ -55,7 +55,8 @@ export const ModelName = { Article: 'Article', Strategy: 'Strategy', Indicator: 'Indicator', - SowInventory: 'SowInventory' + Econ_SowInventory: 'Econ_SowInventory', + ScraperCache: 'ScraperCache' } as const export type ModelName = (typeof ModelName)[keyof typeof ModelName] @@ -123,7 +124,7 @@ export const IndicatorScalarFieldEnum = { export type IndicatorScalarFieldEnum = (typeof IndicatorScalarFieldEnum)[keyof typeof IndicatorScalarFieldEnum] -export const SowInventoryScalarFieldEnum = { +export const Econ_SowInventoryScalarFieldEnum = { id: 'id', month: 'month', inventory: 'inventory', @@ -131,7 +132,20 @@ export const SowInventoryScalarFieldEnum = { updatedAt: 'updatedAt' } as const -export type SowInventoryScalarFieldEnum = (typeof SowInventoryScalarFieldEnum)[keyof typeof SowInventoryScalarFieldEnum] +export type Econ_SowInventoryScalarFieldEnum = (typeof Econ_SowInventoryScalarFieldEnum)[keyof typeof Econ_SowInventoryScalarFieldEnum] + + +export const ScraperCacheScalarFieldEnum = { + id: 'id', + scraperName: 'scraperName', + lastDataHash: 'lastDataHash', + lastUpdateAt: 'lastUpdateAt', + metadata: 'metadata', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +} as const + +export type ScraperCacheScalarFieldEnum = (typeof ScraperCacheScalarFieldEnum)[keyof typeof ScraperCacheScalarFieldEnum] export const SortOrder = { @@ -149,6 +163,14 @@ export const JsonNullValueInput = { export type JsonNullValueInput = (typeof JsonNullValueInput)[keyof typeof JsonNullValueInput] +export const NullableJsonNullValueInput = { + DbNull: DbNull, + JsonNull: JsonNull +} as const + +export type NullableJsonNullValueInput = (typeof NullableJsonNullValueInput)[keyof typeof NullableJsonNullValueInput] + + export const UserOrderByRelevanceFieldEnum = { name: 'name', email: 'email', @@ -201,9 +223,25 @@ export const IndicatorOrderByRelevanceFieldEnum = { export type IndicatorOrderByRelevanceFieldEnum = (typeof IndicatorOrderByRelevanceFieldEnum)[keyof typeof IndicatorOrderByRelevanceFieldEnum] -export const SowInventoryOrderByRelevanceFieldEnum = { +export const Econ_SowInventoryOrderByRelevanceFieldEnum = { month: 'month' } as const -export type SowInventoryOrderByRelevanceFieldEnum = (typeof SowInventoryOrderByRelevanceFieldEnum)[keyof typeof SowInventoryOrderByRelevanceFieldEnum] +export type Econ_SowInventoryOrderByRelevanceFieldEnum = (typeof Econ_SowInventoryOrderByRelevanceFieldEnum)[keyof typeof Econ_SowInventoryOrderByRelevanceFieldEnum] + + +export const NullsOrder = { + first: 'first', + last: 'last' +} as const + +export type NullsOrder = (typeof NullsOrder)[keyof typeof NullsOrder] + + +export const ScraperCacheOrderByRelevanceFieldEnum = { + scraperName: 'scraperName', + lastDataHash: 'lastDataHash' +} as const + +export type ScraperCacheOrderByRelevanceFieldEnum = (typeof ScraperCacheOrderByRelevanceFieldEnum)[keyof typeof ScraperCacheOrderByRelevanceFieldEnum] diff --git a/generated/prisma/models.ts b/generated/prisma/models.ts index ca1f924..127107b 100644 --- a/generated/prisma/models.ts +++ b/generated/prisma/models.ts @@ -12,5 +12,6 @@ export type * from './models/User.ts' export type * from './models/Article.ts' export type * from './models/Strategy.ts' export type * from './models/Indicator.ts' -export type * from './models/SowInventory.ts' +export type * from './models/Econ_SowInventory.ts' +export type * from './models/ScraperCache.ts' export type * from './commonInputTypes.ts' \ No newline at end of file diff --git a/generated/prisma/models/Econ_SowInventory.ts b/generated/prisma/models/Econ_SowInventory.ts new file mode 100644 index 0000000..d1bb041 --- /dev/null +++ b/generated/prisma/models/Econ_SowInventory.ts @@ -0,0 +1,1090 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * This file exports the `Econ_SowInventory` 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 Econ_SowInventory + * + */ +export type Econ_SowInventoryModel = runtime.Types.Result.DefaultSelection + +export type AggregateEcon_SowInventory = { + _count: Econ_SowInventoryCountAggregateOutputType | null + _avg: Econ_SowInventoryAvgAggregateOutputType | null + _sum: Econ_SowInventorySumAggregateOutputType | null + _min: Econ_SowInventoryMinAggregateOutputType | null + _max: Econ_SowInventoryMaxAggregateOutputType | null +} + +export type Econ_SowInventoryAvgAggregateOutputType = { + id: number | null + inventory: number | null +} + +export type Econ_SowInventorySumAggregateOutputType = { + id: number | null + inventory: number | null +} + +export type Econ_SowInventoryMinAggregateOutputType = { + id: number | null + month: string | null + inventory: number | null + createdAt: Date | null + updatedAt: Date | null +} + +export type Econ_SowInventoryMaxAggregateOutputType = { + id: number | null + month: string | null + inventory: number | null + createdAt: Date | null + updatedAt: Date | null +} + +export type Econ_SowInventoryCountAggregateOutputType = { + id: number + month: number + inventory: number + createdAt: number + updatedAt: number + _all: number +} + + +export type Econ_SowInventoryAvgAggregateInputType = { + id?: true + inventory?: true +} + +export type Econ_SowInventorySumAggregateInputType = { + id?: true + inventory?: true +} + +export type Econ_SowInventoryMinAggregateInputType = { + id?: true + month?: true + inventory?: true + createdAt?: true + updatedAt?: true +} + +export type Econ_SowInventoryMaxAggregateInputType = { + id?: true + month?: true + inventory?: true + createdAt?: true + updatedAt?: true +} + +export type Econ_SowInventoryCountAggregateInputType = { + id?: true + month?: true + inventory?: true + createdAt?: true + updatedAt?: true + _all?: true +} + +export type Econ_SowInventoryAggregateArgs = { + /** + * Filter which Econ_SowInventory to aggregate. + */ + where?: Prisma.Econ_SowInventoryWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Econ_SowInventories to fetch. + */ + orderBy?: Prisma.Econ_SowInventoryOrderByWithRelationInput | Prisma.Econ_SowInventoryOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: Prisma.Econ_SowInventoryWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Econ_SowInventories 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` Econ_SowInventories. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Econ_SowInventories + **/ + _count?: true | Econ_SowInventoryCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: Econ_SowInventoryAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: Econ_SowInventorySumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: Econ_SowInventoryMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: Econ_SowInventoryMaxAggregateInputType +} + +export type GetEcon_SowInventoryAggregateType = { + [P in keyof T & keyof AggregateEcon_SowInventory]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType +} + + + + +export type Econ_SowInventoryGroupByArgs = { + where?: Prisma.Econ_SowInventoryWhereInput + orderBy?: Prisma.Econ_SowInventoryOrderByWithAggregationInput | Prisma.Econ_SowInventoryOrderByWithAggregationInput[] + by: Prisma.Econ_SowInventoryScalarFieldEnum[] | Prisma.Econ_SowInventoryScalarFieldEnum + having?: Prisma.Econ_SowInventoryScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: Econ_SowInventoryCountAggregateInputType | true + _avg?: Econ_SowInventoryAvgAggregateInputType + _sum?: Econ_SowInventorySumAggregateInputType + _min?: Econ_SowInventoryMinAggregateInputType + _max?: Econ_SowInventoryMaxAggregateInputType +} + +export type Econ_SowInventoryGroupByOutputType = { + id: number + month: string + inventory: number + createdAt: Date + updatedAt: Date + _count: Econ_SowInventoryCountAggregateOutputType | null + _avg: Econ_SowInventoryAvgAggregateOutputType | null + _sum: Econ_SowInventorySumAggregateOutputType | null + _min: Econ_SowInventoryMinAggregateOutputType | null + _max: Econ_SowInventoryMaxAggregateOutputType | null +} + +export type GetEcon_SowInventoryGroupByPayload = Prisma.PrismaPromise< + Array< + Prisma.PickEnumerable & + { + [P in ((keyof T) & (keyof Econ_SowInventoryGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType + } + > + > + + + +export type Econ_SowInventoryWhereInput = { + AND?: Prisma.Econ_SowInventoryWhereInput | Prisma.Econ_SowInventoryWhereInput[] + OR?: Prisma.Econ_SowInventoryWhereInput[] + NOT?: Prisma.Econ_SowInventoryWhereInput | Prisma.Econ_SowInventoryWhereInput[] + id?: Prisma.IntFilter<"Econ_SowInventory"> | number + month?: Prisma.StringFilter<"Econ_SowInventory"> | string + inventory?: Prisma.IntFilter<"Econ_SowInventory"> | number + createdAt?: Prisma.DateTimeFilter<"Econ_SowInventory"> | Date | string + updatedAt?: Prisma.DateTimeFilter<"Econ_SowInventory"> | Date | string +} + +export type Econ_SowInventoryOrderByWithRelationInput = { + id?: Prisma.SortOrder + month?: Prisma.SortOrder + inventory?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder + _relevance?: Prisma.Econ_SowInventoryOrderByRelevanceInput +} + +export type Econ_SowInventoryWhereUniqueInput = Prisma.AtLeast<{ + id?: number + month?: string + AND?: Prisma.Econ_SowInventoryWhereInput | Prisma.Econ_SowInventoryWhereInput[] + OR?: Prisma.Econ_SowInventoryWhereInput[] + NOT?: Prisma.Econ_SowInventoryWhereInput | Prisma.Econ_SowInventoryWhereInput[] + inventory?: Prisma.IntFilter<"Econ_SowInventory"> | number + createdAt?: Prisma.DateTimeFilter<"Econ_SowInventory"> | Date | string + updatedAt?: Prisma.DateTimeFilter<"Econ_SowInventory"> | Date | string +}, "id" | "month"> + +export type Econ_SowInventoryOrderByWithAggregationInput = { + id?: Prisma.SortOrder + month?: Prisma.SortOrder + inventory?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder + _count?: Prisma.Econ_SowInventoryCountOrderByAggregateInput + _avg?: Prisma.Econ_SowInventoryAvgOrderByAggregateInput + _max?: Prisma.Econ_SowInventoryMaxOrderByAggregateInput + _min?: Prisma.Econ_SowInventoryMinOrderByAggregateInput + _sum?: Prisma.Econ_SowInventorySumOrderByAggregateInput +} + +export type Econ_SowInventoryScalarWhereWithAggregatesInput = { + AND?: Prisma.Econ_SowInventoryScalarWhereWithAggregatesInput | Prisma.Econ_SowInventoryScalarWhereWithAggregatesInput[] + OR?: Prisma.Econ_SowInventoryScalarWhereWithAggregatesInput[] + NOT?: Prisma.Econ_SowInventoryScalarWhereWithAggregatesInput | Prisma.Econ_SowInventoryScalarWhereWithAggregatesInput[] + id?: Prisma.IntWithAggregatesFilter<"Econ_SowInventory"> | number + month?: Prisma.StringWithAggregatesFilter<"Econ_SowInventory"> | string + inventory?: Prisma.IntWithAggregatesFilter<"Econ_SowInventory"> | number + createdAt?: Prisma.DateTimeWithAggregatesFilter<"Econ_SowInventory"> | Date | string + updatedAt?: Prisma.DateTimeWithAggregatesFilter<"Econ_SowInventory"> | Date | string +} + +export type Econ_SowInventoryCreateInput = { + month: string + inventory: number + createdAt?: Date | string + updatedAt?: Date | string +} + +export type Econ_SowInventoryUncheckedCreateInput = { + id?: number + month: string + inventory: number + createdAt?: Date | string + updatedAt?: Date | string +} + +export type Econ_SowInventoryUpdateInput = { + month?: Prisma.StringFieldUpdateOperationsInput | string + inventory?: Prisma.IntFieldUpdateOperationsInput | number + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type Econ_SowInventoryUncheckedUpdateInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + month?: Prisma.StringFieldUpdateOperationsInput | string + inventory?: Prisma.IntFieldUpdateOperationsInput | number + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type Econ_SowInventoryCreateManyInput = { + id?: number + month: string + inventory: number + createdAt?: Date | string + updatedAt?: Date | string +} + +export type Econ_SowInventoryUpdateManyMutationInput = { + month?: Prisma.StringFieldUpdateOperationsInput | string + inventory?: Prisma.IntFieldUpdateOperationsInput | number + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type Econ_SowInventoryUncheckedUpdateManyInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + month?: Prisma.StringFieldUpdateOperationsInput | string + inventory?: Prisma.IntFieldUpdateOperationsInput | number + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type Econ_SowInventoryOrderByRelevanceInput = { + fields: Prisma.Econ_SowInventoryOrderByRelevanceFieldEnum | Prisma.Econ_SowInventoryOrderByRelevanceFieldEnum[] + sort: Prisma.SortOrder + search: string +} + +export type Econ_SowInventoryCountOrderByAggregateInput = { + id?: Prisma.SortOrder + month?: Prisma.SortOrder + inventory?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder +} + +export type Econ_SowInventoryAvgOrderByAggregateInput = { + id?: Prisma.SortOrder + inventory?: Prisma.SortOrder +} + +export type Econ_SowInventoryMaxOrderByAggregateInput = { + id?: Prisma.SortOrder + month?: Prisma.SortOrder + inventory?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder +} + +export type Econ_SowInventoryMinOrderByAggregateInput = { + id?: Prisma.SortOrder + month?: Prisma.SortOrder + inventory?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder +} + +export type Econ_SowInventorySumOrderByAggregateInput = { + id?: Prisma.SortOrder + inventory?: Prisma.SortOrder +} + + + +export type Econ_SowInventorySelect = runtime.Types.Extensions.GetSelect<{ + id?: boolean + month?: boolean + inventory?: boolean + createdAt?: boolean + updatedAt?: boolean +}, ExtArgs["result"]["econ_SowInventory"]> + + + +export type Econ_SowInventorySelectScalar = { + id?: boolean + month?: boolean + inventory?: boolean + createdAt?: boolean + updatedAt?: boolean +} + +export type Econ_SowInventoryOmit = runtime.Types.Extensions.GetOmit<"id" | "month" | "inventory" | "createdAt" | "updatedAt", ExtArgs["result"]["econ_SowInventory"]> + +export type $Econ_SowInventoryPayload = { + name: "Econ_SowInventory" + objects: {} + scalars: runtime.Types.Extensions.GetPayloadResult<{ + id: number + month: string + inventory: number + createdAt: Date + updatedAt: Date + }, ExtArgs["result"]["econ_SowInventory"]> + composites: {} +} + +export type Econ_SowInventoryGetPayload = runtime.Types.Result.GetResult + +export type Econ_SowInventoryCountArgs = + Omit & { + select?: Econ_SowInventoryCountAggregateInputType | true + } + +export interface Econ_SowInventoryDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['Econ_SowInventory'], meta: { name: 'Econ_SowInventory' } } + /** + * Find zero or one Econ_SowInventory that matches the filter. + * @param {Econ_SowInventoryFindUniqueArgs} args - Arguments to find a Econ_SowInventory + * @example + * // Get one Econ_SowInventory + * const econ_SowInventory = await prisma.econ_SowInventory.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__Econ_SowInventoryClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one Econ_SowInventory that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {Econ_SowInventoryFindUniqueOrThrowArgs} args - Arguments to find a Econ_SowInventory + * @example + * // Get one Econ_SowInventory + * const econ_SowInventory = await prisma.econ_SowInventory.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__Econ_SowInventoryClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Econ_SowInventory 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 {Econ_SowInventoryFindFirstArgs} args - Arguments to find a Econ_SowInventory + * @example + * // Get one Econ_SowInventory + * const econ_SowInventory = await prisma.econ_SowInventory.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__Econ_SowInventoryClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Econ_SowInventory 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 {Econ_SowInventoryFindFirstOrThrowArgs} args - Arguments to find a Econ_SowInventory + * @example + * // Get one Econ_SowInventory + * const econ_SowInventory = await prisma.econ_SowInventory.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__Econ_SowInventoryClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more Econ_SowInventories 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 {Econ_SowInventoryFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all Econ_SowInventories + * const econ_SowInventories = await prisma.econ_SowInventory.findMany() + * + * // Get first 10 Econ_SowInventories + * const econ_SowInventories = await prisma.econ_SowInventory.findMany({ take: 10 }) + * + * // Only select the `id` + * const econ_SowInventoryWithIdOnly = await prisma.econ_SowInventory.findMany({ select: { id: true } }) + * + */ + findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> + + /** + * Create a Econ_SowInventory. + * @param {Econ_SowInventoryCreateArgs} args - Arguments to create a Econ_SowInventory. + * @example + * // Create one Econ_SowInventory + * const Econ_SowInventory = await prisma.econ_SowInventory.create({ + * data: { + * // ... data to create a Econ_SowInventory + * } + * }) + * + */ + create(args: Prisma.SelectSubset>): Prisma.Prisma__Econ_SowInventoryClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many Econ_SowInventories. + * @param {Econ_SowInventoryCreateManyArgs} args - Arguments to create many Econ_SowInventories. + * @example + * // Create many Econ_SowInventories + * const econ_SowInventory = await prisma.econ_SowInventory.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Delete a Econ_SowInventory. + * @param {Econ_SowInventoryDeleteArgs} args - Arguments to delete one Econ_SowInventory. + * @example + * // Delete one Econ_SowInventory + * const Econ_SowInventory = await prisma.econ_SowInventory.delete({ + * where: { + * // ... filter to delete one Econ_SowInventory + * } + * }) + * + */ + delete(args: Prisma.SelectSubset>): Prisma.Prisma__Econ_SowInventoryClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one Econ_SowInventory. + * @param {Econ_SowInventoryUpdateArgs} args - Arguments to update one Econ_SowInventory. + * @example + * // Update one Econ_SowInventory + * const econ_SowInventory = await prisma.econ_SowInventory.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: Prisma.SelectSubset>): Prisma.Prisma__Econ_SowInventoryClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more Econ_SowInventories. + * @param {Econ_SowInventoryDeleteManyArgs} args - Arguments to filter Econ_SowInventories to delete. + * @example + * // Delete a few Econ_SowInventories + * const { count } = await prisma.econ_SowInventory.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Econ_SowInventories. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {Econ_SowInventoryUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Econ_SowInventories + * const econ_SowInventory = await prisma.econ_SowInventory.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Create or update one Econ_SowInventory. + * @param {Econ_SowInventoryUpsertArgs} args - Arguments to update or create a Econ_SowInventory. + * @example + * // Update or create a Econ_SowInventory + * const econ_SowInventory = await prisma.econ_SowInventory.upsert({ + * create: { + * // ... data to create a Econ_SowInventory + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the Econ_SowInventory we want to update + * } + * }) + */ + upsert(args: Prisma.SelectSubset>): Prisma.Prisma__Econ_SowInventoryClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of Econ_SowInventories. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {Econ_SowInventoryCountArgs} args - Arguments to filter Econ_SowInventories to count. + * @example + * // Count the number of Econ_SowInventories + * const count = await prisma.econ_SowInventory.count({ + * where: { + * // ... the filter for the Econ_SowInventories we want to count + * } + * }) + **/ + count( + args?: Prisma.Subset, + ): Prisma.PrismaPromise< + T extends runtime.Types.Utils.Record<'select', any> + ? T['select'] extends true + ? number + : Prisma.GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a Econ_SowInventory. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {Econ_SowInventoryAggregateArgs} 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(args: Prisma.Subset): Prisma.PrismaPromise> + + /** + * Group by Econ_SowInventory. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {Econ_SowInventoryGroupByArgs} 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 Econ_SowInventoryGroupByArgs, + HasSelectOrTake extends Prisma.Or< + Prisma.Extends<'skip', Prisma.Keys>, + Prisma.Extends<'take', Prisma.Keys> + >, + OrderByArg extends Prisma.True extends HasSelectOrTake + ? { orderBy: Econ_SowInventoryGroupByArgs['orderBy'] } + : { orderBy?: Econ_SowInventoryGroupByArgs['orderBy'] }, + OrderFields extends Prisma.ExcludeUnderscoreKeys>>, + ByFields extends Prisma.MaybeTupleToUnion, + ByValid extends Prisma.Has, + HavingFields extends Prisma.GetHavingFields, + HavingValid extends Prisma.Has, + 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 + ? 'orderBy' extends Prisma.Keys + ? 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 + ? 'orderBy' extends Prisma.Keys + ? 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 & InputErrors): {} extends InputErrors ? GetEcon_SowInventoryGroupByPayload : Prisma.PrismaPromise +/** + * Fields of the Econ_SowInventory model + */ +readonly fields: Econ_SowInventoryFieldRefs; +} + +/** + * The delegate class that acts as a "Promise-like" for Econ_SowInventory. + * 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__Econ_SowInventoryClient extends Prisma.PrismaPromise { + 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(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise + /** + * 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(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise + /** + * 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 +} + + + + +/** + * Fields of the Econ_SowInventory model + */ +export interface Econ_SowInventoryFieldRefs { + readonly id: Prisma.FieldRef<"Econ_SowInventory", 'Int'> + readonly month: Prisma.FieldRef<"Econ_SowInventory", 'String'> + readonly inventory: Prisma.FieldRef<"Econ_SowInventory", 'Int'> + readonly createdAt: Prisma.FieldRef<"Econ_SowInventory", 'DateTime'> + readonly updatedAt: Prisma.FieldRef<"Econ_SowInventory", 'DateTime'> +} + + +// Custom InputTypes +/** + * Econ_SowInventory findUnique + */ +export type Econ_SowInventoryFindUniqueArgs = { + /** + * Select specific fields to fetch from the Econ_SowInventory + */ + select?: Prisma.Econ_SowInventorySelect | null + /** + * Omit specific fields from the Econ_SowInventory + */ + omit?: Prisma.Econ_SowInventoryOmit | null + /** + * Filter, which Econ_SowInventory to fetch. + */ + where: Prisma.Econ_SowInventoryWhereUniqueInput +} + +/** + * Econ_SowInventory findUniqueOrThrow + */ +export type Econ_SowInventoryFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the Econ_SowInventory + */ + select?: Prisma.Econ_SowInventorySelect | null + /** + * Omit specific fields from the Econ_SowInventory + */ + omit?: Prisma.Econ_SowInventoryOmit | null + /** + * Filter, which Econ_SowInventory to fetch. + */ + where: Prisma.Econ_SowInventoryWhereUniqueInput +} + +/** + * Econ_SowInventory findFirst + */ +export type Econ_SowInventoryFindFirstArgs = { + /** + * Select specific fields to fetch from the Econ_SowInventory + */ + select?: Prisma.Econ_SowInventorySelect | null + /** + * Omit specific fields from the Econ_SowInventory + */ + omit?: Prisma.Econ_SowInventoryOmit | null + /** + * Filter, which Econ_SowInventory to fetch. + */ + where?: Prisma.Econ_SowInventoryWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Econ_SowInventories to fetch. + */ + orderBy?: Prisma.Econ_SowInventoryOrderByWithRelationInput | Prisma.Econ_SowInventoryOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Econ_SowInventories. + */ + cursor?: Prisma.Econ_SowInventoryWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Econ_SowInventories 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` Econ_SowInventories. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Econ_SowInventories. + */ + distinct?: Prisma.Econ_SowInventoryScalarFieldEnum | Prisma.Econ_SowInventoryScalarFieldEnum[] +} + +/** + * Econ_SowInventory findFirstOrThrow + */ +export type Econ_SowInventoryFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the Econ_SowInventory + */ + select?: Prisma.Econ_SowInventorySelect | null + /** + * Omit specific fields from the Econ_SowInventory + */ + omit?: Prisma.Econ_SowInventoryOmit | null + /** + * Filter, which Econ_SowInventory to fetch. + */ + where?: Prisma.Econ_SowInventoryWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Econ_SowInventories to fetch. + */ + orderBy?: Prisma.Econ_SowInventoryOrderByWithRelationInput | Prisma.Econ_SowInventoryOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Econ_SowInventories. + */ + cursor?: Prisma.Econ_SowInventoryWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Econ_SowInventories 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` Econ_SowInventories. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Econ_SowInventories. + */ + distinct?: Prisma.Econ_SowInventoryScalarFieldEnum | Prisma.Econ_SowInventoryScalarFieldEnum[] +} + +/** + * Econ_SowInventory findMany + */ +export type Econ_SowInventoryFindManyArgs = { + /** + * Select specific fields to fetch from the Econ_SowInventory + */ + select?: Prisma.Econ_SowInventorySelect | null + /** + * Omit specific fields from the Econ_SowInventory + */ + omit?: Prisma.Econ_SowInventoryOmit | null + /** + * Filter, which Econ_SowInventories to fetch. + */ + where?: Prisma.Econ_SowInventoryWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Econ_SowInventories to fetch. + */ + orderBy?: Prisma.Econ_SowInventoryOrderByWithRelationInput | Prisma.Econ_SowInventoryOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Econ_SowInventories. + */ + cursor?: Prisma.Econ_SowInventoryWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Econ_SowInventories 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` Econ_SowInventories. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Econ_SowInventories. + */ + distinct?: Prisma.Econ_SowInventoryScalarFieldEnum | Prisma.Econ_SowInventoryScalarFieldEnum[] +} + +/** + * Econ_SowInventory create + */ +export type Econ_SowInventoryCreateArgs = { + /** + * Select specific fields to fetch from the Econ_SowInventory + */ + select?: Prisma.Econ_SowInventorySelect | null + /** + * Omit specific fields from the Econ_SowInventory + */ + omit?: Prisma.Econ_SowInventoryOmit | null + /** + * The data needed to create a Econ_SowInventory. + */ + data: Prisma.XOR +} + +/** + * Econ_SowInventory createMany + */ +export type Econ_SowInventoryCreateManyArgs = { + /** + * The data used to create many Econ_SowInventories. + */ + data: Prisma.Econ_SowInventoryCreateManyInput | Prisma.Econ_SowInventoryCreateManyInput[] + skipDuplicates?: boolean +} + +/** + * Econ_SowInventory update + */ +export type Econ_SowInventoryUpdateArgs = { + /** + * Select specific fields to fetch from the Econ_SowInventory + */ + select?: Prisma.Econ_SowInventorySelect | null + /** + * Omit specific fields from the Econ_SowInventory + */ + omit?: Prisma.Econ_SowInventoryOmit | null + /** + * The data needed to update a Econ_SowInventory. + */ + data: Prisma.XOR + /** + * Choose, which Econ_SowInventory to update. + */ + where: Prisma.Econ_SowInventoryWhereUniqueInput +} + +/** + * Econ_SowInventory updateMany + */ +export type Econ_SowInventoryUpdateManyArgs = { + /** + * The data used to update Econ_SowInventories. + */ + data: Prisma.XOR + /** + * Filter which Econ_SowInventories to update + */ + where?: Prisma.Econ_SowInventoryWhereInput + /** + * Limit how many Econ_SowInventories to update. + */ + limit?: number +} + +/** + * Econ_SowInventory upsert + */ +export type Econ_SowInventoryUpsertArgs = { + /** + * Select specific fields to fetch from the Econ_SowInventory + */ + select?: Prisma.Econ_SowInventorySelect | null + /** + * Omit specific fields from the Econ_SowInventory + */ + omit?: Prisma.Econ_SowInventoryOmit | null + /** + * The filter to search for the Econ_SowInventory to update in case it exists. + */ + where: Prisma.Econ_SowInventoryWhereUniqueInput + /** + * In case the Econ_SowInventory found by the `where` argument doesn't exist, create a new Econ_SowInventory with this data. + */ + create: Prisma.XOR + /** + * In case the Econ_SowInventory was found with the provided `where` argument, update it with this data. + */ + update: Prisma.XOR +} + +/** + * Econ_SowInventory delete + */ +export type Econ_SowInventoryDeleteArgs = { + /** + * Select specific fields to fetch from the Econ_SowInventory + */ + select?: Prisma.Econ_SowInventorySelect | null + /** + * Omit specific fields from the Econ_SowInventory + */ + omit?: Prisma.Econ_SowInventoryOmit | null + /** + * Filter which Econ_SowInventory to delete. + */ + where: Prisma.Econ_SowInventoryWhereUniqueInput +} + +/** + * Econ_SowInventory deleteMany + */ +export type Econ_SowInventoryDeleteManyArgs = { + /** + * Filter which Econ_SowInventories to delete + */ + where?: Prisma.Econ_SowInventoryWhereInput + /** + * Limit how many Econ_SowInventories to delete. + */ + limit?: number +} + +/** + * Econ_SowInventory without action + */ +export type Econ_SowInventoryDefaultArgs = { + /** + * Select specific fields to fetch from the Econ_SowInventory + */ + select?: Prisma.Econ_SowInventorySelect | null + /** + * Omit specific fields from the Econ_SowInventory + */ + omit?: Prisma.Econ_SowInventoryOmit | null +} diff --git a/generated/prisma/models/ScraperCache.ts b/generated/prisma/models/ScraperCache.ts new file mode 100644 index 0000000..036e742 --- /dev/null +++ b/generated/prisma/models/ScraperCache.ts @@ -0,0 +1,1134 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * This file exports the `ScraperCache` 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 ScraperCache + * + */ +export type ScraperCacheModel = runtime.Types.Result.DefaultSelection + +export type AggregateScraperCache = { + _count: ScraperCacheCountAggregateOutputType | null + _avg: ScraperCacheAvgAggregateOutputType | null + _sum: ScraperCacheSumAggregateOutputType | null + _min: ScraperCacheMinAggregateOutputType | null + _max: ScraperCacheMaxAggregateOutputType | null +} + +export type ScraperCacheAvgAggregateOutputType = { + id: number | null +} + +export type ScraperCacheSumAggregateOutputType = { + id: number | null +} + +export type ScraperCacheMinAggregateOutputType = { + id: number | null + scraperName: string | null + lastDataHash: string | null + lastUpdateAt: Date | null + createdAt: Date | null + updatedAt: Date | null +} + +export type ScraperCacheMaxAggregateOutputType = { + id: number | null + scraperName: string | null + lastDataHash: string | null + lastUpdateAt: Date | null + createdAt: Date | null + updatedAt: Date | null +} + +export type ScraperCacheCountAggregateOutputType = { + id: number + scraperName: number + lastDataHash: number + lastUpdateAt: number + metadata: number + createdAt: number + updatedAt: number + _all: number +} + + +export type ScraperCacheAvgAggregateInputType = { + id?: true +} + +export type ScraperCacheSumAggregateInputType = { + id?: true +} + +export type ScraperCacheMinAggregateInputType = { + id?: true + scraperName?: true + lastDataHash?: true + lastUpdateAt?: true + createdAt?: true + updatedAt?: true +} + +export type ScraperCacheMaxAggregateInputType = { + id?: true + scraperName?: true + lastDataHash?: true + lastUpdateAt?: true + createdAt?: true + updatedAt?: true +} + +export type ScraperCacheCountAggregateInputType = { + id?: true + scraperName?: true + lastDataHash?: true + lastUpdateAt?: true + metadata?: true + createdAt?: true + updatedAt?: true + _all?: true +} + +export type ScraperCacheAggregateArgs = { + /** + * Filter which ScraperCache to aggregate. + */ + where?: Prisma.ScraperCacheWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ScraperCaches to fetch. + */ + orderBy?: Prisma.ScraperCacheOrderByWithRelationInput | Prisma.ScraperCacheOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: Prisma.ScraperCacheWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ScraperCaches 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` ScraperCaches. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned ScraperCaches + **/ + _count?: true | ScraperCacheCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: ScraperCacheAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: ScraperCacheSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: ScraperCacheMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: ScraperCacheMaxAggregateInputType +} + +export type GetScraperCacheAggregateType = { + [P in keyof T & keyof AggregateScraperCache]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType +} + + + + +export type ScraperCacheGroupByArgs = { + where?: Prisma.ScraperCacheWhereInput + orderBy?: Prisma.ScraperCacheOrderByWithAggregationInput | Prisma.ScraperCacheOrderByWithAggregationInput[] + by: Prisma.ScraperCacheScalarFieldEnum[] | Prisma.ScraperCacheScalarFieldEnum + having?: Prisma.ScraperCacheScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: ScraperCacheCountAggregateInputType | true + _avg?: ScraperCacheAvgAggregateInputType + _sum?: ScraperCacheSumAggregateInputType + _min?: ScraperCacheMinAggregateInputType + _max?: ScraperCacheMaxAggregateInputType +} + +export type ScraperCacheGroupByOutputType = { + id: number + scraperName: string + lastDataHash: string | null + lastUpdateAt: Date + metadata: runtime.JsonValue | null + createdAt: Date + updatedAt: Date + _count: ScraperCacheCountAggregateOutputType | null + _avg: ScraperCacheAvgAggregateOutputType | null + _sum: ScraperCacheSumAggregateOutputType | null + _min: ScraperCacheMinAggregateOutputType | null + _max: ScraperCacheMaxAggregateOutputType | null +} + +export type GetScraperCacheGroupByPayload = Prisma.PrismaPromise< + Array< + Prisma.PickEnumerable & + { + [P in ((keyof T) & (keyof ScraperCacheGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType + } + > + > + + + +export type ScraperCacheWhereInput = { + AND?: Prisma.ScraperCacheWhereInput | Prisma.ScraperCacheWhereInput[] + OR?: Prisma.ScraperCacheWhereInput[] + NOT?: Prisma.ScraperCacheWhereInput | Prisma.ScraperCacheWhereInput[] + id?: Prisma.IntFilter<"ScraperCache"> | number + scraperName?: Prisma.StringFilter<"ScraperCache"> | string + lastDataHash?: Prisma.StringNullableFilter<"ScraperCache"> | string | null + lastUpdateAt?: Prisma.DateTimeFilter<"ScraperCache"> | Date | string + metadata?: Prisma.JsonNullableFilter<"ScraperCache"> + createdAt?: Prisma.DateTimeFilter<"ScraperCache"> | Date | string + updatedAt?: Prisma.DateTimeFilter<"ScraperCache"> | Date | string +} + +export type ScraperCacheOrderByWithRelationInput = { + id?: Prisma.SortOrder + scraperName?: Prisma.SortOrder + lastDataHash?: Prisma.SortOrderInput | Prisma.SortOrder + lastUpdateAt?: Prisma.SortOrder + metadata?: Prisma.SortOrderInput | Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder + _relevance?: Prisma.ScraperCacheOrderByRelevanceInput +} + +export type ScraperCacheWhereUniqueInput = Prisma.AtLeast<{ + id?: number + scraperName?: string + AND?: Prisma.ScraperCacheWhereInput | Prisma.ScraperCacheWhereInput[] + OR?: Prisma.ScraperCacheWhereInput[] + NOT?: Prisma.ScraperCacheWhereInput | Prisma.ScraperCacheWhereInput[] + lastDataHash?: Prisma.StringNullableFilter<"ScraperCache"> | string | null + lastUpdateAt?: Prisma.DateTimeFilter<"ScraperCache"> | Date | string + metadata?: Prisma.JsonNullableFilter<"ScraperCache"> + createdAt?: Prisma.DateTimeFilter<"ScraperCache"> | Date | string + updatedAt?: Prisma.DateTimeFilter<"ScraperCache"> | Date | string +}, "id" | "scraperName"> + +export type ScraperCacheOrderByWithAggregationInput = { + id?: Prisma.SortOrder + scraperName?: Prisma.SortOrder + lastDataHash?: Prisma.SortOrderInput | Prisma.SortOrder + lastUpdateAt?: Prisma.SortOrder + metadata?: Prisma.SortOrderInput | Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder + _count?: Prisma.ScraperCacheCountOrderByAggregateInput + _avg?: Prisma.ScraperCacheAvgOrderByAggregateInput + _max?: Prisma.ScraperCacheMaxOrderByAggregateInput + _min?: Prisma.ScraperCacheMinOrderByAggregateInput + _sum?: Prisma.ScraperCacheSumOrderByAggregateInput +} + +export type ScraperCacheScalarWhereWithAggregatesInput = { + AND?: Prisma.ScraperCacheScalarWhereWithAggregatesInput | Prisma.ScraperCacheScalarWhereWithAggregatesInput[] + OR?: Prisma.ScraperCacheScalarWhereWithAggregatesInput[] + NOT?: Prisma.ScraperCacheScalarWhereWithAggregatesInput | Prisma.ScraperCacheScalarWhereWithAggregatesInput[] + id?: Prisma.IntWithAggregatesFilter<"ScraperCache"> | number + scraperName?: Prisma.StringWithAggregatesFilter<"ScraperCache"> | string + lastDataHash?: Prisma.StringNullableWithAggregatesFilter<"ScraperCache"> | string | null + lastUpdateAt?: Prisma.DateTimeWithAggregatesFilter<"ScraperCache"> | Date | string + metadata?: Prisma.JsonNullableWithAggregatesFilter<"ScraperCache"> + createdAt?: Prisma.DateTimeWithAggregatesFilter<"ScraperCache"> | Date | string + updatedAt?: Prisma.DateTimeWithAggregatesFilter<"ScraperCache"> | Date | string +} + +export type ScraperCacheCreateInput = { + scraperName: string + lastDataHash?: string | null + lastUpdateAt: Date | string + metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue + createdAt?: Date | string + updatedAt?: Date | string +} + +export type ScraperCacheUncheckedCreateInput = { + id?: number + scraperName: string + lastDataHash?: string | null + lastUpdateAt: Date | string + metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue + createdAt?: Date | string + updatedAt?: Date | string +} + +export type ScraperCacheUpdateInput = { + scraperName?: Prisma.StringFieldUpdateOperationsInput | string + lastDataHash?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + lastUpdateAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type ScraperCacheUncheckedUpdateInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + scraperName?: Prisma.StringFieldUpdateOperationsInput | string + lastDataHash?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + lastUpdateAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type ScraperCacheCreateManyInput = { + id?: number + scraperName: string + lastDataHash?: string | null + lastUpdateAt: Date | string + metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue + createdAt?: Date | string + updatedAt?: Date | string +} + +export type ScraperCacheUpdateManyMutationInput = { + scraperName?: Prisma.StringFieldUpdateOperationsInput | string + lastDataHash?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + lastUpdateAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type ScraperCacheUncheckedUpdateManyInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + scraperName?: Prisma.StringFieldUpdateOperationsInput | string + lastDataHash?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + lastUpdateAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type ScraperCacheOrderByRelevanceInput = { + fields: Prisma.ScraperCacheOrderByRelevanceFieldEnum | Prisma.ScraperCacheOrderByRelevanceFieldEnum[] + sort: Prisma.SortOrder + search: string +} + +export type ScraperCacheCountOrderByAggregateInput = { + id?: Prisma.SortOrder + scraperName?: Prisma.SortOrder + lastDataHash?: Prisma.SortOrder + lastUpdateAt?: Prisma.SortOrder + metadata?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder +} + +export type ScraperCacheAvgOrderByAggregateInput = { + id?: Prisma.SortOrder +} + +export type ScraperCacheMaxOrderByAggregateInput = { + id?: Prisma.SortOrder + scraperName?: Prisma.SortOrder + lastDataHash?: Prisma.SortOrder + lastUpdateAt?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder +} + +export type ScraperCacheMinOrderByAggregateInput = { + id?: Prisma.SortOrder + scraperName?: Prisma.SortOrder + lastDataHash?: Prisma.SortOrder + lastUpdateAt?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder +} + +export type ScraperCacheSumOrderByAggregateInput = { + id?: Prisma.SortOrder +} + +export type NullableStringFieldUpdateOperationsInput = { + set?: string | null +} + + + +export type ScraperCacheSelect = runtime.Types.Extensions.GetSelect<{ + id?: boolean + scraperName?: boolean + lastDataHash?: boolean + lastUpdateAt?: boolean + metadata?: boolean + createdAt?: boolean + updatedAt?: boolean +}, ExtArgs["result"]["scraperCache"]> + + + +export type ScraperCacheSelectScalar = { + id?: boolean + scraperName?: boolean + lastDataHash?: boolean + lastUpdateAt?: boolean + metadata?: boolean + createdAt?: boolean + updatedAt?: boolean +} + +export type ScraperCacheOmit = runtime.Types.Extensions.GetOmit<"id" | "scraperName" | "lastDataHash" | "lastUpdateAt" | "metadata" | "createdAt" | "updatedAt", ExtArgs["result"]["scraperCache"]> + +export type $ScraperCachePayload = { + name: "ScraperCache" + objects: {} + scalars: runtime.Types.Extensions.GetPayloadResult<{ + id: number + scraperName: string + lastDataHash: string | null + lastUpdateAt: Date + metadata: runtime.JsonValue | null + createdAt: Date + updatedAt: Date + }, ExtArgs["result"]["scraperCache"]> + composites: {} +} + +export type ScraperCacheGetPayload = runtime.Types.Result.GetResult + +export type ScraperCacheCountArgs = + Omit & { + select?: ScraperCacheCountAggregateInputType | true + } + +export interface ScraperCacheDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['ScraperCache'], meta: { name: 'ScraperCache' } } + /** + * Find zero or one ScraperCache that matches the filter. + * @param {ScraperCacheFindUniqueArgs} args - Arguments to find a ScraperCache + * @example + * // Get one ScraperCache + * const scraperCache = await prisma.scraperCache.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__ScraperCacheClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one ScraperCache that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {ScraperCacheFindUniqueOrThrowArgs} args - Arguments to find a ScraperCache + * @example + * // Get one ScraperCache + * const scraperCache = await prisma.scraperCache.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__ScraperCacheClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first ScraperCache 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 {ScraperCacheFindFirstArgs} args - Arguments to find a ScraperCache + * @example + * // Get one ScraperCache + * const scraperCache = await prisma.scraperCache.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__ScraperCacheClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first ScraperCache 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 {ScraperCacheFindFirstOrThrowArgs} args - Arguments to find a ScraperCache + * @example + * // Get one ScraperCache + * const scraperCache = await prisma.scraperCache.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__ScraperCacheClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more ScraperCaches 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 {ScraperCacheFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all ScraperCaches + * const scraperCaches = await prisma.scraperCache.findMany() + * + * // Get first 10 ScraperCaches + * const scraperCaches = await prisma.scraperCache.findMany({ take: 10 }) + * + * // Only select the `id` + * const scraperCacheWithIdOnly = await prisma.scraperCache.findMany({ select: { id: true } }) + * + */ + findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> + + /** + * Create a ScraperCache. + * @param {ScraperCacheCreateArgs} args - Arguments to create a ScraperCache. + * @example + * // Create one ScraperCache + * const ScraperCache = await prisma.scraperCache.create({ + * data: { + * // ... data to create a ScraperCache + * } + * }) + * + */ + create(args: Prisma.SelectSubset>): Prisma.Prisma__ScraperCacheClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many ScraperCaches. + * @param {ScraperCacheCreateManyArgs} args - Arguments to create many ScraperCaches. + * @example + * // Create many ScraperCaches + * const scraperCache = await prisma.scraperCache.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Delete a ScraperCache. + * @param {ScraperCacheDeleteArgs} args - Arguments to delete one ScraperCache. + * @example + * // Delete one ScraperCache + * const ScraperCache = await prisma.scraperCache.delete({ + * where: { + * // ... filter to delete one ScraperCache + * } + * }) + * + */ + delete(args: Prisma.SelectSubset>): Prisma.Prisma__ScraperCacheClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one ScraperCache. + * @param {ScraperCacheUpdateArgs} args - Arguments to update one ScraperCache. + * @example + * // Update one ScraperCache + * const scraperCache = await prisma.scraperCache.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: Prisma.SelectSubset>): Prisma.Prisma__ScraperCacheClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more ScraperCaches. + * @param {ScraperCacheDeleteManyArgs} args - Arguments to filter ScraperCaches to delete. + * @example + * // Delete a few ScraperCaches + * const { count } = await prisma.scraperCache.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more ScraperCaches. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ScraperCacheUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many ScraperCaches + * const scraperCache = await prisma.scraperCache.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Create or update one ScraperCache. + * @param {ScraperCacheUpsertArgs} args - Arguments to update or create a ScraperCache. + * @example + * // Update or create a ScraperCache + * const scraperCache = await prisma.scraperCache.upsert({ + * create: { + * // ... data to create a ScraperCache + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the ScraperCache we want to update + * } + * }) + */ + upsert(args: Prisma.SelectSubset>): Prisma.Prisma__ScraperCacheClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of ScraperCaches. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ScraperCacheCountArgs} args - Arguments to filter ScraperCaches to count. + * @example + * // Count the number of ScraperCaches + * const count = await prisma.scraperCache.count({ + * where: { + * // ... the filter for the ScraperCaches we want to count + * } + * }) + **/ + count( + args?: Prisma.Subset, + ): Prisma.PrismaPromise< + T extends runtime.Types.Utils.Record<'select', any> + ? T['select'] extends true + ? number + : Prisma.GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a ScraperCache. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ScraperCacheAggregateArgs} 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(args: Prisma.Subset): Prisma.PrismaPromise> + + /** + * Group by ScraperCache. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ScraperCacheGroupByArgs} 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 ScraperCacheGroupByArgs, + HasSelectOrTake extends Prisma.Or< + Prisma.Extends<'skip', Prisma.Keys>, + Prisma.Extends<'take', Prisma.Keys> + >, + OrderByArg extends Prisma.True extends HasSelectOrTake + ? { orderBy: ScraperCacheGroupByArgs['orderBy'] } + : { orderBy?: ScraperCacheGroupByArgs['orderBy'] }, + OrderFields extends Prisma.ExcludeUnderscoreKeys>>, + ByFields extends Prisma.MaybeTupleToUnion, + ByValid extends Prisma.Has, + HavingFields extends Prisma.GetHavingFields, + HavingValid extends Prisma.Has, + 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 + ? 'orderBy' extends Prisma.Keys + ? 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 + ? 'orderBy' extends Prisma.Keys + ? 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 & InputErrors): {} extends InputErrors ? GetScraperCacheGroupByPayload : Prisma.PrismaPromise +/** + * Fields of the ScraperCache model + */ +readonly fields: ScraperCacheFieldRefs; +} + +/** + * The delegate class that acts as a "Promise-like" for ScraperCache. + * 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__ScraperCacheClient extends Prisma.PrismaPromise { + 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(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise + /** + * 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(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise + /** + * 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 +} + + + + +/** + * Fields of the ScraperCache model + */ +export interface ScraperCacheFieldRefs { + readonly id: Prisma.FieldRef<"ScraperCache", 'Int'> + readonly scraperName: Prisma.FieldRef<"ScraperCache", 'String'> + readonly lastDataHash: Prisma.FieldRef<"ScraperCache", 'String'> + readonly lastUpdateAt: Prisma.FieldRef<"ScraperCache", 'DateTime'> + readonly metadata: Prisma.FieldRef<"ScraperCache", 'Json'> + readonly createdAt: Prisma.FieldRef<"ScraperCache", 'DateTime'> + readonly updatedAt: Prisma.FieldRef<"ScraperCache", 'DateTime'> +} + + +// Custom InputTypes +/** + * ScraperCache findUnique + */ +export type ScraperCacheFindUniqueArgs = { + /** + * Select specific fields to fetch from the ScraperCache + */ + select?: Prisma.ScraperCacheSelect | null + /** + * Omit specific fields from the ScraperCache + */ + omit?: Prisma.ScraperCacheOmit | null + /** + * Filter, which ScraperCache to fetch. + */ + where: Prisma.ScraperCacheWhereUniqueInput +} + +/** + * ScraperCache findUniqueOrThrow + */ +export type ScraperCacheFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the ScraperCache + */ + select?: Prisma.ScraperCacheSelect | null + /** + * Omit specific fields from the ScraperCache + */ + omit?: Prisma.ScraperCacheOmit | null + /** + * Filter, which ScraperCache to fetch. + */ + where: Prisma.ScraperCacheWhereUniqueInput +} + +/** + * ScraperCache findFirst + */ +export type ScraperCacheFindFirstArgs = { + /** + * Select specific fields to fetch from the ScraperCache + */ + select?: Prisma.ScraperCacheSelect | null + /** + * Omit specific fields from the ScraperCache + */ + omit?: Prisma.ScraperCacheOmit | null + /** + * Filter, which ScraperCache to fetch. + */ + where?: Prisma.ScraperCacheWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ScraperCaches to fetch. + */ + orderBy?: Prisma.ScraperCacheOrderByWithRelationInput | Prisma.ScraperCacheOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for ScraperCaches. + */ + cursor?: Prisma.ScraperCacheWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ScraperCaches 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` ScraperCaches. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of ScraperCaches. + */ + distinct?: Prisma.ScraperCacheScalarFieldEnum | Prisma.ScraperCacheScalarFieldEnum[] +} + +/** + * ScraperCache findFirstOrThrow + */ +export type ScraperCacheFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the ScraperCache + */ + select?: Prisma.ScraperCacheSelect | null + /** + * Omit specific fields from the ScraperCache + */ + omit?: Prisma.ScraperCacheOmit | null + /** + * Filter, which ScraperCache to fetch. + */ + where?: Prisma.ScraperCacheWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ScraperCaches to fetch. + */ + orderBy?: Prisma.ScraperCacheOrderByWithRelationInput | Prisma.ScraperCacheOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for ScraperCaches. + */ + cursor?: Prisma.ScraperCacheWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ScraperCaches 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` ScraperCaches. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of ScraperCaches. + */ + distinct?: Prisma.ScraperCacheScalarFieldEnum | Prisma.ScraperCacheScalarFieldEnum[] +} + +/** + * ScraperCache findMany + */ +export type ScraperCacheFindManyArgs = { + /** + * Select specific fields to fetch from the ScraperCache + */ + select?: Prisma.ScraperCacheSelect | null + /** + * Omit specific fields from the ScraperCache + */ + omit?: Prisma.ScraperCacheOmit | null + /** + * Filter, which ScraperCaches to fetch. + */ + where?: Prisma.ScraperCacheWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ScraperCaches to fetch. + */ + orderBy?: Prisma.ScraperCacheOrderByWithRelationInput | Prisma.ScraperCacheOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing ScraperCaches. + */ + cursor?: Prisma.ScraperCacheWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ScraperCaches 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` ScraperCaches. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of ScraperCaches. + */ + distinct?: Prisma.ScraperCacheScalarFieldEnum | Prisma.ScraperCacheScalarFieldEnum[] +} + +/** + * ScraperCache create + */ +export type ScraperCacheCreateArgs = { + /** + * Select specific fields to fetch from the ScraperCache + */ + select?: Prisma.ScraperCacheSelect | null + /** + * Omit specific fields from the ScraperCache + */ + omit?: Prisma.ScraperCacheOmit | null + /** + * The data needed to create a ScraperCache. + */ + data: Prisma.XOR +} + +/** + * ScraperCache createMany + */ +export type ScraperCacheCreateManyArgs = { + /** + * The data used to create many ScraperCaches. + */ + data: Prisma.ScraperCacheCreateManyInput | Prisma.ScraperCacheCreateManyInput[] + skipDuplicates?: boolean +} + +/** + * ScraperCache update + */ +export type ScraperCacheUpdateArgs = { + /** + * Select specific fields to fetch from the ScraperCache + */ + select?: Prisma.ScraperCacheSelect | null + /** + * Omit specific fields from the ScraperCache + */ + omit?: Prisma.ScraperCacheOmit | null + /** + * The data needed to update a ScraperCache. + */ + data: Prisma.XOR + /** + * Choose, which ScraperCache to update. + */ + where: Prisma.ScraperCacheWhereUniqueInput +} + +/** + * ScraperCache updateMany + */ +export type ScraperCacheUpdateManyArgs = { + /** + * The data used to update ScraperCaches. + */ + data: Prisma.XOR + /** + * Filter which ScraperCaches to update + */ + where?: Prisma.ScraperCacheWhereInput + /** + * Limit how many ScraperCaches to update. + */ + limit?: number +} + +/** + * ScraperCache upsert + */ +export type ScraperCacheUpsertArgs = { + /** + * Select specific fields to fetch from the ScraperCache + */ + select?: Prisma.ScraperCacheSelect | null + /** + * Omit specific fields from the ScraperCache + */ + omit?: Prisma.ScraperCacheOmit | null + /** + * The filter to search for the ScraperCache to update in case it exists. + */ + where: Prisma.ScraperCacheWhereUniqueInput + /** + * In case the ScraperCache found by the `where` argument doesn't exist, create a new ScraperCache with this data. + */ + create: Prisma.XOR + /** + * In case the ScraperCache was found with the provided `where` argument, update it with this data. + */ + update: Prisma.XOR +} + +/** + * ScraperCache delete + */ +export type ScraperCacheDeleteArgs = { + /** + * Select specific fields to fetch from the ScraperCache + */ + select?: Prisma.ScraperCacheSelect | null + /** + * Omit specific fields from the ScraperCache + */ + omit?: Prisma.ScraperCacheOmit | null + /** + * Filter which ScraperCache to delete. + */ + where: Prisma.ScraperCacheWhereUniqueInput +} + +/** + * ScraperCache deleteMany + */ +export type ScraperCacheDeleteManyArgs = { + /** + * Filter which ScraperCaches to delete + */ + where?: Prisma.ScraperCacheWhereInput + /** + * Limit how many ScraperCaches to delete. + */ + limit?: number +} + +/** + * ScraperCache without action + */ +export type ScraperCacheDefaultArgs = { + /** + * Select specific fields to fetch from the ScraperCache + */ + select?: Prisma.ScraperCacheSelect | null + /** + * Omit specific fields from the ScraperCache + */ + omit?: Prisma.ScraperCacheOmit | null +} diff --git a/generated/prisma/models/SowInventory.ts b/generated/prisma/models/SowInventory.ts deleted file mode 100644 index 55eb414..0000000 --- a/generated/prisma/models/SowInventory.ts +++ /dev/null @@ -1,1090 +0,0 @@ - -/* !!! This is code generated by Prisma. Do not edit directly. !!! */ -/* eslint-disable */ -// biome-ignore-all lint: generated file -// @ts-nocheck -/* - * This file exports the `SowInventory` 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 SowInventory - * - */ -export type SowInventoryModel = runtime.Types.Result.DefaultSelection - -export type AggregateSowInventory = { - _count: SowInventoryCountAggregateOutputType | null - _avg: SowInventoryAvgAggregateOutputType | null - _sum: SowInventorySumAggregateOutputType | null - _min: SowInventoryMinAggregateOutputType | null - _max: SowInventoryMaxAggregateOutputType | null -} - -export type SowInventoryAvgAggregateOutputType = { - id: number | null - inventory: number | null -} - -export type SowInventorySumAggregateOutputType = { - id: number | null - inventory: number | null -} - -export type SowInventoryMinAggregateOutputType = { - id: number | null - month: string | null - inventory: number | null - createdAt: Date | null - updatedAt: Date | null -} - -export type SowInventoryMaxAggregateOutputType = { - id: number | null - month: string | null - inventory: number | null - createdAt: Date | null - updatedAt: Date | null -} - -export type SowInventoryCountAggregateOutputType = { - id: number - month: number - inventory: number - createdAt: number - updatedAt: number - _all: number -} - - -export type SowInventoryAvgAggregateInputType = { - id?: true - inventory?: true -} - -export type SowInventorySumAggregateInputType = { - id?: true - inventory?: true -} - -export type SowInventoryMinAggregateInputType = { - id?: true - month?: true - inventory?: true - createdAt?: true - updatedAt?: true -} - -export type SowInventoryMaxAggregateInputType = { - id?: true - month?: true - inventory?: true - createdAt?: true - updatedAt?: true -} - -export type SowInventoryCountAggregateInputType = { - id?: true - month?: true - inventory?: true - createdAt?: true - updatedAt?: true - _all?: true -} - -export type SowInventoryAggregateArgs = { - /** - * Filter which SowInventory to aggregate. - */ - where?: Prisma.SowInventoryWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of SowInventories to fetch. - */ - orderBy?: Prisma.SowInventoryOrderByWithRelationInput | Prisma.SowInventoryOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: Prisma.SowInventoryWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` SowInventories 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` SowInventories. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned SowInventories - **/ - _count?: true | SowInventoryCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: SowInventoryAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: SowInventorySumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: SowInventoryMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: SowInventoryMaxAggregateInputType -} - -export type GetSowInventoryAggregateType = { - [P in keyof T & keyof AggregateSowInventory]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType -} - - - - -export type SowInventoryGroupByArgs = { - where?: Prisma.SowInventoryWhereInput - orderBy?: Prisma.SowInventoryOrderByWithAggregationInput | Prisma.SowInventoryOrderByWithAggregationInput[] - by: Prisma.SowInventoryScalarFieldEnum[] | Prisma.SowInventoryScalarFieldEnum - having?: Prisma.SowInventoryScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: SowInventoryCountAggregateInputType | true - _avg?: SowInventoryAvgAggregateInputType - _sum?: SowInventorySumAggregateInputType - _min?: SowInventoryMinAggregateInputType - _max?: SowInventoryMaxAggregateInputType -} - -export type SowInventoryGroupByOutputType = { - id: number - month: string - inventory: number - createdAt: Date - updatedAt: Date - _count: SowInventoryCountAggregateOutputType | null - _avg: SowInventoryAvgAggregateOutputType | null - _sum: SowInventorySumAggregateOutputType | null - _min: SowInventoryMinAggregateOutputType | null - _max: SowInventoryMaxAggregateOutputType | null -} - -export type GetSowInventoryGroupByPayload = Prisma.PrismaPromise< - Array< - Prisma.PickEnumerable & - { - [P in ((keyof T) & (keyof SowInventoryGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType - } - > - > - - - -export type SowInventoryWhereInput = { - AND?: Prisma.SowInventoryWhereInput | Prisma.SowInventoryWhereInput[] - OR?: Prisma.SowInventoryWhereInput[] - NOT?: Prisma.SowInventoryWhereInput | Prisma.SowInventoryWhereInput[] - id?: Prisma.IntFilter<"SowInventory"> | number - month?: Prisma.StringFilter<"SowInventory"> | string - inventory?: Prisma.IntFilter<"SowInventory"> | number - createdAt?: Prisma.DateTimeFilter<"SowInventory"> | Date | string - updatedAt?: Prisma.DateTimeFilter<"SowInventory"> | Date | string -} - -export type SowInventoryOrderByWithRelationInput = { - id?: Prisma.SortOrder - month?: Prisma.SortOrder - inventory?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - _relevance?: Prisma.SowInventoryOrderByRelevanceInput -} - -export type SowInventoryWhereUniqueInput = Prisma.AtLeast<{ - id?: number - month?: string - AND?: Prisma.SowInventoryWhereInput | Prisma.SowInventoryWhereInput[] - OR?: Prisma.SowInventoryWhereInput[] - NOT?: Prisma.SowInventoryWhereInput | Prisma.SowInventoryWhereInput[] - inventory?: Prisma.IntFilter<"SowInventory"> | number - createdAt?: Prisma.DateTimeFilter<"SowInventory"> | Date | string - updatedAt?: Prisma.DateTimeFilter<"SowInventory"> | Date | string -}, "id" | "month"> - -export type SowInventoryOrderByWithAggregationInput = { - id?: Prisma.SortOrder - month?: Prisma.SortOrder - inventory?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - _count?: Prisma.SowInventoryCountOrderByAggregateInput - _avg?: Prisma.SowInventoryAvgOrderByAggregateInput - _max?: Prisma.SowInventoryMaxOrderByAggregateInput - _min?: Prisma.SowInventoryMinOrderByAggregateInput - _sum?: Prisma.SowInventorySumOrderByAggregateInput -} - -export type SowInventoryScalarWhereWithAggregatesInput = { - AND?: Prisma.SowInventoryScalarWhereWithAggregatesInput | Prisma.SowInventoryScalarWhereWithAggregatesInput[] - OR?: Prisma.SowInventoryScalarWhereWithAggregatesInput[] - NOT?: Prisma.SowInventoryScalarWhereWithAggregatesInput | Prisma.SowInventoryScalarWhereWithAggregatesInput[] - id?: Prisma.IntWithAggregatesFilter<"SowInventory"> | number - month?: Prisma.StringWithAggregatesFilter<"SowInventory"> | string - inventory?: Prisma.IntWithAggregatesFilter<"SowInventory"> | number - createdAt?: Prisma.DateTimeWithAggregatesFilter<"SowInventory"> | Date | string - updatedAt?: Prisma.DateTimeWithAggregatesFilter<"SowInventory"> | Date | string -} - -export type SowInventoryCreateInput = { - month: string - inventory: number - createdAt?: Date | string - updatedAt?: Date | string -} - -export type SowInventoryUncheckedCreateInput = { - id?: number - month: string - inventory: number - createdAt?: Date | string - updatedAt?: Date | string -} - -export type SowInventoryUpdateInput = { - month?: Prisma.StringFieldUpdateOperationsInput | string - inventory?: Prisma.IntFieldUpdateOperationsInput | number - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string -} - -export type SowInventoryUncheckedUpdateInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - month?: Prisma.StringFieldUpdateOperationsInput | string - inventory?: Prisma.IntFieldUpdateOperationsInput | number - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string -} - -export type SowInventoryCreateManyInput = { - id?: number - month: string - inventory: number - createdAt?: Date | string - updatedAt?: Date | string -} - -export type SowInventoryUpdateManyMutationInput = { - month?: Prisma.StringFieldUpdateOperationsInput | string - inventory?: Prisma.IntFieldUpdateOperationsInput | number - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string -} - -export type SowInventoryUncheckedUpdateManyInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - month?: Prisma.StringFieldUpdateOperationsInput | string - inventory?: Prisma.IntFieldUpdateOperationsInput | number - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string -} - -export type SowInventoryOrderByRelevanceInput = { - fields: Prisma.SowInventoryOrderByRelevanceFieldEnum | Prisma.SowInventoryOrderByRelevanceFieldEnum[] - sort: Prisma.SortOrder - search: string -} - -export type SowInventoryCountOrderByAggregateInput = { - id?: Prisma.SortOrder - month?: Prisma.SortOrder - inventory?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder -} - -export type SowInventoryAvgOrderByAggregateInput = { - id?: Prisma.SortOrder - inventory?: Prisma.SortOrder -} - -export type SowInventoryMaxOrderByAggregateInput = { - id?: Prisma.SortOrder - month?: Prisma.SortOrder - inventory?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder -} - -export type SowInventoryMinOrderByAggregateInput = { - id?: Prisma.SortOrder - month?: Prisma.SortOrder - inventory?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder -} - -export type SowInventorySumOrderByAggregateInput = { - id?: Prisma.SortOrder - inventory?: Prisma.SortOrder -} - - - -export type SowInventorySelect = runtime.Types.Extensions.GetSelect<{ - id?: boolean - month?: boolean - inventory?: boolean - createdAt?: boolean - updatedAt?: boolean -}, ExtArgs["result"]["sowInventory"]> - - - -export type SowInventorySelectScalar = { - id?: boolean - month?: boolean - inventory?: boolean - createdAt?: boolean - updatedAt?: boolean -} - -export type SowInventoryOmit = runtime.Types.Extensions.GetOmit<"id" | "month" | "inventory" | "createdAt" | "updatedAt", ExtArgs["result"]["sowInventory"]> - -export type $SowInventoryPayload = { - name: "SowInventory" - objects: {} - scalars: runtime.Types.Extensions.GetPayloadResult<{ - id: number - month: string - inventory: number - createdAt: Date - updatedAt: Date - }, ExtArgs["result"]["sowInventory"]> - composites: {} -} - -export type SowInventoryGetPayload = runtime.Types.Result.GetResult - -export type SowInventoryCountArgs = - Omit & { - select?: SowInventoryCountAggregateInputType | true - } - -export interface SowInventoryDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['SowInventory'], meta: { name: 'SowInventory' } } - /** - * Find zero or one SowInventory that matches the filter. - * @param {SowInventoryFindUniqueArgs} args - Arguments to find a SowInventory - * @example - * // Get one SowInventory - * const sowInventory = await prisma.sowInventory.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__SowInventoryClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find one SowInventory that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {SowInventoryFindUniqueOrThrowArgs} args - Arguments to find a SowInventory - * @example - * // Get one SowInventory - * const sowInventory = await prisma.sowInventory.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__SowInventoryClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find the first SowInventory 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 {SowInventoryFindFirstArgs} args - Arguments to find a SowInventory - * @example - * // Get one SowInventory - * const sowInventory = await prisma.sowInventory.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__SowInventoryClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find the first SowInventory 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 {SowInventoryFindFirstOrThrowArgs} args - Arguments to find a SowInventory - * @example - * // Get one SowInventory - * const sowInventory = await prisma.sowInventory.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__SowInventoryClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find zero or more SowInventories 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 {SowInventoryFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all SowInventories - * const sowInventories = await prisma.sowInventory.findMany() - * - * // Get first 10 SowInventories - * const sowInventories = await prisma.sowInventory.findMany({ take: 10 }) - * - * // Only select the `id` - * const sowInventoryWithIdOnly = await prisma.sowInventory.findMany({ select: { id: true } }) - * - */ - findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> - - /** - * Create a SowInventory. - * @param {SowInventoryCreateArgs} args - Arguments to create a SowInventory. - * @example - * // Create one SowInventory - * const SowInventory = await prisma.sowInventory.create({ - * data: { - * // ... data to create a SowInventory - * } - * }) - * - */ - create(args: Prisma.SelectSubset>): Prisma.Prisma__SowInventoryClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Create many SowInventories. - * @param {SowInventoryCreateManyArgs} args - Arguments to create many SowInventories. - * @example - * // Create many SowInventories - * const sowInventory = await prisma.sowInventory.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Delete a SowInventory. - * @param {SowInventoryDeleteArgs} args - Arguments to delete one SowInventory. - * @example - * // Delete one SowInventory - * const SowInventory = await prisma.sowInventory.delete({ - * where: { - * // ... filter to delete one SowInventory - * } - * }) - * - */ - delete(args: Prisma.SelectSubset>): Prisma.Prisma__SowInventoryClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Update one SowInventory. - * @param {SowInventoryUpdateArgs} args - Arguments to update one SowInventory. - * @example - * // Update one SowInventory - * const sowInventory = await prisma.sowInventory.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: Prisma.SelectSubset>): Prisma.Prisma__SowInventoryClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Delete zero or more SowInventories. - * @param {SowInventoryDeleteManyArgs} args - Arguments to filter SowInventories to delete. - * @example - * // Delete a few SowInventories - * const { count } = await prisma.sowInventory.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more SowInventories. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {SowInventoryUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many SowInventories - * const sowInventory = await prisma.sowInventory.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Create or update one SowInventory. - * @param {SowInventoryUpsertArgs} args - Arguments to update or create a SowInventory. - * @example - * // Update or create a SowInventory - * const sowInventory = await prisma.sowInventory.upsert({ - * create: { - * // ... data to create a SowInventory - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the SowInventory we want to update - * } - * }) - */ - upsert(args: Prisma.SelectSubset>): Prisma.Prisma__SowInventoryClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - - /** - * Count the number of SowInventories. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {SowInventoryCountArgs} args - Arguments to filter SowInventories to count. - * @example - * // Count the number of SowInventories - * const count = await prisma.sowInventory.count({ - * where: { - * // ... the filter for the SowInventories we want to count - * } - * }) - **/ - count( - args?: Prisma.Subset, - ): Prisma.PrismaPromise< - T extends runtime.Types.Utils.Record<'select', any> - ? T['select'] extends true - ? number - : Prisma.GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a SowInventory. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {SowInventoryAggregateArgs} 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(args: Prisma.Subset): Prisma.PrismaPromise> - - /** - * Group by SowInventory. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {SowInventoryGroupByArgs} 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 SowInventoryGroupByArgs, - HasSelectOrTake extends Prisma.Or< - Prisma.Extends<'skip', Prisma.Keys>, - Prisma.Extends<'take', Prisma.Keys> - >, - OrderByArg extends Prisma.True extends HasSelectOrTake - ? { orderBy: SowInventoryGroupByArgs['orderBy'] } - : { orderBy?: SowInventoryGroupByArgs['orderBy'] }, - OrderFields extends Prisma.ExcludeUnderscoreKeys>>, - ByFields extends Prisma.MaybeTupleToUnion, - ByValid extends Prisma.Has, - HavingFields extends Prisma.GetHavingFields, - HavingValid extends Prisma.Has, - 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 - ? 'orderBy' extends Prisma.Keys - ? 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 - ? 'orderBy' extends Prisma.Keys - ? 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 & InputErrors): {} extends InputErrors ? GetSowInventoryGroupByPayload : Prisma.PrismaPromise -/** - * Fields of the SowInventory model - */ -readonly fields: SowInventoryFieldRefs; -} - -/** - * The delegate class that acts as a "Promise-like" for SowInventory. - * 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__SowInventoryClient extends Prisma.PrismaPromise { - 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(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * 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(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * 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 -} - - - - -/** - * Fields of the SowInventory model - */ -export interface SowInventoryFieldRefs { - readonly id: Prisma.FieldRef<"SowInventory", 'Int'> - readonly month: Prisma.FieldRef<"SowInventory", 'String'> - readonly inventory: Prisma.FieldRef<"SowInventory", 'Int'> - readonly createdAt: Prisma.FieldRef<"SowInventory", 'DateTime'> - readonly updatedAt: Prisma.FieldRef<"SowInventory", 'DateTime'> -} - - -// Custom InputTypes -/** - * SowInventory findUnique - */ -export type SowInventoryFindUniqueArgs = { - /** - * Select specific fields to fetch from the SowInventory - */ - select?: Prisma.SowInventorySelect | null - /** - * Omit specific fields from the SowInventory - */ - omit?: Prisma.SowInventoryOmit | null - /** - * Filter, which SowInventory to fetch. - */ - where: Prisma.SowInventoryWhereUniqueInput -} - -/** - * SowInventory findUniqueOrThrow - */ -export type SowInventoryFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the SowInventory - */ - select?: Prisma.SowInventorySelect | null - /** - * Omit specific fields from the SowInventory - */ - omit?: Prisma.SowInventoryOmit | null - /** - * Filter, which SowInventory to fetch. - */ - where: Prisma.SowInventoryWhereUniqueInput -} - -/** - * SowInventory findFirst - */ -export type SowInventoryFindFirstArgs = { - /** - * Select specific fields to fetch from the SowInventory - */ - select?: Prisma.SowInventorySelect | null - /** - * Omit specific fields from the SowInventory - */ - omit?: Prisma.SowInventoryOmit | null - /** - * Filter, which SowInventory to fetch. - */ - where?: Prisma.SowInventoryWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of SowInventories to fetch. - */ - orderBy?: Prisma.SowInventoryOrderByWithRelationInput | Prisma.SowInventoryOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for SowInventories. - */ - cursor?: Prisma.SowInventoryWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` SowInventories 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` SowInventories. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of SowInventories. - */ - distinct?: Prisma.SowInventoryScalarFieldEnum | Prisma.SowInventoryScalarFieldEnum[] -} - -/** - * SowInventory findFirstOrThrow - */ -export type SowInventoryFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the SowInventory - */ - select?: Prisma.SowInventorySelect | null - /** - * Omit specific fields from the SowInventory - */ - omit?: Prisma.SowInventoryOmit | null - /** - * Filter, which SowInventory to fetch. - */ - where?: Prisma.SowInventoryWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of SowInventories to fetch. - */ - orderBy?: Prisma.SowInventoryOrderByWithRelationInput | Prisma.SowInventoryOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for SowInventories. - */ - cursor?: Prisma.SowInventoryWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` SowInventories 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` SowInventories. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of SowInventories. - */ - distinct?: Prisma.SowInventoryScalarFieldEnum | Prisma.SowInventoryScalarFieldEnum[] -} - -/** - * SowInventory findMany - */ -export type SowInventoryFindManyArgs = { - /** - * Select specific fields to fetch from the SowInventory - */ - select?: Prisma.SowInventorySelect | null - /** - * Omit specific fields from the SowInventory - */ - omit?: Prisma.SowInventoryOmit | null - /** - * Filter, which SowInventories to fetch. - */ - where?: Prisma.SowInventoryWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of SowInventories to fetch. - */ - orderBy?: Prisma.SowInventoryOrderByWithRelationInput | Prisma.SowInventoryOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing SowInventories. - */ - cursor?: Prisma.SowInventoryWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` SowInventories 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` SowInventories. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of SowInventories. - */ - distinct?: Prisma.SowInventoryScalarFieldEnum | Prisma.SowInventoryScalarFieldEnum[] -} - -/** - * SowInventory create - */ -export type SowInventoryCreateArgs = { - /** - * Select specific fields to fetch from the SowInventory - */ - select?: Prisma.SowInventorySelect | null - /** - * Omit specific fields from the SowInventory - */ - omit?: Prisma.SowInventoryOmit | null - /** - * The data needed to create a SowInventory. - */ - data: Prisma.XOR -} - -/** - * SowInventory createMany - */ -export type SowInventoryCreateManyArgs = { - /** - * The data used to create many SowInventories. - */ - data: Prisma.SowInventoryCreateManyInput | Prisma.SowInventoryCreateManyInput[] - skipDuplicates?: boolean -} - -/** - * SowInventory update - */ -export type SowInventoryUpdateArgs = { - /** - * Select specific fields to fetch from the SowInventory - */ - select?: Prisma.SowInventorySelect | null - /** - * Omit specific fields from the SowInventory - */ - omit?: Prisma.SowInventoryOmit | null - /** - * The data needed to update a SowInventory. - */ - data: Prisma.XOR - /** - * Choose, which SowInventory to update. - */ - where: Prisma.SowInventoryWhereUniqueInput -} - -/** - * SowInventory updateMany - */ -export type SowInventoryUpdateManyArgs = { - /** - * The data used to update SowInventories. - */ - data: Prisma.XOR - /** - * Filter which SowInventories to update - */ - where?: Prisma.SowInventoryWhereInput - /** - * Limit how many SowInventories to update. - */ - limit?: number -} - -/** - * SowInventory upsert - */ -export type SowInventoryUpsertArgs = { - /** - * Select specific fields to fetch from the SowInventory - */ - select?: Prisma.SowInventorySelect | null - /** - * Omit specific fields from the SowInventory - */ - omit?: Prisma.SowInventoryOmit | null - /** - * The filter to search for the SowInventory to update in case it exists. - */ - where: Prisma.SowInventoryWhereUniqueInput - /** - * In case the SowInventory found by the `where` argument doesn't exist, create a new SowInventory with this data. - */ - create: Prisma.XOR - /** - * In case the SowInventory was found with the provided `where` argument, update it with this data. - */ - update: Prisma.XOR -} - -/** - * SowInventory delete - */ -export type SowInventoryDeleteArgs = { - /** - * Select specific fields to fetch from the SowInventory - */ - select?: Prisma.SowInventorySelect | null - /** - * Omit specific fields from the SowInventory - */ - omit?: Prisma.SowInventoryOmit | null - /** - * Filter which SowInventory to delete. - */ - where: Prisma.SowInventoryWhereUniqueInput -} - -/** - * SowInventory deleteMany - */ -export type SowInventoryDeleteManyArgs = { - /** - * Filter which SowInventories to delete - */ - where?: Prisma.SowInventoryWhereInput - /** - * Limit how many SowInventories to delete. - */ - limit?: number -} - -/** - * SowInventory without action - */ -export type SowInventoryDefaultArgs = { - /** - * Select specific fields to fetch from the SowInventory - */ - select?: Prisma.SowInventorySelect | null - /** - * Omit specific fields from the SowInventory - */ - omit?: Prisma.SowInventoryOmit | null -} diff --git a/prisma/migrations/20260417122901_add_scraper_cache/migration.sql b/prisma/migrations/20260417122901_add_scraper_cache/migration.sql new file mode 100644 index 0000000..d7210d8 --- /dev/null +++ b/prisma/migrations/20260417122901_add_scraper_cache/migration.sql @@ -0,0 +1,13 @@ +-- CreateTable +CREATE TABLE `ScraperCache` ( + `id` INTEGER NOT NULL AUTO_INCREMENT, + `scraperName` VARCHAR(191) NOT NULL, + `lastDataHash` VARCHAR(191) NULL, + `lastUpdateAt` DATETIME(3) NOT NULL, + `metadata` JSON NULL, + `createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), + `updatedAt` DATETIME(3) NOT NULL, + + UNIQUE INDEX `ScraperCache_scraperName_key`(`scraperName`), + PRIMARY KEY (`id`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 5d849d2..ca2bcfd 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -56,3 +56,13 @@ model Econ_SowInventory { createdAt DateTime @default(now()) updatedAt DateTime @updatedAt } + +model ScraperCache { + id Int @id @default(autoincrement()) + scraperName String @unique // 爬虫名称,如:sow-inventory + lastDataHash String? // 上次数据指纹 + lastUpdateAt DateTime // 上次更新时间 + metadata Json? // 其他元数据 + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt +} diff --git a/scripts/scraper/code.md b/scripts/scraper/code.md new file mode 100644 index 0000000..7507f8a --- /dev/null +++ b/scripts/scraper/code.md @@ -0,0 +1,3 @@ +git: + +dragon:D:\workbench\iboard diff --git a/scripts/scraper/sow-inventory-scraper.js b/scripts/scraper/sow-inventory-scraper.js index 6914818..cb4e61a 100644 --- a/scripts/scraper/sow-inventory-scraper.js +++ b/scripts/scraper/sow-inventory-scraper.js @@ -1,7 +1,5 @@ const axios = require('axios'); const cheerio = require('cheerio'); -const fs = require('fs'); -const path = require('path'); const { PrismaClient } = require('../../generated/prisma'); const prisma = new PrismaClient(); @@ -9,25 +7,135 @@ const prisma = new PrismaClient(); // 浙江数据开放网站URL(示例,实际需要根据真实网站修改) const ZHEJIANG_OPEN_DATA_URL = 'https://data.zj.gov.cn/'; -// 能繁母猪数量数据爬取函数 -async function scrapeSowInventory() { +// 爬虫名称,用于缓存表中的标识 +const SCRAPER_NAME = 'sow-inventory'; + +// 最小更新间隔(毫秒),默认30分钟 +const MIN_UPDATE_INTERVAL = 30 * 60 * 1000; + +// 从数据库读取缓存 +async function readCache() { try { + const cache = await prisma.scraperCache.findUnique({ + where: { scraperName: SCRAPER_NAME } + }); + return cache || { scraperName: SCRAPER_NAME, lastDataHash: null, lastUpdateAt: null }; + } catch (error) { + console.error('读取数据库缓存失败:', error.message); + return { scraperName: SCRAPER_NAME, lastDataHash: null, lastUpdateAt: null }; + } +} + +// 写入数据库缓存 +async function writeCache(lastDataHash) { + try { + await prisma.scraperCache.upsert({ + where: { scraperName: SCRAPER_NAME }, + update: { + lastDataHash, + lastUpdateAt: new Date() + }, + create: { + scraperName: SCRAPER_NAME, + lastDataHash, + lastUpdateAt: new Date() + } + }); + } catch (error) { + console.error('写入数据库缓存失败:', error.message); + } +} + +// 计算数据hash,用于检测数据是否变化 +function computeDataHash(data) { + const str = JSON.stringify(data); + let hash = 0; + for (let i = 0; i < str.length; i++) { + const char = str.charCodeAt(i); + hash = ((hash << 5) - hash) + char; + hash = hash & hash; + } + return hash.toString(); +} + +// 获取数据库中最新的月份 +async function getLatestMonth() { + try { + const latest = await prisma.econ_SowInventory.findFirst({ + orderBy: { + month: 'desc' + } + }); + return latest ? latest.month : null; + } catch (error) { + console.error('查询最新月份失败:', error.message); + return null; + } +} + +// 判断月份是否需要更新(只有比数据库中更新的月份才需要处理) +function shouldUpdateMonth(month, latestDbMonth) { + if (!latestDbMonth) return true; + return month > latestDbMonth; +} + +// 检查是否需要发起HTTP请求(基于更新间隔) +function shouldSkipRequest(cache) { + if (!cache.lastUpdateAt) return false; + + const now = new Date(); + const lastUpdate = new Date(cache.lastUpdateAt); + const interval = now - lastUpdate; + + return interval < MIN_UPDATE_INTERVAL; +} + +// 能繁母猪数量数据爬取函数(增量更新版本) +async function scrapeSowInventory(incremental = true) { + try { + console.log('='.repeat(50)); console.log('开始爬取浙江省能繁母猪数量数据...'); - + console.log(`增量更新模式: ${incremental ? '开启' : '关闭'}`); + console.log('='.repeat(50)); + + // 0. 检查是否需要发起请求 + if (incremental) { + const cache = await readCache(); + + if (shouldSkipRequest(cache)) { + const lastUpdate = cache.lastUpdateAt ? new Date(cache.lastUpdateAt) : null; + const hoursDiff = lastUpdate ? ((new Date() - lastUpdate) / (1000 * 60 * 60)).toFixed(2) : '未知'; + console.log('\n' + '='.repeat(50)); + console.log('跳过请求:距离上次更新不足30分钟'); + console.log(`上次更新时间: ${cache.lastUpdateAt}`); + console.log(`距离现在: ${hoursDiff} 小时`); + console.log('='.repeat(50)); + return; + } + + // 获取数据库中最新的月份 + const latestDbMonth = await getLatestMonth(); + if (latestDbMonth) { + console.log(`数据库中最新月份: ${latestDbMonth}`); + } else { + console.log('数据库为空,将获取所有数据'); + } + } + // 1. 发送HTTP请求获取页面内容 + console.log('\n正在请求数据源...'); const response = await axios.get(ZHEJIANG_OPEN_DATA_URL, { headers: { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36' } }); - + // 2. 解析HTML内容 const $ = cheerio.load(response.data); - + // 3. 提取数据(这里需要根据实际网站结构修改选择器) - // 示例:假设数据在表格中 - const data = []; - + const allData = []; + $('table').each((tableIndex, table) => { $(table).find('tr').each((rowIndex, row) => { if (rowIndex > 0) { // 跳过表头 @@ -35,9 +143,9 @@ async function scrapeSowInventory() { if (cells.length >= 2) { const month = $(cells[0]).text().trim(); const inventory = parseInt($(cells[1]).text().trim()); - + if (month && !isNaN(inventory)) { - data.push({ + allData.push({ month, inventory }); @@ -46,50 +154,133 @@ async function scrapeSowInventory() { } }); }); - - console.log(`爬取到 ${data.length} 条数据`); - - // 4. 存储数据到数据库 - for (const item of data) { + + console.log(`页面总数据量: ${allData.length} 条`); + + // 4. 读取数据库缓存 + const cache = await readCache(); + + // 5. 计算当前数据hash,检测数据是否变化 + const currentDataHash = computeDataHash(allData); + + // 6. 如果是增量更新且数据未变化,跳过更新 + if (incremental && cache.lastDataHash === currentDataHash) { + console.log('\n' + '='.repeat(50)); + console.log('数据未发生变化,跳过数据库更新!'); + console.log(`上次更新时间: ${cache.lastUpdateAt || '未知'}`); + console.log('='.repeat(50)); + return; + } + + // 7. 如果是增量更新,获取数据库中最新的月份用于过滤 + let latestDbMonth = null; + if (incremental) { + latestDbMonth = await getLatestMonth(); + } + + // 8. 过滤需要更新的数据 + let dataToUpdate = allData; + let skippedCount = 0; + + if (incremental && latestDbMonth) { + dataToUpdate = allData.filter(item => shouldUpdateMonth(item.month, latestDbMonth)); + skippedCount = allData.length - dataToUpdate.length; + console.log(`\n增量更新: 跳过 ${skippedCount} 条已存在的数据`); + console.log(`需要处理: ${dataToUpdate.length} 条新数据`); + } + + // 9. 如果没有需要更新的数据 + if (dataToUpdate.length === 0) { + console.log('\n没有需要更新的数据!'); + return; + } + + // 10. 按月份排序(从旧到新) + dataToUpdate.sort((a, b) => a.month.localeCompare(b.month)); + + console.log('\n开始处理数据...'); + console.log('-'.repeat(50)); + + let newCount = 0; + let updateCount = 0; + let errorCount = 0; + + // 11. 存储数据到数据库 + for (const item of dataToUpdate) { try { // 检查数据是否已存在 const existing = await prisma.econ_SowInventory.findUnique({ where: { month: item.month } }); - + if (existing) { - // 更新现有数据 - await prisma.econ_SowInventory.update({ - where: { month: item.month }, - data: { inventory: item.inventory } - }); - console.log(`更新数据: ${item.month} - ${item.inventory}`); + // 检查数据是否真的需要更新(值变化了才更新) + if (existing.inventory !== item.inventory) { + await prisma.econ_SowInventory.update({ + where: { month: item.month }, + data: { inventory: item.inventory } + }); + updateCount++; + console.log(`更新数据: ${item.month} - ${item.inventory} (原值: ${existing.inventory})`); + } else { + console.log(`数据未变化,跳过: ${item.month}`); + } } else { - // 创建新数据 await prisma.econ_SowInventory.create({ data: item }); + newCount++; console.log(`新增数据: ${item.month} - ${item.inventory}`); } } catch (error) { + errorCount++; console.error(`处理数据 ${item.month} 时出错:`, error.message); } } - + + // 12. 更新数据库缓存 + await writeCache(currentDataHash); + + // 13. 输出统计信息 + const now = new Date().toISOString(); + console.log('\n' + '='.repeat(50)); console.log('数据爬取和存储完成!'); - + console.log('统计信息:'); + console.log(` - 新增数据: ${newCount} 条`); + console.log(` - 更新数据: ${updateCount} 条`); + console.log(` - 跳过数据: ${skippedCount} 条`); + console.log(` - 错误数量: ${errorCount} 条`); + console.log(` - 本次更新时间: ${now}`); + console.log('='.repeat(50)); + } catch (error) { console.error('爬取数据时出错:', error.message); + throw error; } finally { // 关闭Prisma连接 await prisma.$disconnect(); } } +// 强制全量更新函数 +async function scrapeSowInventoryFull() { + console.log('警告: 即将执行全量更新,这将更新所有数据!'); + console.log('如果只是想获取新数据,请使用 scrapeSowInventory() 函数。\n'); + await scrapeSowInventory(false); +} + // 导出函数 -module.exports = { scrapeSowInventory }; +module.exports = { + scrapeSowInventory, + scrapeSowInventoryFull +}; // 如果直接运行此文件 if (require.main === module) { - scrapeSowInventory(); + // 默认执行增量更新 + // 如果需要强制全量更新,使用: scrapeSowInventoryFull() + scrapeSowInventory().catch(error => { + console.error('执行失败:', error); + process.exit(1); + }); }