Expanded groups scheme. Expanded addGroups mutation. Refactored addGroups mutation to update username and title of a group when used. Added an incrementGroups mutation that updates the new deletedLinks row in the scheme.
This commit is contained in:
@@ -105,10 +105,31 @@ export const resolvers = {
|
|||||||
},
|
},
|
||||||
addGroup: async (
|
addGroup: async (
|
||||||
_parent: unknown,
|
_parent: unknown,
|
||||||
data: { groupID: number; groupName: string }
|
data: { groupID: number; groupName: string; groupUsername: string }
|
||||||
// _ctx: unknown
|
// _ctx: unknown
|
||||||
) => {
|
) => {
|
||||||
const { groupID, groupName } = data;
|
const { groupID, groupName, groupUsername } = data;
|
||||||
|
|
||||||
|
const existingGroup = await prisma.groups.findFirst({
|
||||||
|
where: { telegramID: groupID }
|
||||||
|
});
|
||||||
|
|
||||||
|
if (existingGroup !== null) {
|
||||||
|
if (
|
||||||
|
existingGroup.name !== groupName ||
|
||||||
|
existingGroup.username !== groupUsername
|
||||||
|
) {
|
||||||
|
return await prisma.groups.update({
|
||||||
|
where: {
|
||||||
|
telegramID: existingGroup.telegramID
|
||||||
|
},
|
||||||
|
data: { name: groupName, username: groupUsername || "" }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return existingGroup;
|
||||||
|
}
|
||||||
|
|
||||||
return await prisma.groups.create({
|
return await prisma.groups.create({
|
||||||
data: {
|
data: {
|
||||||
telegramID: groupID,
|
telegramID: groupID,
|
||||||
@@ -116,6 +137,18 @@ export const resolvers = {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
incrementGroup: async (
|
||||||
|
_parent: unknown,
|
||||||
|
data: { groupID: number; linksDeleted: number }
|
||||||
|
// _ctx: unknown
|
||||||
|
) => {
|
||||||
|
const { groupID, linksDeleted } = data;
|
||||||
|
|
||||||
|
return await prisma.groups.update({
|
||||||
|
where: { telegramID: groupID },
|
||||||
|
data: { linksDeleted: { increment: linksDeleted } }
|
||||||
|
});
|
||||||
|
},
|
||||||
increment: async (
|
increment: async (
|
||||||
_parent: unknown,
|
_parent: unknown,
|
||||||
data: { link: boolean; command: boolean; trigger: boolean }
|
data: { link: boolean; command: boolean; trigger: boolean }
|
||||||
|
|||||||
@@ -13,13 +13,16 @@ const typeDefs = /* GraphQL */ `
|
|||||||
type Mutation {
|
type Mutation {
|
||||||
init: String!
|
init: String!
|
||||||
cronJob: TotalStats!
|
cronJob: TotalStats!
|
||||||
addGroup(groupID: Int, groupName: String): Groups!
|
addGroup(groupID: BigInt, groupName: String, groupUsername: String): Groups!
|
||||||
|
incrementGroup(groupID: BigInt, linksDeleted: Int): Groups!
|
||||||
increment(link: Boolean, command: Boolean, trigger: Boolean): DailyStats!
|
increment(link: Boolean, command: Boolean, trigger: Boolean): DailyStats!
|
||||||
}
|
}
|
||||||
|
|
||||||
type Groups {
|
type Groups {
|
||||||
telegramID: Int
|
telegramID: BigInt
|
||||||
name: String
|
name: String
|
||||||
|
username: String
|
||||||
|
linksDeleted: BigInt
|
||||||
createdAt: Date
|
createdAt: Date
|
||||||
updatedAt: Date
|
updatedAt: Date
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,15 +14,15 @@ import * as $Enums from "./enums"
|
|||||||
import type * as Prisma from "./internal/prismaNamespace"
|
import type * as Prisma from "./internal/prismaNamespace"
|
||||||
|
|
||||||
|
|
||||||
export type IntFilter<$PrismaModel = never> = {
|
export type BigIntFilter<$PrismaModel = never> = {
|
||||||
equals?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
equals?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel>
|
||||||
in?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel>
|
in?: bigint[] | number[] | Prisma.ListBigIntFieldRefInput<$PrismaModel>
|
||||||
notIn?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel>
|
notIn?: bigint[] | number[] | Prisma.ListBigIntFieldRefInput<$PrismaModel>
|
||||||
lt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
lt?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel>
|
||||||
lte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
lte?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel>
|
||||||
gt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
gt?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel>
|
||||||
gte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
gte?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel>
|
||||||
not?: Prisma.NestedIntFilter<$PrismaModel> | number
|
not?: Prisma.NestedBigIntFilter<$PrismaModel> | bigint | number
|
||||||
}
|
}
|
||||||
|
|
||||||
export type StringFilter<$PrismaModel = never> = {
|
export type StringFilter<$PrismaModel = never> = {
|
||||||
@@ -51,20 +51,20 @@ export type DateTimeFilter<$PrismaModel = never> = {
|
|||||||
not?: Prisma.NestedDateTimeFilter<$PrismaModel> | Date | string
|
not?: Prisma.NestedDateTimeFilter<$PrismaModel> | Date | string
|
||||||
}
|
}
|
||||||
|
|
||||||
export type IntWithAggregatesFilter<$PrismaModel = never> = {
|
export type BigIntWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
equals?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
equals?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel>
|
||||||
in?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel>
|
in?: bigint[] | number[] | Prisma.ListBigIntFieldRefInput<$PrismaModel>
|
||||||
notIn?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel>
|
notIn?: bigint[] | number[] | Prisma.ListBigIntFieldRefInput<$PrismaModel>
|
||||||
lt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
lt?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel>
|
||||||
lte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
lte?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel>
|
||||||
gt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
gt?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel>
|
||||||
gte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
gte?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel>
|
||||||
not?: Prisma.NestedIntWithAggregatesFilter<$PrismaModel> | number
|
not?: Prisma.NestedBigIntWithAggregatesFilter<$PrismaModel> | bigint | number
|
||||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
_avg?: Prisma.NestedFloatFilter<$PrismaModel>
|
_avg?: Prisma.NestedFloatFilter<$PrismaModel>
|
||||||
_sum?: Prisma.NestedIntFilter<$PrismaModel>
|
_sum?: Prisma.NestedBigIntFilter<$PrismaModel>
|
||||||
_min?: Prisma.NestedIntFilter<$PrismaModel>
|
_min?: Prisma.NestedBigIntFilter<$PrismaModel>
|
||||||
_max?: Prisma.NestedIntFilter<$PrismaModel>
|
_max?: Prisma.NestedBigIntFilter<$PrismaModel>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type StringWithAggregatesFilter<$PrismaModel = never> = {
|
export type StringWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
@@ -99,34 +99,7 @@ export type DateTimeWithAggregatesFilter<$PrismaModel = never> = {
|
|||||||
_max?: Prisma.NestedDateTimeFilter<$PrismaModel>
|
_max?: Prisma.NestedDateTimeFilter<$PrismaModel>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type BigIntFilter<$PrismaModel = never> = {
|
export type IntFilter<$PrismaModel = never> = {
|
||||||
equals?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel>
|
|
||||||
in?: bigint[] | number[] | Prisma.ListBigIntFieldRefInput<$PrismaModel>
|
|
||||||
notIn?: bigint[] | number[] | Prisma.ListBigIntFieldRefInput<$PrismaModel>
|
|
||||||
lt?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel>
|
|
||||||
lte?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel>
|
|
||||||
gt?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel>
|
|
||||||
gte?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedBigIntFilter<$PrismaModel> | bigint | number
|
|
||||||
}
|
|
||||||
|
|
||||||
export type BigIntWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel>
|
|
||||||
in?: bigint[] | number[] | Prisma.ListBigIntFieldRefInput<$PrismaModel>
|
|
||||||
notIn?: bigint[] | number[] | Prisma.ListBigIntFieldRefInput<$PrismaModel>
|
|
||||||
lt?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel>
|
|
||||||
lte?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel>
|
|
||||||
gt?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel>
|
|
||||||
gte?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedBigIntWithAggregatesFilter<$PrismaModel> | bigint | number
|
|
||||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
|
||||||
_avg?: Prisma.NestedFloatFilter<$PrismaModel>
|
|
||||||
_sum?: Prisma.NestedBigIntFilter<$PrismaModel>
|
|
||||||
_min?: Prisma.NestedBigIntFilter<$PrismaModel>
|
|
||||||
_max?: Prisma.NestedBigIntFilter<$PrismaModel>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedIntFilter<$PrismaModel = never> = {
|
|
||||||
equals?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
equals?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||||
in?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel>
|
in?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel>
|
||||||
notIn?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel>
|
notIn?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel>
|
||||||
@@ -137,6 +110,33 @@ export type NestedIntFilter<$PrismaModel = never> = {
|
|||||||
not?: Prisma.NestedIntFilter<$PrismaModel> | number
|
not?: Prisma.NestedIntFilter<$PrismaModel> | number
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type IntWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
|
equals?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||||
|
in?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel>
|
||||||
|
notIn?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel>
|
||||||
|
lt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||||
|
lte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||||
|
gt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||||
|
gte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||||
|
not?: Prisma.NestedIntWithAggregatesFilter<$PrismaModel> | number
|
||||||
|
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
|
_avg?: Prisma.NestedFloatFilter<$PrismaModel>
|
||||||
|
_sum?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
|
_min?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
|
_max?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type NestedBigIntFilter<$PrismaModel = never> = {
|
||||||
|
equals?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel>
|
||||||
|
in?: bigint[] | number[] | Prisma.ListBigIntFieldRefInput<$PrismaModel>
|
||||||
|
notIn?: bigint[] | number[] | Prisma.ListBigIntFieldRefInput<$PrismaModel>
|
||||||
|
lt?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel>
|
||||||
|
lte?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel>
|
||||||
|
gt?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel>
|
||||||
|
gte?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel>
|
||||||
|
not?: Prisma.NestedBigIntFilter<$PrismaModel> | bigint | number
|
||||||
|
}
|
||||||
|
|
||||||
export type NestedStringFilter<$PrismaModel = never> = {
|
export type NestedStringFilter<$PrismaModel = never> = {
|
||||||
equals?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
equals?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||||
in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel>
|
in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel>
|
||||||
@@ -162,7 +162,23 @@ export type NestedDateTimeFilter<$PrismaModel = never> = {
|
|||||||
not?: Prisma.NestedDateTimeFilter<$PrismaModel> | Date | string
|
not?: Prisma.NestedDateTimeFilter<$PrismaModel> | Date | string
|
||||||
}
|
}
|
||||||
|
|
||||||
export type NestedIntWithAggregatesFilter<$PrismaModel = never> = {
|
export type NestedBigIntWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
|
equals?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel>
|
||||||
|
in?: bigint[] | number[] | Prisma.ListBigIntFieldRefInput<$PrismaModel>
|
||||||
|
notIn?: bigint[] | number[] | Prisma.ListBigIntFieldRefInput<$PrismaModel>
|
||||||
|
lt?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel>
|
||||||
|
lte?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel>
|
||||||
|
gt?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel>
|
||||||
|
gte?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel>
|
||||||
|
not?: Prisma.NestedBigIntWithAggregatesFilter<$PrismaModel> | bigint | number
|
||||||
|
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
|
_avg?: Prisma.NestedFloatFilter<$PrismaModel>
|
||||||
|
_sum?: Prisma.NestedBigIntFilter<$PrismaModel>
|
||||||
|
_min?: Prisma.NestedBigIntFilter<$PrismaModel>
|
||||||
|
_max?: Prisma.NestedBigIntFilter<$PrismaModel>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type NestedIntFilter<$PrismaModel = never> = {
|
||||||
equals?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
equals?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||||
in?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel>
|
in?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel>
|
||||||
notIn?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel>
|
notIn?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel>
|
||||||
@@ -170,12 +186,7 @@ export type NestedIntWithAggregatesFilter<$PrismaModel = never> = {
|
|||||||
lte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
lte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||||
gt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
gt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||||
gte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
gte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||||
not?: Prisma.NestedIntWithAggregatesFilter<$PrismaModel> | number
|
not?: Prisma.NestedIntFilter<$PrismaModel> | number
|
||||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
|
||||||
_avg?: Prisma.NestedFloatFilter<$PrismaModel>
|
|
||||||
_sum?: Prisma.NestedIntFilter<$PrismaModel>
|
|
||||||
_min?: Prisma.NestedIntFilter<$PrismaModel>
|
|
||||||
_max?: Prisma.NestedIntFilter<$PrismaModel>
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type NestedFloatFilter<$PrismaModel = never> = {
|
export type NestedFloatFilter<$PrismaModel = never> = {
|
||||||
@@ -220,31 +231,20 @@ export type NestedDateTimeWithAggregatesFilter<$PrismaModel = never> = {
|
|||||||
_max?: Prisma.NestedDateTimeFilter<$PrismaModel>
|
_max?: Prisma.NestedDateTimeFilter<$PrismaModel>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type NestedBigIntFilter<$PrismaModel = never> = {
|
export type NestedIntWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
equals?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel>
|
equals?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||||
in?: bigint[] | number[] | Prisma.ListBigIntFieldRefInput<$PrismaModel>
|
in?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel>
|
||||||
notIn?: bigint[] | number[] | Prisma.ListBigIntFieldRefInput<$PrismaModel>
|
notIn?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel>
|
||||||
lt?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel>
|
lt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||||
lte?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel>
|
lte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||||
gt?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel>
|
gt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||||
gte?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel>
|
gte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||||
not?: Prisma.NestedBigIntFilter<$PrismaModel> | bigint | number
|
not?: Prisma.NestedIntWithAggregatesFilter<$PrismaModel> | number
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedBigIntWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel>
|
|
||||||
in?: bigint[] | number[] | Prisma.ListBigIntFieldRefInput<$PrismaModel>
|
|
||||||
notIn?: bigint[] | number[] | Prisma.ListBigIntFieldRefInput<$PrismaModel>
|
|
||||||
lt?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel>
|
|
||||||
lte?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel>
|
|
||||||
gt?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel>
|
|
||||||
gte?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedBigIntWithAggregatesFilter<$PrismaModel> | bigint | number
|
|
||||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
_avg?: Prisma.NestedFloatFilter<$PrismaModel>
|
_avg?: Prisma.NestedFloatFilter<$PrismaModel>
|
||||||
_sum?: Prisma.NestedBigIntFilter<$PrismaModel>
|
_sum?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
_min?: Prisma.NestedBigIntFilter<$PrismaModel>
|
_min?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
_max?: Prisma.NestedBigIntFilter<$PrismaModel>
|
_max?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -47,7 +47,6 @@ const config: runtime.GetPrismaClientConfig = {
|
|||||||
"db"
|
"db"
|
||||||
],
|
],
|
||||||
"activeProvider": "mongodb",
|
"activeProvider": "mongodb",
|
||||||
"postinstall": true,
|
|
||||||
"inlineDatasources": {
|
"inlineDatasources": {
|
||||||
"db": {
|
"db": {
|
||||||
"url": {
|
"url": {
|
||||||
@@ -56,8 +55,8 @@ const config: runtime.GetPrismaClientConfig = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"inlineSchema": "// This is your Prisma schema file,\n// learn more about it in the docs: https://pris.ly/d/prisma-schema\n\n// Looking for ways to speed up your queries, or scale easily with your serverless or edge functions?\n// Try Prisma Accelerate: https://pris.ly/cli/accelerate-init\n\ngenerator client {\n provider = \"prisma-client\"\n output = \"generated\"\n}\n\ndatasource db {\n provider = \"mongodb\"\n url = env(\"DATABASE_URL\")\n}\n\nmodel Groups {\n telegramID Int @id @map(\"_id\") @db.Int\n name String\n createdAt DateTime @default(now())\n updatedAt DateTime @default(now()) @updatedAt\n}\n\nmodel TotalStats {\n createdAt DateTime @id @default(now()) @map(\"_id\")\n updatedAt DateTime @default(now()) @updatedAt\n linksDeleted BigInt @default(0) @db.Long\n commandResponses BigInt @default(0) @db.Long\n timesTriggered BigInt @default(0) @db.Long\n}\n\nmodel DailyStats {\n createdAt DateTime @id @default(now()) @map(\"_id\")\n updatedAt DateTime @default(now()) @updatedAt\n linksDeleted Int @default(0) @db.Int\n commandResponses Int @default(0) @db.Int\n timesTriggered Int @default(0) @db.Int\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// Looking for ways to speed up your queries, or scale easily with your serverless or edge functions?\n// Try Prisma Accelerate: https://pris.ly/cli/accelerate-init\n\ngenerator client {\n provider = \"prisma-client\"\n output = \"generated\"\n}\n\ndatasource db {\n provider = \"mongodb\"\n url = env(\"DATABASE_URL\")\n}\n\nmodel Groups {\n telegramID BigInt @id @map(\"_id\") @db.Long\n name String\n username String @default(\"\")\n linksDeleted BigInt @default(0) @db.Long\n createdAt DateTime @default(now())\n updatedAt DateTime @default(now()) @updatedAt\n}\n\nmodel TotalStats {\n createdAt DateTime @id @default(now()) @map(\"_id\")\n updatedAt DateTime @default(now()) @updatedAt\n linksDeleted BigInt @default(0) @db.Long\n commandResponses BigInt @default(0) @db.Long\n timesTriggered BigInt @default(0) @db.Long\n}\n\nmodel DailyStats {\n createdAt DateTime @id @default(now()) @map(\"_id\")\n updatedAt DateTime @default(now()) @updatedAt\n linksDeleted Int @default(0) @db.Int\n commandResponses Int @default(0) @db.Int\n timesTriggered Int @default(0) @db.Int\n}\n",
|
||||||
"inlineSchemaHash": "0774d8717cbe04c1e3c6c3a2f861e5d37cdde6afa6ac939d315318e6dd21e64f",
|
"inlineSchemaHash": "7ad3413e48bf8457ce655de4b457d4b5629952ca6a037b0fe084bc063b32d97d",
|
||||||
"copyEngine": true,
|
"copyEngine": true,
|
||||||
"runtimeDataModel": {
|
"runtimeDataModel": {
|
||||||
"models": {},
|
"models": {},
|
||||||
@@ -67,7 +66,7 @@ const config: runtime.GetPrismaClientConfig = {
|
|||||||
"dirname": ""
|
"dirname": ""
|
||||||
}
|
}
|
||||||
|
|
||||||
config.runtimeDataModel = JSON.parse("{\"models\":{\"Groups\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"telegramID\",\"dbName\":\"_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"nativeType\":[\"Int\",[]],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"TotalStats\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"createdAt\",\"dbName\":\"_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"linksDeleted\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"BigInt\",\"nativeType\":[\"Long\",[]],\"default\":\"0\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"commandResponses\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"BigInt\",\"nativeType\":[\"Long\",[]],\"default\":\"0\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"timesTriggered\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"BigInt\",\"nativeType\":[\"Long\",[]],\"default\":\"0\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"DailyStats\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"createdAt\",\"dbName\":\"_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"linksDeleted\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":[\"Int\",[]],\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"commandResponses\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":[\"Int\",[]],\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"timesTriggered\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":[\"Int\",[]],\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false}},\"enums\":{},\"types\":{}}")
|
config.runtimeDataModel = JSON.parse("{\"models\":{\"Groups\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"telegramID\",\"dbName\":\"_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"BigInt\",\"nativeType\":[\"Long\",[]],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"username\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"linksDeleted\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"BigInt\",\"nativeType\":[\"Long\",[]],\"default\":\"0\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"TotalStats\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"createdAt\",\"dbName\":\"_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"linksDeleted\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"BigInt\",\"nativeType\":[\"Long\",[]],\"default\":\"0\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"commandResponses\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"BigInt\",\"nativeType\":[\"Long\",[]],\"default\":\"0\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"timesTriggered\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"BigInt\",\"nativeType\":[\"Long\",[]],\"default\":\"0\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"DailyStats\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"createdAt\",\"dbName\":\"_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"linksDeleted\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":[\"Int\",[]],\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"commandResponses\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":[\"Int\",[]],\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"timesTriggered\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":[\"Int\",[]],\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false}},\"enums\":{},\"types\":{}}")
|
||||||
config.engineWasm = undefined
|
config.engineWasm = undefined
|
||||||
config.compilerWasm = undefined
|
config.compilerWasm = undefined
|
||||||
|
|
||||||
|
|||||||
@@ -654,6 +654,8 @@ export type TypeMap<ExtArgs extends runtime.Types.Extensions.InternalArgs = runt
|
|||||||
export const GroupsScalarFieldEnum = {
|
export const GroupsScalarFieldEnum = {
|
||||||
telegramID: 'telegramID',
|
telegramID: 'telegramID',
|
||||||
name: 'name',
|
name: 'name',
|
||||||
|
username: 'username',
|
||||||
|
linksDeleted: 'linksDeleted',
|
||||||
createdAt: 'createdAt',
|
createdAt: 'createdAt',
|
||||||
updatedAt: 'updatedAt'
|
updatedAt: 'updatedAt'
|
||||||
} as const
|
} as const
|
||||||
@@ -706,16 +708,16 @@ export type QueryMode = (typeof QueryMode)[keyof typeof QueryMode]
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reference to a field of type 'Int'
|
* Reference to a field of type 'BigInt'
|
||||||
*/
|
*/
|
||||||
export type IntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int'>
|
export type BigIntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'BigInt'>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reference to a field of type 'Int[]'
|
* Reference to a field of type 'BigInt[]'
|
||||||
*/
|
*/
|
||||||
export type ListIntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int[]'>
|
export type ListBigIntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'BigInt[]'>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -748,16 +750,16 @@ export type ListDateTimeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaM
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reference to a field of type 'BigInt'
|
* Reference to a field of type 'Int'
|
||||||
*/
|
*/
|
||||||
export type BigIntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'BigInt'>
|
export type IntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int'>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reference to a field of type 'BigInt[]'
|
* Reference to a field of type 'Int[]'
|
||||||
*/
|
*/
|
||||||
export type ListBigIntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'BigInt[]'>
|
export type ListIntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int[]'>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -63,6 +63,8 @@ export type ModelName = (typeof ModelName)[keyof typeof ModelName]
|
|||||||
export const GroupsScalarFieldEnum = {
|
export const GroupsScalarFieldEnum = {
|
||||||
telegramID: 'telegramID',
|
telegramID: 'telegramID',
|
||||||
name: 'name',
|
name: 'name',
|
||||||
|
username: 'username',
|
||||||
|
linksDeleted: 'linksDeleted',
|
||||||
createdAt: 'createdAt',
|
createdAt: 'createdAt',
|
||||||
updatedAt: 'updatedAt'
|
updatedAt: 'updatedAt'
|
||||||
} as const
|
} as const
|
||||||
|
|||||||
@@ -28,22 +28,28 @@ export type AggregateGroups = {
|
|||||||
|
|
||||||
export type GroupsAvgAggregateOutputType = {
|
export type GroupsAvgAggregateOutputType = {
|
||||||
telegramID: number | null
|
telegramID: number | null
|
||||||
|
linksDeleted: number | null
|
||||||
}
|
}
|
||||||
|
|
||||||
export type GroupsSumAggregateOutputType = {
|
export type GroupsSumAggregateOutputType = {
|
||||||
telegramID: number | null
|
telegramID: bigint | null
|
||||||
|
linksDeleted: bigint | null
|
||||||
}
|
}
|
||||||
|
|
||||||
export type GroupsMinAggregateOutputType = {
|
export type GroupsMinAggregateOutputType = {
|
||||||
telegramID: number | null
|
telegramID: bigint | null
|
||||||
name: string | null
|
name: string | null
|
||||||
|
username: string | null
|
||||||
|
linksDeleted: bigint | null
|
||||||
createdAt: Date | null
|
createdAt: Date | null
|
||||||
updatedAt: Date | null
|
updatedAt: Date | null
|
||||||
}
|
}
|
||||||
|
|
||||||
export type GroupsMaxAggregateOutputType = {
|
export type GroupsMaxAggregateOutputType = {
|
||||||
telegramID: number | null
|
telegramID: bigint | null
|
||||||
name: string | null
|
name: string | null
|
||||||
|
username: string | null
|
||||||
|
linksDeleted: bigint | null
|
||||||
createdAt: Date | null
|
createdAt: Date | null
|
||||||
updatedAt: Date | null
|
updatedAt: Date | null
|
||||||
}
|
}
|
||||||
@@ -51,6 +57,8 @@ export type GroupsMaxAggregateOutputType = {
|
|||||||
export type GroupsCountAggregateOutputType = {
|
export type GroupsCountAggregateOutputType = {
|
||||||
telegramID: number
|
telegramID: number
|
||||||
name: number
|
name: number
|
||||||
|
username: number
|
||||||
|
linksDeleted: number
|
||||||
createdAt: number
|
createdAt: number
|
||||||
updatedAt: number
|
updatedAt: number
|
||||||
_all: number
|
_all: number
|
||||||
@@ -59,15 +67,19 @@ export type GroupsCountAggregateOutputType = {
|
|||||||
|
|
||||||
export type GroupsAvgAggregateInputType = {
|
export type GroupsAvgAggregateInputType = {
|
||||||
telegramID?: true
|
telegramID?: true
|
||||||
|
linksDeleted?: true
|
||||||
}
|
}
|
||||||
|
|
||||||
export type GroupsSumAggregateInputType = {
|
export type GroupsSumAggregateInputType = {
|
||||||
telegramID?: true
|
telegramID?: true
|
||||||
|
linksDeleted?: true
|
||||||
}
|
}
|
||||||
|
|
||||||
export type GroupsMinAggregateInputType = {
|
export type GroupsMinAggregateInputType = {
|
||||||
telegramID?: true
|
telegramID?: true
|
||||||
name?: true
|
name?: true
|
||||||
|
username?: true
|
||||||
|
linksDeleted?: true
|
||||||
createdAt?: true
|
createdAt?: true
|
||||||
updatedAt?: true
|
updatedAt?: true
|
||||||
}
|
}
|
||||||
@@ -75,6 +87,8 @@ export type GroupsMinAggregateInputType = {
|
|||||||
export type GroupsMaxAggregateInputType = {
|
export type GroupsMaxAggregateInputType = {
|
||||||
telegramID?: true
|
telegramID?: true
|
||||||
name?: true
|
name?: true
|
||||||
|
username?: true
|
||||||
|
linksDeleted?: true
|
||||||
createdAt?: true
|
createdAt?: true
|
||||||
updatedAt?: true
|
updatedAt?: true
|
||||||
}
|
}
|
||||||
@@ -82,6 +96,8 @@ export type GroupsMaxAggregateInputType = {
|
|||||||
export type GroupsCountAggregateInputType = {
|
export type GroupsCountAggregateInputType = {
|
||||||
telegramID?: true
|
telegramID?: true
|
||||||
name?: true
|
name?: true
|
||||||
|
username?: true
|
||||||
|
linksDeleted?: true
|
||||||
createdAt?: true
|
createdAt?: true
|
||||||
updatedAt?: true
|
updatedAt?: true
|
||||||
_all?: true
|
_all?: true
|
||||||
@@ -174,8 +190,10 @@ export type GroupsGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalA
|
|||||||
}
|
}
|
||||||
|
|
||||||
export type GroupsGroupByOutputType = {
|
export type GroupsGroupByOutputType = {
|
||||||
telegramID: number
|
telegramID: bigint
|
||||||
name: string
|
name: string
|
||||||
|
username: string
|
||||||
|
linksDeleted: bigint
|
||||||
createdAt: Date
|
createdAt: Date
|
||||||
updatedAt: Date
|
updatedAt: Date
|
||||||
_count: GroupsCountAggregateOutputType | null
|
_count: GroupsCountAggregateOutputType | null
|
||||||
@@ -204,8 +222,10 @@ export type GroupsWhereInput = {
|
|||||||
AND?: Prisma.GroupsWhereInput | Prisma.GroupsWhereInput[]
|
AND?: Prisma.GroupsWhereInput | Prisma.GroupsWhereInput[]
|
||||||
OR?: Prisma.GroupsWhereInput[]
|
OR?: Prisma.GroupsWhereInput[]
|
||||||
NOT?: Prisma.GroupsWhereInput | Prisma.GroupsWhereInput[]
|
NOT?: Prisma.GroupsWhereInput | Prisma.GroupsWhereInput[]
|
||||||
telegramID?: Prisma.IntFilter<"Groups"> | number
|
telegramID?: Prisma.BigIntFilter<"Groups"> | bigint | number
|
||||||
name?: Prisma.StringFilter<"Groups"> | string
|
name?: Prisma.StringFilter<"Groups"> | string
|
||||||
|
username?: Prisma.StringFilter<"Groups"> | string
|
||||||
|
linksDeleted?: Prisma.BigIntFilter<"Groups"> | bigint | number
|
||||||
createdAt?: Prisma.DateTimeFilter<"Groups"> | Date | string
|
createdAt?: Prisma.DateTimeFilter<"Groups"> | Date | string
|
||||||
updatedAt?: Prisma.DateTimeFilter<"Groups"> | Date | string
|
updatedAt?: Prisma.DateTimeFilter<"Groups"> | Date | string
|
||||||
}
|
}
|
||||||
@@ -213,16 +233,20 @@ export type GroupsWhereInput = {
|
|||||||
export type GroupsOrderByWithRelationInput = {
|
export type GroupsOrderByWithRelationInput = {
|
||||||
telegramID?: Prisma.SortOrder
|
telegramID?: Prisma.SortOrder
|
||||||
name?: Prisma.SortOrder
|
name?: Prisma.SortOrder
|
||||||
|
username?: Prisma.SortOrder
|
||||||
|
linksDeleted?: Prisma.SortOrder
|
||||||
createdAt?: Prisma.SortOrder
|
createdAt?: Prisma.SortOrder
|
||||||
updatedAt?: Prisma.SortOrder
|
updatedAt?: Prisma.SortOrder
|
||||||
}
|
}
|
||||||
|
|
||||||
export type GroupsWhereUniqueInput = Prisma.AtLeast<{
|
export type GroupsWhereUniqueInput = Prisma.AtLeast<{
|
||||||
telegramID?: number
|
telegramID?: bigint | number
|
||||||
AND?: Prisma.GroupsWhereInput | Prisma.GroupsWhereInput[]
|
AND?: Prisma.GroupsWhereInput | Prisma.GroupsWhereInput[]
|
||||||
OR?: Prisma.GroupsWhereInput[]
|
OR?: Prisma.GroupsWhereInput[]
|
||||||
NOT?: Prisma.GroupsWhereInput | Prisma.GroupsWhereInput[]
|
NOT?: Prisma.GroupsWhereInput | Prisma.GroupsWhereInput[]
|
||||||
name?: Prisma.StringFilter<"Groups"> | string
|
name?: Prisma.StringFilter<"Groups"> | string
|
||||||
|
username?: Prisma.StringFilter<"Groups"> | string
|
||||||
|
linksDeleted?: Prisma.BigIntFilter<"Groups"> | bigint | number
|
||||||
createdAt?: Prisma.DateTimeFilter<"Groups"> | Date | string
|
createdAt?: Prisma.DateTimeFilter<"Groups"> | Date | string
|
||||||
updatedAt?: Prisma.DateTimeFilter<"Groups"> | Date | string
|
updatedAt?: Prisma.DateTimeFilter<"Groups"> | Date | string
|
||||||
}, "telegramID">
|
}, "telegramID">
|
||||||
@@ -230,6 +254,8 @@ export type GroupsWhereUniqueInput = Prisma.AtLeast<{
|
|||||||
export type GroupsOrderByWithAggregationInput = {
|
export type GroupsOrderByWithAggregationInput = {
|
||||||
telegramID?: Prisma.SortOrder
|
telegramID?: Prisma.SortOrder
|
||||||
name?: Prisma.SortOrder
|
name?: Prisma.SortOrder
|
||||||
|
username?: Prisma.SortOrder
|
||||||
|
linksDeleted?: Prisma.SortOrder
|
||||||
createdAt?: Prisma.SortOrder
|
createdAt?: Prisma.SortOrder
|
||||||
updatedAt?: Prisma.SortOrder
|
updatedAt?: Prisma.SortOrder
|
||||||
_count?: Prisma.GroupsCountOrderByAggregateInput
|
_count?: Prisma.GroupsCountOrderByAggregateInput
|
||||||
@@ -243,53 +269,69 @@ export type GroupsScalarWhereWithAggregatesInput = {
|
|||||||
AND?: Prisma.GroupsScalarWhereWithAggregatesInput | Prisma.GroupsScalarWhereWithAggregatesInput[]
|
AND?: Prisma.GroupsScalarWhereWithAggregatesInput | Prisma.GroupsScalarWhereWithAggregatesInput[]
|
||||||
OR?: Prisma.GroupsScalarWhereWithAggregatesInput[]
|
OR?: Prisma.GroupsScalarWhereWithAggregatesInput[]
|
||||||
NOT?: Prisma.GroupsScalarWhereWithAggregatesInput | Prisma.GroupsScalarWhereWithAggregatesInput[]
|
NOT?: Prisma.GroupsScalarWhereWithAggregatesInput | Prisma.GroupsScalarWhereWithAggregatesInput[]
|
||||||
telegramID?: Prisma.IntWithAggregatesFilter<"Groups"> | number
|
telegramID?: Prisma.BigIntWithAggregatesFilter<"Groups"> | bigint | number
|
||||||
name?: Prisma.StringWithAggregatesFilter<"Groups"> | string
|
name?: Prisma.StringWithAggregatesFilter<"Groups"> | string
|
||||||
|
username?: Prisma.StringWithAggregatesFilter<"Groups"> | string
|
||||||
|
linksDeleted?: Prisma.BigIntWithAggregatesFilter<"Groups"> | bigint | number
|
||||||
createdAt?: Prisma.DateTimeWithAggregatesFilter<"Groups"> | Date | string
|
createdAt?: Prisma.DateTimeWithAggregatesFilter<"Groups"> | Date | string
|
||||||
updatedAt?: Prisma.DateTimeWithAggregatesFilter<"Groups"> | Date | string
|
updatedAt?: Prisma.DateTimeWithAggregatesFilter<"Groups"> | Date | string
|
||||||
}
|
}
|
||||||
|
|
||||||
export type GroupsCreateInput = {
|
export type GroupsCreateInput = {
|
||||||
telegramID: number
|
telegramID: bigint | number
|
||||||
name: string
|
name: string
|
||||||
|
username?: string
|
||||||
|
linksDeleted?: bigint | number
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
}
|
}
|
||||||
|
|
||||||
export type GroupsUncheckedCreateInput = {
|
export type GroupsUncheckedCreateInput = {
|
||||||
telegramID: number
|
telegramID: bigint | number
|
||||||
name: string
|
name: string
|
||||||
|
username?: string
|
||||||
|
linksDeleted?: bigint | number
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
}
|
}
|
||||||
|
|
||||||
export type GroupsUpdateInput = {
|
export type GroupsUpdateInput = {
|
||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
username?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
linksDeleted?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
}
|
}
|
||||||
|
|
||||||
export type GroupsUncheckedUpdateInput = {
|
export type GroupsUncheckedUpdateInput = {
|
||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
username?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
linksDeleted?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
}
|
}
|
||||||
|
|
||||||
export type GroupsCreateManyInput = {
|
export type GroupsCreateManyInput = {
|
||||||
telegramID: number
|
telegramID: bigint | number
|
||||||
name: string
|
name: string
|
||||||
|
username?: string
|
||||||
|
linksDeleted?: bigint | number
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
}
|
}
|
||||||
|
|
||||||
export type GroupsUpdateManyMutationInput = {
|
export type GroupsUpdateManyMutationInput = {
|
||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
username?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
linksDeleted?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
}
|
}
|
||||||
|
|
||||||
export type GroupsUncheckedUpdateManyInput = {
|
export type GroupsUncheckedUpdateManyInput = {
|
||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
username?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
linksDeleted?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
}
|
}
|
||||||
@@ -297,17 +339,22 @@ export type GroupsUncheckedUpdateManyInput = {
|
|||||||
export type GroupsCountOrderByAggregateInput = {
|
export type GroupsCountOrderByAggregateInput = {
|
||||||
telegramID?: Prisma.SortOrder
|
telegramID?: Prisma.SortOrder
|
||||||
name?: Prisma.SortOrder
|
name?: Prisma.SortOrder
|
||||||
|
username?: Prisma.SortOrder
|
||||||
|
linksDeleted?: Prisma.SortOrder
|
||||||
createdAt?: Prisma.SortOrder
|
createdAt?: Prisma.SortOrder
|
||||||
updatedAt?: Prisma.SortOrder
|
updatedAt?: Prisma.SortOrder
|
||||||
}
|
}
|
||||||
|
|
||||||
export type GroupsAvgOrderByAggregateInput = {
|
export type GroupsAvgOrderByAggregateInput = {
|
||||||
telegramID?: Prisma.SortOrder
|
telegramID?: Prisma.SortOrder
|
||||||
|
linksDeleted?: Prisma.SortOrder
|
||||||
}
|
}
|
||||||
|
|
||||||
export type GroupsMaxOrderByAggregateInput = {
|
export type GroupsMaxOrderByAggregateInput = {
|
||||||
telegramID?: Prisma.SortOrder
|
telegramID?: Prisma.SortOrder
|
||||||
name?: Prisma.SortOrder
|
name?: Prisma.SortOrder
|
||||||
|
username?: Prisma.SortOrder
|
||||||
|
linksDeleted?: Prisma.SortOrder
|
||||||
createdAt?: Prisma.SortOrder
|
createdAt?: Prisma.SortOrder
|
||||||
updatedAt?: Prisma.SortOrder
|
updatedAt?: Prisma.SortOrder
|
||||||
}
|
}
|
||||||
@@ -315,18 +362,29 @@ export type GroupsMaxOrderByAggregateInput = {
|
|||||||
export type GroupsMinOrderByAggregateInput = {
|
export type GroupsMinOrderByAggregateInput = {
|
||||||
telegramID?: Prisma.SortOrder
|
telegramID?: Prisma.SortOrder
|
||||||
name?: Prisma.SortOrder
|
name?: Prisma.SortOrder
|
||||||
|
username?: Prisma.SortOrder
|
||||||
|
linksDeleted?: Prisma.SortOrder
|
||||||
createdAt?: Prisma.SortOrder
|
createdAt?: Prisma.SortOrder
|
||||||
updatedAt?: Prisma.SortOrder
|
updatedAt?: Prisma.SortOrder
|
||||||
}
|
}
|
||||||
|
|
||||||
export type GroupsSumOrderByAggregateInput = {
|
export type GroupsSumOrderByAggregateInput = {
|
||||||
telegramID?: Prisma.SortOrder
|
telegramID?: Prisma.SortOrder
|
||||||
|
linksDeleted?: Prisma.SortOrder
|
||||||
}
|
}
|
||||||
|
|
||||||
export type StringFieldUpdateOperationsInput = {
|
export type StringFieldUpdateOperationsInput = {
|
||||||
set?: string
|
set?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type BigIntFieldUpdateOperationsInput = {
|
||||||
|
set?: bigint | number
|
||||||
|
increment?: bigint | number
|
||||||
|
decrement?: bigint | number
|
||||||
|
multiply?: bigint | number
|
||||||
|
divide?: bigint | number
|
||||||
|
}
|
||||||
|
|
||||||
export type DateTimeFieldUpdateOperationsInput = {
|
export type DateTimeFieldUpdateOperationsInput = {
|
||||||
set?: Date | string
|
set?: Date | string
|
||||||
}
|
}
|
||||||
@@ -336,6 +394,8 @@ export type DateTimeFieldUpdateOperationsInput = {
|
|||||||
export type GroupsSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
export type GroupsSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
||||||
telegramID?: boolean
|
telegramID?: boolean
|
||||||
name?: boolean
|
name?: boolean
|
||||||
|
username?: boolean
|
||||||
|
linksDeleted?: boolean
|
||||||
createdAt?: boolean
|
createdAt?: boolean
|
||||||
updatedAt?: boolean
|
updatedAt?: boolean
|
||||||
}, ExtArgs["result"]["groups"]>
|
}, ExtArgs["result"]["groups"]>
|
||||||
@@ -345,18 +405,22 @@ export type GroupsSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs =
|
|||||||
export type GroupsSelectScalar = {
|
export type GroupsSelectScalar = {
|
||||||
telegramID?: boolean
|
telegramID?: boolean
|
||||||
name?: boolean
|
name?: boolean
|
||||||
|
username?: boolean
|
||||||
|
linksDeleted?: boolean
|
||||||
createdAt?: boolean
|
createdAt?: boolean
|
||||||
updatedAt?: boolean
|
updatedAt?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export type GroupsOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"telegramID" | "name" | "createdAt" | "updatedAt", ExtArgs["result"]["groups"]>
|
export type GroupsOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"telegramID" | "name" | "username" | "linksDeleted" | "createdAt" | "updatedAt", ExtArgs["result"]["groups"]>
|
||||||
|
|
||||||
export type $GroupsPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
export type $GroupsPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||||
name: "Groups"
|
name: "Groups"
|
||||||
objects: {}
|
objects: {}
|
||||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||||
telegramID: number
|
telegramID: bigint
|
||||||
name: string
|
name: string
|
||||||
|
username: string
|
||||||
|
linksDeleted: bigint
|
||||||
createdAt: Date
|
createdAt: Date
|
||||||
updatedAt: Date
|
updatedAt: Date
|
||||||
}, ExtArgs["result"]["groups"]>
|
}, ExtArgs["result"]["groups"]>
|
||||||
@@ -751,8 +815,10 @@ export interface Prisma__GroupsClient<T, Null = never, ExtArgs extends runtime.T
|
|||||||
* Fields of the Groups model
|
* Fields of the Groups model
|
||||||
*/
|
*/
|
||||||
export interface GroupsFieldRefs {
|
export interface GroupsFieldRefs {
|
||||||
readonly telegramID: Prisma.FieldRef<"Groups", 'Int'>
|
readonly telegramID: Prisma.FieldRef<"Groups", 'BigInt'>
|
||||||
readonly name: Prisma.FieldRef<"Groups", 'String'>
|
readonly name: Prisma.FieldRef<"Groups", 'String'>
|
||||||
|
readonly username: Prisma.FieldRef<"Groups", 'String'>
|
||||||
|
readonly linksDeleted: Prisma.FieldRef<"Groups", 'BigInt'>
|
||||||
readonly createdAt: Prisma.FieldRef<"Groups", 'DateTime'>
|
readonly createdAt: Prisma.FieldRef<"Groups", 'DateTime'>
|
||||||
readonly updatedAt: Prisma.FieldRef<"Groups", 'DateTime'>
|
readonly updatedAt: Prisma.FieldRef<"Groups", 'DateTime'>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -357,14 +357,6 @@ export type TotalStatsSumOrderByAggregateInput = {
|
|||||||
timesTriggered?: Prisma.SortOrder
|
timesTriggered?: Prisma.SortOrder
|
||||||
}
|
}
|
||||||
|
|
||||||
export type BigIntFieldUpdateOperationsInput = {
|
|
||||||
set?: bigint | number
|
|
||||||
increment?: bigint | number
|
|
||||||
decrement?: bigint | number
|
|
||||||
multiply?: bigint | number
|
|
||||||
divide?: bigint | number
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export type TotalStatsSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
export type TotalStatsSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
||||||
|
|||||||
@@ -15,10 +15,12 @@ datasource db {
|
|||||||
}
|
}
|
||||||
|
|
||||||
model Groups {
|
model Groups {
|
||||||
telegramID Int @id @map("_id") @db.Int
|
telegramID BigInt @id @map("_id") @db.Long
|
||||||
name String
|
name String
|
||||||
createdAt DateTime @default(now())
|
username String @default("")
|
||||||
updatedAt DateTime @default(now()) @updatedAt
|
linksDeleted BigInt @default(0) @db.Long
|
||||||
|
createdAt DateTime @default(now())
|
||||||
|
updatedAt DateTime @default(now()) @updatedAt
|
||||||
}
|
}
|
||||||
|
|
||||||
model TotalStats {
|
model TotalStats {
|
||||||
|
|||||||
Reference in New Issue
Block a user