Added mutations and queries for DaiailyStats and TotalStats. Updated Schema. Added scalar package.

This commit is contained in:
2025-11-11 20:17:14 -05:00
parent ff334a7f0d
commit 834900f9bb
25 changed files with 2483 additions and 4532 deletions
+24 -4
View File
@@ -1,10 +1,21 @@
import { defineConfig, globalIgnores } from "eslint/config"; import { defineConfig, globalIgnores } from "eslint/config";
import nextVitals from "eslint-config-next/core-web-vitals"; import nextVitals from "eslint-config-next/core-web-vitals";
import nextTs from "eslint-config-next/typescript"; import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended";
import reactPlugin from "eslint-plugin-react";
import eslint from "@eslint/js";
// import tseslint from "typescript-eslint";
import jsxA11y from "eslint-plugin-jsx-a11y";
import reactHooks from "eslint-plugin-react-hooks";
const eslintConfig = defineConfig([ const eslintConfig = defineConfig([
...nextVitals, ...nextVitals,
...nextTs, eslintPluginPrettierRecommended,
reactPlugin.configs.flat.recommended,
reactPlugin.configs.flat["jsx-runtime"],
eslint.configs.recommended,
// tseslint.configs.recommended,
// tseslint.configs.stylistic,
reactHooks.configs.flat.recommended,
// Override default ignores of eslint-config-next. // Override default ignores of eslint-config-next.
globalIgnores([ globalIgnores([
// Default ignores of eslint-config-next: // Default ignores of eslint-config-next:
@@ -12,8 +23,17 @@ const eslintConfig = defineConfig([
"out/**", "out/**",
"build/**", "build/**",
"next-env.d.ts", "next-env.d.ts",
"src/primsa/**/*" "types/**",
]) "src/prisma/generated"
]),
{
rules: {
"@typescript-eslint/no-empty-object-type": "off"
},
plugins: {
jsxA11y: jsxA11y.configs.strict
}
}
]); ]);
export default eslintConfig; export default eslintConfig;
+23 -13
View File
@@ -6,21 +6,21 @@
"dev": "next dev", "dev": "next dev",
"build": "next build", "build": "next build",
"start": "next start", "start": "next start",
"lint": "eslint", "lint": "eslint .",
"pretty": "prettier --write .", "pretty": "prettier --write .",
"prsima": "yarn prisma generate", "prsima": "yarn prisma generate",
"update-db": "yarn prisma db push", "update-db": "yarn prisma db push"
"codegen": "graphql-codegen"
}, },
"dependencies": { "dependencies": {
"@chakra-ui/react": "^3.28.0", "@chakra-ui/react": "^3.29.0",
"@emotion/react": "^11.14.0", "@emotion/react": "^11.14.0",
"@prisma/client": "^6.18.0", "@prisma/client": "^6.19.0",
"@prisma/extension-accelerate": "^2.0.2", "@prisma/extension-accelerate": "^2.0.2",
"@urql/next": "^2.0.0", "@urql/next": "^2.0.0",
"dotenv": "^17.2.3", "dotenv": "^17.2.3",
"graphql": "^16.11.0", "graphql": "^16.12.0",
"graphql-yoga": "^5.16.0", "graphql-scalars": "^1.25.0",
"graphql-yoga": "^5.16.2",
"next": "16.0.1", "next": "16.0.1",
"next-themes": "^0.4.6", "next-themes": "^0.4.6",
"react": "19.2.0", "react": "19.2.0",
@@ -30,16 +30,26 @@
"urql": "^5.0.1" "urql": "^5.0.1"
}, },
"devDependencies": { "devDependencies": {
"@eslint/eslintrc": "^3.3.1",
"@eslint/js": "^9.39.1",
"@iconify/react": "^6.0.2", "@iconify/react": "^6.0.2",
"@types/node": "^24.9.2", "@types/node": "^24.10.1",
"@types/react": "^19.2.2", "@types/react": "^19.2.3",
"@types/react-dom": "^19.2.2", "@types/react-dom": "^19.2.2",
"eslint": "^9.38.0", "@typescript-eslint/eslint-plugin": "^8.46.4",
"@typescript-eslint/parser": "^8.46.4",
"eslint": "^9.39.1",
"eslint-config-next": "16.0.1", "eslint-config-next": "16.0.1",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-prettier": "^5.5.4",
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-hooks": "^7.0.1",
"prettier": "3.6.2", "prettier": "3.6.2",
"prisma": "^6.18.0", "prisma": "^6.19.0",
"tsx": "^4.20.6", "tsx": "^4.20.6",
"typescript": "^5.9.3" "typescript": "^5.9.3",
"typescript-eslint": "^8.46.4"
}, },
"packageManager": "yarn@4.10.3" "packageManager": "yarn@4.11.0"
} }
+10 -5
View File
@@ -1,23 +1,28 @@
"use client"; "use client";
import { Provider } from "@/components/ui/provider"; import { Provider } from "@/components/ui/provider";
import { UrqlProvider, ssrExchange, cacheExchange, fetchExchange, createClient } from '@urql/next'; import {
import { useMemo } from "react"; UrqlProvider,
ssrExchange,
cacheExchange,
fetchExchange,
createClient
} from "@urql/next";
import React, { useMemo } from "react";
export default function RootLayout({ export default function RootLayout({
children children
}: Readonly<{ }: Readonly<{
children: React.ReactNode; children: React.ReactNode;
}>) { }>) {
const [client, ssr] = useMemo(() => { const [client, ssr] = useMemo(() => {
const ssr = ssrExchange({ const ssr = ssrExchange({
isClient: typeof window !== 'undefined', isClient: typeof window !== "undefined"
}); });
const client = createClient({ const client = createClient({
url: process.env.NEXT_PUBLIC_GRAPHQL_URL || "", url: process.env.NEXT_PUBLIC_GRAPHQL_URL || "",
exchanges: [cacheExchange, ssr, fetchExchange], exchanges: [cacheExchange, ssr, fetchExchange],
suspense: true, suspense: true
}); });
return [client, ssr]; return [client, ssr];
-1
View File
@@ -6,7 +6,6 @@ import { Icon } from "@iconify/react";
import { useQuery } from "@urql/next"; import { useQuery } from "@urql/next";
import { Fragment } from "react/jsx-runtime"; import { Fragment } from "react/jsx-runtime";
export default function Home() { export default function Home() {
const [{ fetching, data, error }] = useQuery({ query: GetTotalGroupsQuery }); const [{ fetching, data, error }] = useQuery({ query: GetTotalGroupsQuery });
+1
View File
@@ -1,3 +1,4 @@
/* eslint-disable no-unused-vars */
"use client"; "use client";
import type { IconButtonProps, SpanProps } from "@chakra-ui/react"; import type { IconButtonProps, SpanProps } from "@chakra-ui/react";
+123 -2
View File
@@ -1,23 +1,144 @@
import prisma from "@/lib/prismaClient"; import prisma from "@/lib/prismaClient";
import { BigIntResolver } from "graphql-scalars";
// Prisma // Prisma
export const resolvers = { export const resolvers = {
// scalars
BigInt: BigIntResolver,
Query: { Query: {
getTotalGroups: () => prisma.group.count() getTotalGroups: async () => await prisma.groups.count(),
getTodayStats: async () =>
await prisma.dailyStats.findFirst({
orderBy: {
createdAt: "desc"
}
}),
getStatsRange: async (
_parent: unknown,
data: { startDate: Date; endDate: Date }
// _ctx: unknown
) => {
const { startDate, endDate } = data;
return await prisma.dailyStats.findMany({
where: {
createdAt: {
gt: startDate,
lte: endDate
}
},
orderBy: {
createdAt: "asc"
}
});
},
getTotalStats: async () =>
await prisma.totalStats.findFirst({
orderBy: {
createdAt: "asc"
}
})
}, },
Mutation: { Mutation: {
init: async () =>
// _parent: unknown,
// data: { newWeek: boolean; newMonth: boolean }
// _ctx: unknown
{
const date = new Date().toISOString();
let count = 0;
if ((await prisma.dailyStats.count()) === 0) {
await prisma.dailyStats.create({ data: { createdAt: date } });
count++;
}
if ((await prisma.totalStats.count()) === 0) {
await prisma.totalStats.create({ data: { createdAt: date } });
count++;
}
return `${count} tables have been initialized with data.`;
},
cronJob: async () =>
// _parent: unknown,
// data: { newWeek: boolean; newMonth: boolean }
// _ctx: unknown
{
const date = new Date().toISOString();
await prisma.dailyStats.create({ data: { createdAt: date } });
const allStats = await prisma.dailyStats.findMany({});
const calculatedStats = allStats.reduce(
(acc, curr) => {
const links = (acc.linksDeleted += curr.linksDeleted);
const commands = (acc.commandResponses += curr.commandResponses);
const triggers = (acc.timesTriggered += curr.timesTriggered);
return {
linksDeleted: links,
commandResponses: commands,
timesTriggered: triggers
};
},
{
linksDeleted: 0,
commandResponses: 0,
timesTriggered: 0
}
);
const totalStats = await prisma.totalStats.findFirst({
orderBy: {
createdAt: "desc"
}
});
return await prisma.totalStats.update({
where: {
createdAt: totalStats?.createdAt
},
data: {
...calculatedStats
}
});
},
addGroup: async ( addGroup: async (
_parent: unknown, _parent: unknown,
data: { groupID: number; groupName: string } data: { groupID: number; groupName: string }
// _ctx: unknown // _ctx: unknown
) => { ) => {
const { groupID, groupName } = data; const { groupID, groupName } = data;
return await prisma.group.create({ return await prisma.groups.create({
data: { data: {
telegramID: groupID, telegramID: groupID,
name: groupName name: groupName
} }
}); });
},
increment: async (
_parent: unknown,
data: { link: boolean; command: boolean; trigger: boolean }
// _ctx: unknown
) => {
const { link, command, trigger } = data;
return await prisma.dailyStats
.findFirst({
orderBy: {
createdAt: "desc"
}
})
.then(async (todayStat) => {
return await prisma.dailyStats.update({
where: { createdAt: todayStat?.createdAt },
data: {
linksDeleted: { increment: link ? 1 : 0 },
commandResponses: { increment: command ? 1 : 0 },
timesTriggered: { increment: trigger ? 1 : 0 }
}
});
});
} }
} }
}; };
+28 -3
View File
@@ -1,16 +1,41 @@
import { BigIntTypeDefinition } from "graphql-scalars";
const typeDefs = /* GraphQL */ ` const typeDefs = /* GraphQL */ `
${BigIntTypeDefinition}
scalar Date
type Query { type Query {
getTotalGroups: Int! getTotalGroups: Int!
getTodayStats: DailyStats!
getStatsRange(startDate: Date, endDate: Date): [DailyStats]
getTotalStats: TotalStats!
} }
type Mutation { type Mutation {
addGroup(groupID: Int, groupName: String): Group! init: String!
cronJob: TotalStats!
addGroup(groupID: Int, groupName: String): Groups!
increment(link: Boolean, command: Boolean, trigger: Boolean): DailyStats!
} }
type Group {
type Groups {
telegramID: Int telegramID: Int
name: String name: String
createdAt: Date createdAt: Date
updatedAt: Date updatedAt: Date
} }
scalar Date type TotalStats {
createdAt: String
updatedAt: Date
linksDeleted: BigInt
commandResponses: BigInt
timesTriggered: BigInt
}
type DailyStats {
createdAt: String
updatedAt: Date
linksDeleted: Int
commandResponses: Int
timesTriggered: Int
}
`; `;
export default typeDefs; export default typeDefs;
+3 -12
View File
@@ -1,6 +1,7 @@
/* !!! This is code generated by Prisma. Do not edit directly. !!! */ /* !!! This is code generated by Prisma. Do not edit directly. !!! */
/* eslint-disable */ /* eslint-disable */
// biome-ignore-all lint: generated file
// @ts-nocheck // @ts-nocheck
/* /*
* This file should be your main import to use Prisma-related types and utilities in a browser. * This file should be your main import to use Prisma-related types and utilities in a browser.
@@ -17,10 +18,10 @@ export { Prisma }
export * as $Enums from './enums' export * as $Enums from './enums'
export * from './enums'; export * from './enums';
/** /**
* Model Group * Model Groups
* *
*/ */
export type Group = Prisma.GroupModel export type Groups = Prisma.GroupsModel
/** /**
* Model TotalStats * Model TotalStats
* *
@@ -31,13 +32,3 @@ export type TotalStats = Prisma.TotalStatsModel
* *
*/ */
export type DailyStats = Prisma.DailyStatsModel export type DailyStats = Prisma.DailyStatsModel
/**
* Model WeeklyStats
*
*/
export type WeeklyStats = Prisma.WeeklyStatsModel
/**
* Model MonthlyStats
*
*/
export type MonthlyStats = Prisma.MonthlyStatsModel
+4 -13
View File
@@ -1,6 +1,7 @@
/* !!! This is code generated by Prisma. Do not edit directly. !!! */ /* !!! This is code generated by Prisma. Do not edit directly. !!! */
/* eslint-disable */ /* eslint-disable */
// biome-ignore-all lint: generated file
// @ts-nocheck // @ts-nocheck
/* /*
* This file should be your main import to use Prisma. Through it you get access to all the models, enums, and input types. * This file should be your main import to use Prisma. Through it you get access to all the models, enums, and input types.
@@ -29,7 +30,7 @@ export * from "./enums"
* ``` * ```
* const prisma = new PrismaClient() * const prisma = new PrismaClient()
* // Fetch zero or more Groups * // Fetch zero or more Groups
* const groups = await prisma.group.findMany() * const groups = await prisma.groups.findMany()
* ``` * ```
* *
* Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client). * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client).
@@ -44,10 +45,10 @@ path.join(__dirname, "libquery_engine-debian-openssl-3.0.x.so.node")
path.join(process.cwd(), "src/prisma/generated/libquery_engine-debian-openssl-3.0.x.so.node") path.join(process.cwd(), "src/prisma/generated/libquery_engine-debian-openssl-3.0.x.so.node")
/** /**
* Model Group * Model Groups
* *
*/ */
export type Group = Prisma.GroupModel export type Groups = Prisma.GroupsModel
/** /**
* Model TotalStats * Model TotalStats
* *
@@ -58,13 +59,3 @@ export type TotalStats = Prisma.TotalStatsModel
* *
*/ */
export type DailyStats = Prisma.DailyStatsModel export type DailyStats = Prisma.DailyStatsModel
/**
* Model WeeklyStats
*
*/
export type WeeklyStats = Prisma.WeeklyStatsModel
/**
* Model MonthlyStats
*
*/
export type MonthlyStats = Prisma.MonthlyStatsModel
+1
View File
@@ -1,6 +1,7 @@
/* !!! This is code generated by Prisma. Do not edit directly. !!! */ /* !!! This is code generated by Prisma. Do not edit directly. !!! */
/* eslint-disable */ /* eslint-disable */
// biome-ignore-all lint: generated file
// @ts-nocheck // @ts-nocheck
/* /*
* This file exports various common sort, input & filter types that are not directly linked to a particular model. * This file exports various common sort, input & filter types that are not directly linked to a particular model.
+1
View File
@@ -1,6 +1,7 @@
/* !!! This is code generated by Prisma. Do not edit directly. !!! */ /* !!! This is code generated by Prisma. Do not edit directly. !!! */
/* eslint-disable */ /* eslint-disable */
// biome-ignore-all lint: generated file
// @ts-nocheck // @ts-nocheck
/* /*
* This file exports all enum related types from the schema. * This file exports all enum related types from the schema.
File diff suppressed because one or more lines are too long
+43 -216
View File
@@ -1,6 +1,7 @@
/* !!! This is code generated by Prisma. Do not edit directly. !!! */ /* !!! This is code generated by Prisma. Do not edit directly. !!! */
/* eslint-disable */ /* eslint-disable */
// biome-ignore-all lint: generated file
// @ts-nocheck // @ts-nocheck
/* /*
* WARNING: This is an internal file that is subject to change! * WARNING: This is an internal file that is subject to change!
@@ -87,12 +88,12 @@ export type PrismaVersion = {
} }
/** /**
* Prisma Client JS version: 6.18.0 * Prisma Client JS version: 6.19.0
* Query Engine version: 34b5a692b7bd79939a9a2c3ef97d816e749cda2f * Query Engine version: 2ba551f319ab1df4bc874a89965d8b3641056773
*/ */
export const prismaVersion: PrismaVersion = { export const prismaVersion: PrismaVersion = {
client: "6.18.0", client: "6.19.0",
engine: "34b5a692b7bd79939a9a2c3ef97d816e749cda2f" engine: "2ba551f319ab1df4bc874a89965d8b3641056773"
} }
/** /**
@@ -389,11 +390,9 @@ type FieldRefInputType<Model, FieldType> = Model extends never ? never : FieldRe
export const ModelName = { export const ModelName = {
Group: 'Group', Groups: 'Groups',
TotalStats: 'TotalStats', TotalStats: 'TotalStats',
DailyStats: 'DailyStats', DailyStats: 'DailyStats'
WeeklyStats: 'WeeklyStats',
MonthlyStats: 'MonthlyStats'
} as const } as const
export type ModelName = (typeof ModelName)[keyof typeof ModelName] export type ModelName = (typeof ModelName)[keyof typeof ModelName]
@@ -409,81 +408,81 @@ export type TypeMap<ExtArgs extends runtime.Types.Extensions.InternalArgs = runt
omit: GlobalOmitOptions omit: GlobalOmitOptions
} }
meta: { meta: {
modelProps: "group" | "totalStats" | "dailyStats" | "weeklyStats" | "monthlyStats" modelProps: "groups" | "totalStats" | "dailyStats"
txIsolationLevel: never txIsolationLevel: never
} }
model: { model: {
Group: { Groups: {
payload: Prisma.$GroupPayload<ExtArgs> payload: Prisma.$GroupsPayload<ExtArgs>
fields: Prisma.GroupFieldRefs fields: Prisma.GroupsFieldRefs
operations: { operations: {
findUnique: { findUnique: {
args: Prisma.GroupFindUniqueArgs<ExtArgs> args: Prisma.GroupsFindUniqueArgs<ExtArgs>
result: runtime.Types.Utils.PayloadToResult<Prisma.$GroupPayload> | null result: runtime.Types.Utils.PayloadToResult<Prisma.$GroupsPayload> | null
} }
findUniqueOrThrow: { findUniqueOrThrow: {
args: Prisma.GroupFindUniqueOrThrowArgs<ExtArgs> args: Prisma.GroupsFindUniqueOrThrowArgs<ExtArgs>
result: runtime.Types.Utils.PayloadToResult<Prisma.$GroupPayload> result: runtime.Types.Utils.PayloadToResult<Prisma.$GroupsPayload>
} }
findFirst: { findFirst: {
args: Prisma.GroupFindFirstArgs<ExtArgs> args: Prisma.GroupsFindFirstArgs<ExtArgs>
result: runtime.Types.Utils.PayloadToResult<Prisma.$GroupPayload> | null result: runtime.Types.Utils.PayloadToResult<Prisma.$GroupsPayload> | null
} }
findFirstOrThrow: { findFirstOrThrow: {
args: Prisma.GroupFindFirstOrThrowArgs<ExtArgs> args: Prisma.GroupsFindFirstOrThrowArgs<ExtArgs>
result: runtime.Types.Utils.PayloadToResult<Prisma.$GroupPayload> result: runtime.Types.Utils.PayloadToResult<Prisma.$GroupsPayload>
} }
findMany: { findMany: {
args: Prisma.GroupFindManyArgs<ExtArgs> args: Prisma.GroupsFindManyArgs<ExtArgs>
result: runtime.Types.Utils.PayloadToResult<Prisma.$GroupPayload>[] result: runtime.Types.Utils.PayloadToResult<Prisma.$GroupsPayload>[]
} }
create: { create: {
args: Prisma.GroupCreateArgs<ExtArgs> args: Prisma.GroupsCreateArgs<ExtArgs>
result: runtime.Types.Utils.PayloadToResult<Prisma.$GroupPayload> result: runtime.Types.Utils.PayloadToResult<Prisma.$GroupsPayload>
} }
createMany: { createMany: {
args: Prisma.GroupCreateManyArgs<ExtArgs> args: Prisma.GroupsCreateManyArgs<ExtArgs>
result: BatchPayload result: BatchPayload
} }
delete: { delete: {
args: Prisma.GroupDeleteArgs<ExtArgs> args: Prisma.GroupsDeleteArgs<ExtArgs>
result: runtime.Types.Utils.PayloadToResult<Prisma.$GroupPayload> result: runtime.Types.Utils.PayloadToResult<Prisma.$GroupsPayload>
} }
update: { update: {
args: Prisma.GroupUpdateArgs<ExtArgs> args: Prisma.GroupsUpdateArgs<ExtArgs>
result: runtime.Types.Utils.PayloadToResult<Prisma.$GroupPayload> result: runtime.Types.Utils.PayloadToResult<Prisma.$GroupsPayload>
} }
deleteMany: { deleteMany: {
args: Prisma.GroupDeleteManyArgs<ExtArgs> args: Prisma.GroupsDeleteManyArgs<ExtArgs>
result: BatchPayload result: BatchPayload
} }
updateMany: { updateMany: {
args: Prisma.GroupUpdateManyArgs<ExtArgs> args: Prisma.GroupsUpdateManyArgs<ExtArgs>
result: BatchPayload result: BatchPayload
} }
upsert: { upsert: {
args: Prisma.GroupUpsertArgs<ExtArgs> args: Prisma.GroupsUpsertArgs<ExtArgs>
result: runtime.Types.Utils.PayloadToResult<Prisma.$GroupPayload> result: runtime.Types.Utils.PayloadToResult<Prisma.$GroupsPayload>
} }
aggregate: { aggregate: {
args: Prisma.GroupAggregateArgs<ExtArgs> args: Prisma.GroupsAggregateArgs<ExtArgs>
result: runtime.Types.Utils.Optional<Prisma.AggregateGroup> result: runtime.Types.Utils.Optional<Prisma.AggregateGroups>
} }
groupBy: { groupBy: {
args: Prisma.GroupGroupByArgs<ExtArgs> args: Prisma.GroupsGroupByArgs<ExtArgs>
result: runtime.Types.Utils.Optional<Prisma.GroupGroupByOutputType>[] result: runtime.Types.Utils.Optional<Prisma.GroupsGroupByOutputType>[]
} }
findRaw: { findRaw: {
args: Prisma.GroupFindRawArgs<ExtArgs> args: Prisma.GroupsFindRawArgs<ExtArgs>
result: Prisma.JsonObject result: Prisma.JsonObject
} }
aggregateRaw: { aggregateRaw: {
args: Prisma.GroupAggregateRawArgs<ExtArgs> args: Prisma.GroupsAggregateRawArgs<ExtArgs>
result: Prisma.JsonObject result: Prisma.JsonObject
} }
count: { count: {
args: Prisma.GroupCountArgs<ExtArgs> args: Prisma.GroupsCountArgs<ExtArgs>
result: runtime.Types.Utils.Optional<Prisma.GroupCountAggregateOutputType> | number result: runtime.Types.Utils.Optional<Prisma.GroupsCountAggregateOutputType> | number
} }
} }
} }
@@ -635,154 +634,6 @@ export type TypeMap<ExtArgs extends runtime.Types.Extensions.InternalArgs = runt
} }
} }
} }
WeeklyStats: {
payload: Prisma.$WeeklyStatsPayload<ExtArgs>
fields: Prisma.WeeklyStatsFieldRefs
operations: {
findUnique: {
args: Prisma.WeeklyStatsFindUniqueArgs<ExtArgs>
result: runtime.Types.Utils.PayloadToResult<Prisma.$WeeklyStatsPayload> | null
}
findUniqueOrThrow: {
args: Prisma.WeeklyStatsFindUniqueOrThrowArgs<ExtArgs>
result: runtime.Types.Utils.PayloadToResult<Prisma.$WeeklyStatsPayload>
}
findFirst: {
args: Prisma.WeeklyStatsFindFirstArgs<ExtArgs>
result: runtime.Types.Utils.PayloadToResult<Prisma.$WeeklyStatsPayload> | null
}
findFirstOrThrow: {
args: Prisma.WeeklyStatsFindFirstOrThrowArgs<ExtArgs>
result: runtime.Types.Utils.PayloadToResult<Prisma.$WeeklyStatsPayload>
}
findMany: {
args: Prisma.WeeklyStatsFindManyArgs<ExtArgs>
result: runtime.Types.Utils.PayloadToResult<Prisma.$WeeklyStatsPayload>[]
}
create: {
args: Prisma.WeeklyStatsCreateArgs<ExtArgs>
result: runtime.Types.Utils.PayloadToResult<Prisma.$WeeklyStatsPayload>
}
createMany: {
args: Prisma.WeeklyStatsCreateManyArgs<ExtArgs>
result: BatchPayload
}
delete: {
args: Prisma.WeeklyStatsDeleteArgs<ExtArgs>
result: runtime.Types.Utils.PayloadToResult<Prisma.$WeeklyStatsPayload>
}
update: {
args: Prisma.WeeklyStatsUpdateArgs<ExtArgs>
result: runtime.Types.Utils.PayloadToResult<Prisma.$WeeklyStatsPayload>
}
deleteMany: {
args: Prisma.WeeklyStatsDeleteManyArgs<ExtArgs>
result: BatchPayload
}
updateMany: {
args: Prisma.WeeklyStatsUpdateManyArgs<ExtArgs>
result: BatchPayload
}
upsert: {
args: Prisma.WeeklyStatsUpsertArgs<ExtArgs>
result: runtime.Types.Utils.PayloadToResult<Prisma.$WeeklyStatsPayload>
}
aggregate: {
args: Prisma.WeeklyStatsAggregateArgs<ExtArgs>
result: runtime.Types.Utils.Optional<Prisma.AggregateWeeklyStats>
}
groupBy: {
args: Prisma.WeeklyStatsGroupByArgs<ExtArgs>
result: runtime.Types.Utils.Optional<Prisma.WeeklyStatsGroupByOutputType>[]
}
findRaw: {
args: Prisma.WeeklyStatsFindRawArgs<ExtArgs>
result: Prisma.JsonObject
}
aggregateRaw: {
args: Prisma.WeeklyStatsAggregateRawArgs<ExtArgs>
result: Prisma.JsonObject
}
count: {
args: Prisma.WeeklyStatsCountArgs<ExtArgs>
result: runtime.Types.Utils.Optional<Prisma.WeeklyStatsCountAggregateOutputType> | number
}
}
}
MonthlyStats: {
payload: Prisma.$MonthlyStatsPayload<ExtArgs>
fields: Prisma.MonthlyStatsFieldRefs
operations: {
findUnique: {
args: Prisma.MonthlyStatsFindUniqueArgs<ExtArgs>
result: runtime.Types.Utils.PayloadToResult<Prisma.$MonthlyStatsPayload> | null
}
findUniqueOrThrow: {
args: Prisma.MonthlyStatsFindUniqueOrThrowArgs<ExtArgs>
result: runtime.Types.Utils.PayloadToResult<Prisma.$MonthlyStatsPayload>
}
findFirst: {
args: Prisma.MonthlyStatsFindFirstArgs<ExtArgs>
result: runtime.Types.Utils.PayloadToResult<Prisma.$MonthlyStatsPayload> | null
}
findFirstOrThrow: {
args: Prisma.MonthlyStatsFindFirstOrThrowArgs<ExtArgs>
result: runtime.Types.Utils.PayloadToResult<Prisma.$MonthlyStatsPayload>
}
findMany: {
args: Prisma.MonthlyStatsFindManyArgs<ExtArgs>
result: runtime.Types.Utils.PayloadToResult<Prisma.$MonthlyStatsPayload>[]
}
create: {
args: Prisma.MonthlyStatsCreateArgs<ExtArgs>
result: runtime.Types.Utils.PayloadToResult<Prisma.$MonthlyStatsPayload>
}
createMany: {
args: Prisma.MonthlyStatsCreateManyArgs<ExtArgs>
result: BatchPayload
}
delete: {
args: Prisma.MonthlyStatsDeleteArgs<ExtArgs>
result: runtime.Types.Utils.PayloadToResult<Prisma.$MonthlyStatsPayload>
}
update: {
args: Prisma.MonthlyStatsUpdateArgs<ExtArgs>
result: runtime.Types.Utils.PayloadToResult<Prisma.$MonthlyStatsPayload>
}
deleteMany: {
args: Prisma.MonthlyStatsDeleteManyArgs<ExtArgs>
result: BatchPayload
}
updateMany: {
args: Prisma.MonthlyStatsUpdateManyArgs<ExtArgs>
result: BatchPayload
}
upsert: {
args: Prisma.MonthlyStatsUpsertArgs<ExtArgs>
result: runtime.Types.Utils.PayloadToResult<Prisma.$MonthlyStatsPayload>
}
aggregate: {
args: Prisma.MonthlyStatsAggregateArgs<ExtArgs>
result: runtime.Types.Utils.Optional<Prisma.AggregateMonthlyStats>
}
groupBy: {
args: Prisma.MonthlyStatsGroupByArgs<ExtArgs>
result: runtime.Types.Utils.Optional<Prisma.MonthlyStatsGroupByOutputType>[]
}
findRaw: {
args: Prisma.MonthlyStatsFindRawArgs<ExtArgs>
result: Prisma.JsonObject
}
aggregateRaw: {
args: Prisma.MonthlyStatsAggregateRawArgs<ExtArgs>
result: Prisma.JsonObject
}
count: {
args: Prisma.MonthlyStatsCountArgs<ExtArgs>
result: runtime.Types.Utils.Optional<Prisma.MonthlyStatsCountAggregateOutputType> | number
}
}
}
} }
} & { } & {
other: { other: {
@@ -800,14 +651,14 @@ export type TypeMap<ExtArgs extends runtime.Types.Extensions.InternalArgs = runt
* Enums * Enums
*/ */
export const GroupScalarFieldEnum = { export const GroupsScalarFieldEnum = {
telegramID: 'telegramID', telegramID: 'telegramID',
name: 'name', name: 'name',
createdAt: 'createdAt', createdAt: 'createdAt',
updatedAt: 'updatedAt' updatedAt: 'updatedAt'
} as const } as const
export type GroupScalarFieldEnum = (typeof GroupScalarFieldEnum)[keyof typeof GroupScalarFieldEnum] export type GroupsScalarFieldEnum = (typeof GroupsScalarFieldEnum)[keyof typeof GroupsScalarFieldEnum]
export const TotalStatsScalarFieldEnum = { export const TotalStatsScalarFieldEnum = {
@@ -832,28 +683,6 @@ export const DailyStatsScalarFieldEnum = {
export type DailyStatsScalarFieldEnum = (typeof DailyStatsScalarFieldEnum)[keyof typeof DailyStatsScalarFieldEnum] export type DailyStatsScalarFieldEnum = (typeof DailyStatsScalarFieldEnum)[keyof typeof DailyStatsScalarFieldEnum]
export const WeeklyStatsScalarFieldEnum = {
createdAt: 'createdAt',
updatedAt: 'updatedAt',
linksDeleted: 'linksDeleted',
commandResponses: 'commandResponses',
timesTriggered: 'timesTriggered'
} as const
export type WeeklyStatsScalarFieldEnum = (typeof WeeklyStatsScalarFieldEnum)[keyof typeof WeeklyStatsScalarFieldEnum]
export const MonthlyStatsScalarFieldEnum = {
createdAt: 'createdAt',
updatedAt: 'updatedAt',
linksDeleted: 'linksDeleted',
commandResponses: 'commandResponses',
timesTriggered: 'timesTriggered'
} as const
export type MonthlyStatsScalarFieldEnum = (typeof MonthlyStatsScalarFieldEnum)[keyof typeof MonthlyStatsScalarFieldEnum]
export const SortOrder = { export const SortOrder = {
asc: 'asc', asc: 'asc',
desc: 'desc' desc: 'desc'
@@ -1031,11 +860,9 @@ export interface PrismaClientOptions {
omit?: GlobalOmitConfig omit?: GlobalOmitConfig
} }
export type GlobalOmitConfig = { export type GlobalOmitConfig = {
group?: Prisma.GroupOmit groups?: Prisma.GroupsOmit
totalStats?: Prisma.TotalStatsOmit totalStats?: Prisma.TotalStatsOmit
dailyStats?: Prisma.DailyStatsOmit dailyStats?: Prisma.DailyStatsOmit
weeklyStats?: Prisma.WeeklyStatsOmit
monthlyStats?: Prisma.MonthlyStatsOmit
} }
/* Types for Logging */ /* Types for Logging */
@@ -1,6 +1,7 @@
/* !!! This is code generated by Prisma. Do not edit directly. !!! */ /* !!! This is code generated by Prisma. Do not edit directly. !!! */
/* eslint-disable */ /* eslint-disable */
// biome-ignore-all lint: generated file
// @ts-nocheck // @ts-nocheck
/* /*
* WARNING: This is an internal file that is subject to change! * WARNING: This is an internal file that is subject to change!
@@ -48,11 +49,9 @@ export const AnyNull = runtime.objectEnumValues.instances.AnyNull
export const ModelName = { export const ModelName = {
Group: 'Group', Groups: 'Groups',
TotalStats: 'TotalStats', TotalStats: 'TotalStats',
DailyStats: 'DailyStats', DailyStats: 'DailyStats'
WeeklyStats: 'WeeklyStats',
MonthlyStats: 'MonthlyStats'
} as const } as const
export type ModelName = (typeof ModelName)[keyof typeof ModelName] export type ModelName = (typeof ModelName)[keyof typeof ModelName]
@@ -61,14 +60,14 @@ export type ModelName = (typeof ModelName)[keyof typeof ModelName]
* Enums * Enums
*/ */
export const GroupScalarFieldEnum = { export const GroupsScalarFieldEnum = {
telegramID: 'telegramID', telegramID: 'telegramID',
name: 'name', name: 'name',
createdAt: 'createdAt', createdAt: 'createdAt',
updatedAt: 'updatedAt' updatedAt: 'updatedAt'
} as const } as const
export type GroupScalarFieldEnum = (typeof GroupScalarFieldEnum)[keyof typeof GroupScalarFieldEnum] export type GroupsScalarFieldEnum = (typeof GroupsScalarFieldEnum)[keyof typeof GroupsScalarFieldEnum]
export const TotalStatsScalarFieldEnum = { export const TotalStatsScalarFieldEnum = {
@@ -93,28 +92,6 @@ export const DailyStatsScalarFieldEnum = {
export type DailyStatsScalarFieldEnum = (typeof DailyStatsScalarFieldEnum)[keyof typeof DailyStatsScalarFieldEnum] export type DailyStatsScalarFieldEnum = (typeof DailyStatsScalarFieldEnum)[keyof typeof DailyStatsScalarFieldEnum]
export const WeeklyStatsScalarFieldEnum = {
createdAt: 'createdAt',
updatedAt: 'updatedAt',
linksDeleted: 'linksDeleted',
commandResponses: 'commandResponses',
timesTriggered: 'timesTriggered'
} as const
export type WeeklyStatsScalarFieldEnum = (typeof WeeklyStatsScalarFieldEnum)[keyof typeof WeeklyStatsScalarFieldEnum]
export const MonthlyStatsScalarFieldEnum = {
createdAt: 'createdAt',
updatedAt: 'updatedAt',
linksDeleted: 'linksDeleted',
commandResponses: 'commandResponses',
timesTriggered: 'timesTriggered'
} as const
export type MonthlyStatsScalarFieldEnum = (typeof MonthlyStatsScalarFieldEnum)[keyof typeof MonthlyStatsScalarFieldEnum]
export const SortOrder = { export const SortOrder = {
asc: 'asc', asc: 'asc',
desc: 'desc' desc: 'desc'
+2 -3
View File
@@ -1,15 +1,14 @@
/* !!! This is code generated by Prisma. Do not edit directly. !!! */ /* !!! This is code generated by Prisma. Do not edit directly. !!! */
/* eslint-disable */ /* eslint-disable */
// biome-ignore-all lint: generated file
// @ts-nocheck // @ts-nocheck
/* /*
* This is a barrel export file for all models and their related types. * This is a barrel export file for all models and their related types.
* *
* 🟢 You can import this file directly. * 🟢 You can import this file directly.
*/ */
export type * from './models/Group' export type * from './models/Groups'
export type * from './models/TotalStats' export type * from './models/TotalStats'
export type * from './models/DailyStats' export type * from './models/DailyStats'
export type * from './models/WeeklyStats'
export type * from './models/MonthlyStats'
export type * from './commonInputTypes' export type * from './commonInputTypes'
+57 -48
View File
@@ -1,6 +1,7 @@
/* !!! This is code generated by Prisma. Do not edit directly. !!! */ /* !!! This is code generated by Prisma. Do not edit directly. !!! */
/* eslint-disable */ /* eslint-disable */
// biome-ignore-all lint: generated file
// @ts-nocheck // @ts-nocheck
/* /*
* This file exports the `DailyStats` model and its related types. * This file exports the `DailyStats` model and its related types.
@@ -32,25 +33,25 @@ export type DailyStatsAvgAggregateOutputType = {
} }
export type DailyStatsSumAggregateOutputType = { export type DailyStatsSumAggregateOutputType = {
linksDeleted: bigint | null linksDeleted: number | null
commandResponses: bigint | null commandResponses: number | null
timesTriggered: bigint | null timesTriggered: number | null
} }
export type DailyStatsMinAggregateOutputType = { export type DailyStatsMinAggregateOutputType = {
createdAt: Date | null createdAt: Date | null
updatedAt: Date | null updatedAt: Date | null
linksDeleted: bigint | null linksDeleted: number | null
commandResponses: bigint | null commandResponses: number | null
timesTriggered: bigint | null timesTriggered: number | null
} }
export type DailyStatsMaxAggregateOutputType = { export type DailyStatsMaxAggregateOutputType = {
createdAt: Date | null createdAt: Date | null
updatedAt: Date | null updatedAt: Date | null
linksDeleted: bigint | null linksDeleted: number | null
commandResponses: bigint | null commandResponses: number | null
timesTriggered: bigint | null timesTriggered: number | null
} }
export type DailyStatsCountAggregateOutputType = { export type DailyStatsCountAggregateOutputType = {
@@ -189,9 +190,9 @@ export type DailyStatsGroupByArgs<ExtArgs extends runtime.Types.Extensions.Inter
export type DailyStatsGroupByOutputType = { export type DailyStatsGroupByOutputType = {
createdAt: Date createdAt: Date
updatedAt: Date updatedAt: Date
linksDeleted: bigint linksDeleted: number
commandResponses: bigint commandResponses: number
timesTriggered: bigint timesTriggered: number
_count: DailyStatsCountAggregateOutputType | null _count: DailyStatsCountAggregateOutputType | null
_avg: DailyStatsAvgAggregateOutputType | null _avg: DailyStatsAvgAggregateOutputType | null
_sum: DailyStatsSumAggregateOutputType | null _sum: DailyStatsSumAggregateOutputType | null
@@ -220,9 +221,9 @@ export type DailyStatsWhereInput = {
NOT?: Prisma.DailyStatsWhereInput | Prisma.DailyStatsWhereInput[] NOT?: Prisma.DailyStatsWhereInput | Prisma.DailyStatsWhereInput[]
createdAt?: Prisma.DateTimeFilter<"DailyStats"> | Date | string createdAt?: Prisma.DateTimeFilter<"DailyStats"> | Date | string
updatedAt?: Prisma.DateTimeFilter<"DailyStats"> | Date | string updatedAt?: Prisma.DateTimeFilter<"DailyStats"> | Date | string
linksDeleted?: Prisma.BigIntFilter<"DailyStats"> | bigint | number linksDeleted?: Prisma.IntFilter<"DailyStats"> | number
commandResponses?: Prisma.BigIntFilter<"DailyStats"> | bigint | number commandResponses?: Prisma.IntFilter<"DailyStats"> | number
timesTriggered?: Prisma.BigIntFilter<"DailyStats"> | bigint | number timesTriggered?: Prisma.IntFilter<"DailyStats"> | number
} }
export type DailyStatsOrderByWithRelationInput = { export type DailyStatsOrderByWithRelationInput = {
@@ -239,9 +240,9 @@ export type DailyStatsWhereUniqueInput = Prisma.AtLeast<{
OR?: Prisma.DailyStatsWhereInput[] OR?: Prisma.DailyStatsWhereInput[]
NOT?: Prisma.DailyStatsWhereInput | Prisma.DailyStatsWhereInput[] NOT?: Prisma.DailyStatsWhereInput | Prisma.DailyStatsWhereInput[]
updatedAt?: Prisma.DateTimeFilter<"DailyStats"> | Date | string updatedAt?: Prisma.DateTimeFilter<"DailyStats"> | Date | string
linksDeleted?: Prisma.BigIntFilter<"DailyStats"> | bigint | number linksDeleted?: Prisma.IntFilter<"DailyStats"> | number
commandResponses?: Prisma.BigIntFilter<"DailyStats"> | bigint | number commandResponses?: Prisma.IntFilter<"DailyStats"> | number
timesTriggered?: Prisma.BigIntFilter<"DailyStats"> | bigint | number timesTriggered?: Prisma.IntFilter<"DailyStats"> | number
}, "createdAt"> }, "createdAt">
export type DailyStatsOrderByWithAggregationInput = { export type DailyStatsOrderByWithAggregationInput = {
@@ -263,61 +264,61 @@ export type DailyStatsScalarWhereWithAggregatesInput = {
NOT?: Prisma.DailyStatsScalarWhereWithAggregatesInput | Prisma.DailyStatsScalarWhereWithAggregatesInput[] NOT?: Prisma.DailyStatsScalarWhereWithAggregatesInput | Prisma.DailyStatsScalarWhereWithAggregatesInput[]
createdAt?: Prisma.DateTimeWithAggregatesFilter<"DailyStats"> | Date | string createdAt?: Prisma.DateTimeWithAggregatesFilter<"DailyStats"> | Date | string
updatedAt?: Prisma.DateTimeWithAggregatesFilter<"DailyStats"> | Date | string updatedAt?: Prisma.DateTimeWithAggregatesFilter<"DailyStats"> | Date | string
linksDeleted?: Prisma.BigIntWithAggregatesFilter<"DailyStats"> | bigint | number linksDeleted?: Prisma.IntWithAggregatesFilter<"DailyStats"> | number
commandResponses?: Prisma.BigIntWithAggregatesFilter<"DailyStats"> | bigint | number commandResponses?: Prisma.IntWithAggregatesFilter<"DailyStats"> | number
timesTriggered?: Prisma.BigIntWithAggregatesFilter<"DailyStats"> | bigint | number timesTriggered?: Prisma.IntWithAggregatesFilter<"DailyStats"> | number
} }
export type DailyStatsCreateInput = { export type DailyStatsCreateInput = {
createdAt?: Date | string createdAt?: Date | string
updatedAt?: Date | string updatedAt?: Date | string
linksDeleted?: bigint | number linksDeleted?: number
commandResponses?: bigint | number commandResponses?: number
timesTriggered?: bigint | number timesTriggered?: number
} }
export type DailyStatsUncheckedCreateInput = { export type DailyStatsUncheckedCreateInput = {
createdAt?: Date | string createdAt?: Date | string
updatedAt?: Date | string updatedAt?: Date | string
linksDeleted?: bigint | number linksDeleted?: number
commandResponses?: bigint | number commandResponses?: number
timesTriggered?: bigint | number timesTriggered?: number
} }
export type DailyStatsUpdateInput = { export type DailyStatsUpdateInput = {
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
linksDeleted?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number linksDeleted?: Prisma.IntFieldUpdateOperationsInput | number
commandResponses?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number commandResponses?: Prisma.IntFieldUpdateOperationsInput | number
timesTriggered?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number timesTriggered?: Prisma.IntFieldUpdateOperationsInput | number
} }
export type DailyStatsUncheckedUpdateInput = { export type DailyStatsUncheckedUpdateInput = {
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
linksDeleted?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number linksDeleted?: Prisma.IntFieldUpdateOperationsInput | number
commandResponses?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number commandResponses?: Prisma.IntFieldUpdateOperationsInput | number
timesTriggered?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number timesTriggered?: Prisma.IntFieldUpdateOperationsInput | number
} }
export type DailyStatsCreateManyInput = { export type DailyStatsCreateManyInput = {
createdAt?: Date | string createdAt?: Date | string
updatedAt?: Date | string updatedAt?: Date | string
linksDeleted?: bigint | number linksDeleted?: number
commandResponses?: bigint | number commandResponses?: number
timesTriggered?: bigint | number timesTriggered?: number
} }
export type DailyStatsUpdateManyMutationInput = { export type DailyStatsUpdateManyMutationInput = {
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
linksDeleted?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number linksDeleted?: Prisma.IntFieldUpdateOperationsInput | number
commandResponses?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number commandResponses?: Prisma.IntFieldUpdateOperationsInput | number
timesTriggered?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number timesTriggered?: Prisma.IntFieldUpdateOperationsInput | number
} }
export type DailyStatsUncheckedUpdateManyInput = { export type DailyStatsUncheckedUpdateManyInput = {
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
linksDeleted?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number linksDeleted?: Prisma.IntFieldUpdateOperationsInput | number
commandResponses?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number commandResponses?: Prisma.IntFieldUpdateOperationsInput | number
timesTriggered?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number timesTriggered?: Prisma.IntFieldUpdateOperationsInput | number
} }
export type DailyStatsCountOrderByAggregateInput = { export type DailyStatsCountOrderByAggregateInput = {
@@ -356,6 +357,14 @@ export type DailyStatsSumOrderByAggregateInput = {
timesTriggered?: Prisma.SortOrder timesTriggered?: Prisma.SortOrder
} }
export type IntFieldUpdateOperationsInput = {
set?: number
increment?: number
decrement?: number
multiply?: number
divide?: number
}
export type DailyStatsSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{ export type DailyStatsSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
@@ -384,9 +393,9 @@ export type $DailyStatsPayload<ExtArgs extends runtime.Types.Extensions.Internal
scalars: runtime.Types.Extensions.GetPayloadResult<{ scalars: runtime.Types.Extensions.GetPayloadResult<{
createdAt: Date createdAt: Date
updatedAt: Date updatedAt: Date
linksDeleted: bigint linksDeleted: number
commandResponses: bigint commandResponses: number
timesTriggered: bigint timesTriggered: number
}, ExtArgs["result"]["dailyStats"]> }, ExtArgs["result"]["dailyStats"]>
composites: {} composites: {}
} }
@@ -781,9 +790,9 @@ export interface Prisma__DailyStatsClient<T, Null = never, ExtArgs extends runti
export interface DailyStatsFieldRefs { export interface DailyStatsFieldRefs {
readonly createdAt: Prisma.FieldRef<"DailyStats", 'DateTime'> readonly createdAt: Prisma.FieldRef<"DailyStats", 'DateTime'>
readonly updatedAt: Prisma.FieldRef<"DailyStats", 'DateTime'> readonly updatedAt: Prisma.FieldRef<"DailyStats", 'DateTime'>
readonly linksDeleted: Prisma.FieldRef<"DailyStats", 'BigInt'> readonly linksDeleted: Prisma.FieldRef<"DailyStats", 'Int'>
readonly commandResponses: Prisma.FieldRef<"DailyStats", 'BigInt'> readonly commandResponses: Prisma.FieldRef<"DailyStats", 'Int'>
readonly timesTriggered: Prisma.FieldRef<"DailyStats", 'BigInt'> readonly timesTriggered: Prisma.FieldRef<"DailyStats", 'Int'>
} }
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -1,6 +1,7 @@
/* !!! This is code generated by Prisma. Do not edit directly. !!! */ /* !!! This is code generated by Prisma. Do not edit directly. !!! */
/* eslint-disable */ /* eslint-disable */
// biome-ignore-all lint: generated file
// @ts-nocheck // @ts-nocheck
/* /*
* This file exports the `TotalStats` model and its related types. * This file exports the `TotalStats` model and its related types.
File diff suppressed because it is too large Load Diff
+7 -23
View File
@@ -14,7 +14,7 @@ datasource db {
url = env("DATABASE_URL") url = env("DATABASE_URL")
} }
model Group { model Groups {
telegramID Int @id @map("_id") @db.Int telegramID Int @id @map("_id") @db.Int
name String name String
createdAt DateTime @default(now()) createdAt DateTime @default(now())
@@ -24,31 +24,15 @@ model Group {
model TotalStats { model TotalStats {
createdAt DateTime @id @default(now()) @map("_id") createdAt DateTime @id @default(now()) @map("_id")
updatedAt DateTime @default(now()) @updatedAt updatedAt DateTime @default(now()) @updatedAt
linksDeleted BigInt @default(0) linksDeleted BigInt @default(0) @db.Long
commandResponses BigInt @default(0) commandResponses BigInt @default(0) @db.Long
timesTriggered BigInt @default(0) timesTriggered BigInt @default(0) @db.Long
} }
model DailyStats { model DailyStats {
createdAt DateTime @id @default(now()) @map("_id") createdAt DateTime @id @default(now()) @map("_id")
updatedAt DateTime @default(now()) @updatedAt updatedAt DateTime @default(now()) @updatedAt
linksDeleted BigInt @default(0) linksDeleted Int @default(0) @db.Int
commandResponses BigInt @default(0) commandResponses Int @default(0) @db.Int
timesTriggered BigInt @default(0) timesTriggered Int @default(0) @db.Int
}
model WeeklyStats {
createdAt DateTime @id @default(now()) @map("_id")
updatedAt DateTime @default(now()) @updatedAt
linksDeleted BigInt @default(0)
commandResponses BigInt @default(0)
timesTriggered BigInt @default(0)
}
model MonthlyStats {
createdAt DateTime @id @default(now()) @map("_id")
updatedAt DateTime @default(now()) @updatedAt()
linksDeleted BigInt @default(0)
commandResponses BigInt @default(0)
timesTriggered BigInt @default(0)
} }
+12 -5
View File
@@ -1,7 +1,11 @@
{ {
"compilerOptions": { "compilerOptions": {
"target": "ESNext", "target": "ESNext",
"lib": ["dom", "dom.iterable", "esnext"], "lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true, "allowJs": true,
"skipLibCheck": true, "skipLibCheck": true,
"strict": true, "strict": true,
@@ -19,7 +23,9 @@
} }
], ],
"paths": { "paths": {
"@/*": ["./src/*"] "@/*": [
"./src/*"
]
} }
}, },
"include": [ "include": [
@@ -27,8 +33,9 @@
"**/*.ts", "**/*.ts",
"**/*.tsx", "**/*.tsx",
".next/types/**/*.ts", ".next/types/**/*.ts",
".next/dev/types/**/*.ts", ".next/dev/types/**/*.ts"
"**/*.mts"
], ],
"exclude": ["node_modules"] "exclude": [
"node_modules"
]
} }
+1024 -760
View File
File diff suppressed because it is too large Load Diff