diff --git a/server/.gitignore b/server/.gitignore index 088ab30..97871f7 100644 --- a/server/.gitignore +++ b/server/.gitignore @@ -11,4 +11,7 @@ node_modules/ dist/ # logs -**/*.log \ No newline at end of file +**/*.log + +# misc +.vscode/ \ No newline at end of file diff --git a/server/package.json b/server/package.json index e232bbb..b19e393 100644 --- a/server/package.json +++ b/server/package.json @@ -20,14 +20,14 @@ "eslint-plugin-import": "^2.25.2", "eslint-plugin-n": "^15.0.0", "eslint-plugin-promise": "^6.0.0", - "prisma": "^5.2.0", + "prisma": "^5.18.0", "tsx": "^4.7.0", "typescript": "*", "vitest": "^0.28.5", "zod": "^3.20.6" }, "dependencies": { - "@prisma/client": "^5.2.0", + "@prisma/client": "^5.10.2", "@types/cors": "^2.8.13", "bcrypt": "^5.1.0", "bcryptjs": "^2.4.3", diff --git a/server/prisma/migrations/20240223012725_create_name_column/migration.sql b/server/prisma/migrations/20240223012725_create_name_column/migration.sql deleted file mode 100644 index 3d280cf..0000000 --- a/server/prisma/migrations/20240223012725_create_name_column/migration.sql +++ /dev/null @@ -1,8 +0,0 @@ -/* - Warnings: - - - Added the required column `name` to the `genders` table without a default value. This is not possible if the table is not empty. - -*/ --- AlterTable -ALTER TABLE "genders" ADD COLUMN "name" TEXT NOT NULL; diff --git a/server/prisma/migrations/20240223013156_change_gender_type/migration.sql b/server/prisma/migrations/20240223013156_change_gender_type/migration.sql deleted file mode 100644 index 67f2231..0000000 --- a/server/prisma/migrations/20240223013156_change_gender_type/migration.sql +++ /dev/null @@ -1,31 +0,0 @@ -/* - Warnings: - - - You are about to alter the column `gender` on the `animals` table. The data in that column could be lost. The data in that column will be cast from `Decimal(65,30)` to `Integer`. - - The primary key for the `genders` table will be changed. If it partially fails, the table could be left without primary key constraint. - - You are about to drop the column `name` on the `genders` table. All the data in the column will be lost. - - You are about to alter the column `id` on the `genders` table. The data in that column could be lost. The data in that column will be cast from `Decimal(65,30)` to `Integer`. - - A unique constraint covering the columns `[type]` on the table `genders` will be added. If there are existing duplicate values, this will fail. - -*/ --- DropForeignKey -ALTER TABLE "animals" DROP CONSTRAINT "animals_gender_fkey"; - --- AlterTable -ALTER TABLE "animals" ALTER COLUMN "gender" SET DATA TYPE INTEGER; - --- AlterTable -CREATE SEQUENCE genders_id_seq; -ALTER TABLE "genders" DROP CONSTRAINT "genders_pkey", -DROP COLUMN "name", -ALTER COLUMN "id" SET DEFAULT nextval('genders_id_seq'), -ALTER COLUMN "id" SET DATA TYPE SERIAL, -ALTER COLUMN "type" SET DATA TYPE TEXT, -ADD CONSTRAINT "genders_pkey" PRIMARY KEY ("id"); -ALTER SEQUENCE genders_id_seq OWNED BY "genders"."id"; - --- CreateIndex -CREATE UNIQUE INDEX "genders_type_key" ON "genders"("type"); - --- AddForeignKey -ALTER TABLE "animals" ADD CONSTRAINT "animals_gender_fkey" FOREIGN KEY ("gender") REFERENCES "genders"("id") ON DELETE RESTRICT ON UPDATE CASCADE; diff --git a/server/prisma/migrations/20230612165801_create_animal_gender_table/migration.sql b/server/prisma/migrations/20240224155437_create_gender_table/migration.sql similarity index 68% rename from server/prisma/migrations/20230612165801_create_animal_gender_table/migration.sql rename to server/prisma/migrations/20240224155437_create_gender_table/migration.sql index 13c29a7..1870779 100644 --- a/server/prisma/migrations/20230612165801_create_animal_gender_table/migration.sql +++ b/server/prisma/migrations/20240224155437_create_gender_table/migration.sql @@ -5,15 +5,18 @@ */ -- AlterTable -ALTER TABLE "animals" ADD COLUMN "gender" DECIMAL(65,30) NOT NULL; +ALTER TABLE "animals" ADD COLUMN "gender" INTEGER NOT NULL; -- CreateTable CREATE TABLE "genders" ( - "id" DECIMAL(65,30) NOT NULL, - "type" DECIMAL(65,30) NOT NULL, + "id" SERIAL NOT NULL, + "type" TEXT NOT NULL, CONSTRAINT "genders_pkey" PRIMARY KEY ("id") ); +-- CreateIndex +CREATE UNIQUE INDEX "genders_type_key" ON "genders"("type"); + -- AddForeignKey ALTER TABLE "animals" ADD CONSTRAINT "animals_gender_fkey" FOREIGN KEY ("gender") REFERENCES "genders"("id") ON DELETE RESTRICT ON UPDATE CASCADE; diff --git a/server/prisma/migrations/20240224155522_create_production_control/migration.sql b/server/prisma/migrations/20240224155522_create_production_control/migration.sql new file mode 100644 index 0000000..73b7e7d --- /dev/null +++ b/server/prisma/migrations/20240224155522_create_production_control/migration.sql @@ -0,0 +1,13 @@ +-- CreateTable +CREATE TABLE "animal_productions" ( + "id" TEXT NOT NULL, + "animal_id" TEXT NOT NULL, + "date" TIMESTAMP(3) NOT NULL, + "goal" TEXT NOT NULL, + "price" DECIMAL(65,30) NOT NULL, + + CONSTRAINT "animal_productions_pkey" PRIMARY KEY ("id") +); + +-- AddForeignKey +ALTER TABLE "animal_productions" ADD CONSTRAINT "animal_productions_animal_id_fkey" FOREIGN KEY ("animal_id") REFERENCES "animals"("id") ON DELETE RESTRICT ON UPDATE CASCADE; diff --git a/server/prisma/schema.prisma b/server/prisma/schema.prisma index 0e24e2e..73b6dea 100644 --- a/server/prisma/schema.prisma +++ b/server/prisma/schema.prisma @@ -35,7 +35,7 @@ model Animal { owner User @relation(fields: [ownerId], references: [id]) genderId Gender @relation(fields: [gender], references: [id]) - AnimalProduction AnimalProduction[] + production Production[] @@map("animals") } @@ -49,7 +49,7 @@ model Gender { @@map("genders") } -model AnimalProduction { +model Production { id String @id @default(uuid()) animalId String @map("animal_id") date DateTime diff --git a/server/src/controllers/Production/createProductionController.ts b/server/src/controllers/Production/createProductionController.ts new file mode 100644 index 0000000..54d438a --- /dev/null +++ b/server/src/controllers/Production/createProductionController.ts @@ -0,0 +1,30 @@ +import { Request, Response } from "express"; +import { z } from "zod"; +import { CreateProduction } from "../../services/Production/createProduction"; +import { ProductionViewModel } from "../../views/ProductionViewModel"; + +export class CreateProductionController { + constructor ( + private createProduction: CreateProduction, + ) {} + + async handle(request: Request, response: Response) { + const CreateAnimalProps = z.object({ + animalId: z.string(), + date: z.string(), + goal: z.string(), + price: z.number(), + }); + + const { animalId, date, goal, price } = CreateAnimalProps.parse(request.body); + + const production = await this.createProduction.execute({ + animalId, + date: new Date(date), + goal, + price, + }); + + return response.status(201).json(ProductionViewModel.toHTTP(production)); + } +} \ No newline at end of file diff --git a/server/src/controllers/Production/findManyProductionsController.ts b/server/src/controllers/Production/findManyProductionsController.ts new file mode 100644 index 0000000..0e62ef9 --- /dev/null +++ b/server/src/controllers/Production/findManyProductionsController.ts @@ -0,0 +1,17 @@ +import { Request, Response } from "express"; +import { FindManyProductions } from "../../services/Production/findManyProductions"; +import { ProductionViewModel } from "../../views/ProductionViewModel"; + +export class FindManyProductionsController { + constructor( + private findManyProductions: FindManyProductions, + ) {} + + async handle(request: Request, response: Response) { + const { ownerId } = request.params; + + const productions = await this.findManyProductions.execute(ownerId); + + return response.json(productions.map((production) => ProductionViewModel.toHTTP(production))); + } +} \ No newline at end of file diff --git a/server/src/controllers/Production/index.ts b/server/src/controllers/Production/index.ts new file mode 100644 index 0000000..efd15f4 --- /dev/null +++ b/server/src/controllers/Production/index.ts @@ -0,0 +1,8 @@ +import { createProduction, findManyProductions } from "../../services/Production"; +import { CreateProductionController } from "./createProductionController"; +import { FindManyProductionsController } from "./findManyProductionsController"; + +const createProductionController = new CreateProductionController(createProduction); +const findManyProductionsController = new FindManyProductionsController(findManyProductions); + +export { createProductionController, findManyProductionsController }; \ No newline at end of file diff --git a/server/src/database/index.ts b/server/src/database/index.ts index 02f8cc5..db71340 100644 --- a/server/src/database/index.ts +++ b/server/src/database/index.ts @@ -1,9 +1,15 @@ import { PrismaClient } from "@prisma/client"; import { PrismaAnimalsRepository } from "./prisma/PrismaAnimalsRepository"; import { PrismaUsersRepository } from "./prisma/PrismaUsersRepository"; +import { PrismaProductionRepository } from "./prisma/PrismaProductionRepository"; const prisma = new PrismaClient(); const prismaAnimalsRepository = new PrismaAnimalsRepository(prisma); const prismaUsersRepository = new PrismaUsersRepository(prisma); +const prismaProduction = new PrismaProductionRepository(prisma); -export { prismaAnimalsRepository, prismaUsersRepository }; \ No newline at end of file +export { + prismaAnimalsRepository, + prismaUsersRepository, + prismaProduction +}; \ No newline at end of file diff --git a/server/src/database/mappers/PrismaProductionMappers.ts b/server/src/database/mappers/PrismaProductionMappers.ts new file mode 100644 index 0000000..43fb0cf --- /dev/null +++ b/server/src/database/mappers/PrismaProductionMappers.ts @@ -0,0 +1,23 @@ +import { ProductionProps } from "../../dtos/AnimalsDTO"; + +export class PrismaProduction { + static toPrisma(data: ProductionProps) { + return { + id: data.id, + animalId: data.animalId, + date: data.date, + goal: data.goal, + price: data.price, + }; + } + + static toDomain(raw: any) { + return { + id: raw.id, + animalId: raw.animalId, + date: new Date(raw.date), + goal: raw.goal, + price: Number(raw.price), + }; + } +} \ No newline at end of file diff --git a/server/src/database/prisma/PrismaProductionRepository.ts b/server/src/database/prisma/PrismaProductionRepository.ts new file mode 100644 index 0000000..1c0e8b5 --- /dev/null +++ b/server/src/database/prisma/PrismaProductionRepository.ts @@ -0,0 +1,67 @@ +import { PrismaClient } from "@prisma/client"; +import { ProductionRepository } from "../../repositories/ProductionRepository"; +import { ProductionProps } from "../../dtos/AnimalsDTO"; +import { PrismaProduction } from "../mappers/PrismaProductionMappers"; + +export class PrismaProductionRepository implements ProductionRepository { + constructor ( + private prisma: PrismaClient, + ) {} + + async create(props: ProductionProps): Promise { + const raw = PrismaProduction.toPrisma(props); + + await this.prisma.production.create({ + data: raw + }); + } + + async findByAnimalId(id: string): Promise { + const animalExists = await this.prisma.production.findFirst({ + where: { + animalId: id, + } + }); + + if(!animalExists) { + return null; + } + + return PrismaProduction.toDomain(animalExists); + } + + async findMany(ownerId: string): Promise { + const animals = await this.prisma.production.findMany({ + where: { + animal: { + ownerId, + } + } + }); + + return animals.map(PrismaProduction.toDomain); + } + + async save(props: ProductionProps): Promise { + const raw = PrismaProduction.toPrisma(props); + + await this.prisma.production.update({ + where: { + id: raw.id, + }, + data: raw, + }); + + return; + } + + async delete(id: string): Promise { + await this.prisma.production.delete({ + where: { + id, + } + }); + + return; + } +} \ No newline at end of file diff --git a/server/src/entities/Production.spec.ts b/server/src/entities/Production.spec.ts new file mode 100644 index 0000000..d16924b --- /dev/null +++ b/server/src/entities/Production.spec.ts @@ -0,0 +1,38 @@ +import { randomUUID } from 'crypto'; +import { describe, expect, it } from 'vitest'; +import Production from './Production'; + +describe("Production", () => { + it("Should be able to create a new production", () => { + const raw = { + animalId: randomUUID(), + date: new Date(), + goal: "Engorda", + price: 1250.00, + }; + + const animal = new Production(raw); + + expect(animal).toBeTruthy(); + expect(animal).toHaveProperty("id"); + expect(animal).toContain({ + id: animal.id, + ...raw, + }); + }); + + it("Should be able to create a instance to an existing production", () => { + const id = randomUUID(); + + const animal = new Production({ + animalId: randomUUID(), + date: new Date(), + goal: "Engorda", + price: 1250.00, + }, id); + + expect(animal).toBeTruthy(); + expect(animal).toHaveProperty("id"); + expect(animal.id).toBe(id); + }); +}); \ No newline at end of file diff --git a/server/src/entities/Production.ts b/server/src/entities/Production.ts new file mode 100644 index 0000000..f864afe --- /dev/null +++ b/server/src/entities/Production.ts @@ -0,0 +1,38 @@ +import { randomUUID } from "crypto"; + +interface ProductionProps { + animalId: string; + date: Date; + goal: string; + price: number; +} + +export default class Production { + private _id: string; + private props: ProductionProps; + + constructor(props: ProductionProps, id?: string) { + this.props = props; + this._id = id ?? randomUUID(); + } + + public get id(): string { + return this._id; + } + + public get animalId() { + return this.props.animalId; + } + + public get date() { + return this.props.date; + } + + public get goal() { + return this.props.goal; + } + + public get price() { + return this.props.price; + } +} \ No newline at end of file diff --git a/server/src/repositories/ProductionRepository.ts b/server/src/repositories/ProductionRepository.ts new file mode 100644 index 0000000..3a1bc9a --- /dev/null +++ b/server/src/repositories/ProductionRepository.ts @@ -0,0 +1,9 @@ +import Production from "../entities/Production"; + +export abstract class ProductionRepository { + abstract create(props: Production): Promise; + abstract findByAnimalId(id: string): Promise; + abstract findMany(ownerId: string): Promise; + abstract save(props: Production): Promise; + abstract delete(id: string): Promise; +} \ No newline at end of file diff --git a/server/src/routes/index.ts b/server/src/routes/index.ts index 20ba9c6..47bb05b 100644 --- a/server/src/routes/index.ts +++ b/server/src/routes/index.ts @@ -2,11 +2,13 @@ import { Router } from "express"; import { animalsRoutes } from "./animalsRoutes"; import { usersRoutes } from "./usersRoutes"; import { authRoutes } from "./authRoutes"; +import { productionRoutes } from "./productionRoutes"; const routes = Router(); routes.use("/users", usersRoutes); routes.use("/animals", animalsRoutes); routes.use("/auth", authRoutes); +routes.use("/production", productionRoutes); export { routes }; \ No newline at end of file diff --git a/server/src/routes/productionRoutes.ts b/server/src/routes/productionRoutes.ts new file mode 100644 index 0000000..374ac1c --- /dev/null +++ b/server/src/routes/productionRoutes.ts @@ -0,0 +1,15 @@ +import { Router } from "express"; +import { createProductionController, findManyProductionsController } from "../controllers/Production"; +import { authorizate } from "../middlewares"; + +const routes = Router(); + +routes.post("/", authorizate.verify, (request, response) => { + return createProductionController.handle(request, response); +}); + +routes.get("/owner/:ownerId", authorizate.verify, (request, response) => { + return findManyProductionsController.handle(request, response); +}); + +export { routes as productionRoutes }; \ No newline at end of file diff --git a/server/src/services/Production/createProduction.ts b/server/src/services/Production/createProduction.ts new file mode 100644 index 0000000..44484a8 --- /dev/null +++ b/server/src/services/Production/createProduction.ts @@ -0,0 +1,30 @@ +import ProductionControl from "../../entities/Production"; +import AppError from "../../error/AppError"; +import { ProductionRepository } from "../../repositories/ProductionRepository"; + +interface productionRequest { + animalId: string; + date: Date; + goal: string; + price: number; +} + +export class CreateProduction { + constructor ( + private productionControlRepository: ProductionRepository, + ) {} + + async execute(props: productionRequest) { + const animalExists = await this.productionControlRepository.findByAnimalId(props.animalId); + + if(animalExists) { + throw new AppError("Production already exists."); + } + + const production = new ProductionControl(props); + + await this.productionControlRepository.create(production); + + return production; + } +} \ No newline at end of file diff --git a/server/src/services/Production/findManyProductions.ts b/server/src/services/Production/findManyProductions.ts new file mode 100644 index 0000000..d86fac9 --- /dev/null +++ b/server/src/services/Production/findManyProductions.ts @@ -0,0 +1,13 @@ +import { ProductionRepository } from "../../repositories/ProductionRepository"; + +export class FindManyProductions { + constructor( + private productionRepository: ProductionRepository + ) {} + + async execute(ownerId: string) { + const productions = await this.productionRepository.findMany(ownerId); + + return productions; + } +} \ No newline at end of file diff --git a/server/src/services/Production/index.ts b/server/src/services/Production/index.ts new file mode 100644 index 0000000..ea2d30c --- /dev/null +++ b/server/src/services/Production/index.ts @@ -0,0 +1,10 @@ +import { prismaProduction } from "../../database"; +import { CreateProduction } from "./createProduction"; +import { FindManyProductions } from "./findManyProductions"; + +const productionRepository = prismaProduction; + +const createProduction = new CreateProduction(productionRepository); +const findManyProductions = new FindManyProductions(productionRepository); + +export { createProduction, findManyProductions }; \ No newline at end of file diff --git a/server/src/views/ProductionViewModel.ts b/server/src/views/ProductionViewModel.ts new file mode 100644 index 0000000..05c03b1 --- /dev/null +++ b/server/src/views/ProductionViewModel.ts @@ -0,0 +1,13 @@ +import Production from "../entities/Production"; + +export class ProductionViewModel { + public static toHTTP(production: Production) { + return { + id: production.id, + identification: production.animalId, + fatherId: production.date, + motherId: production.goal, + birthDate: production.price, + }; + } +} \ No newline at end of file diff --git a/server/tsconfig.json b/server/tsconfig.json index 10aafb6..72a2e49 100644 --- a/server/tsconfig.json +++ b/server/tsconfig.json @@ -31,7 +31,9 @@ // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ - // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ + "typeRoots": [ + "./@types" + ], /* Specify multiple folders that act like './node_modules/@types'. */ // "types": [], /* Specify type package names to be included without being referenced in a source file. */ // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ diff --git a/server/yarn.lock b/server/yarn.lock index 5f4bcc1..ad0717e 100644 --- a/server/yarn.lock +++ b/server/yarn.lock @@ -297,22 +297,46 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@prisma/client@^5.2.0": - version "5.2.0" - resolved "https://registry.yarnpkg.com/@prisma/client/-/client-5.2.0.tgz#cbfdd440614b38736563a7999f39922fcde0ed50" - integrity sha512-AiTjJwR4J5Rh6Z/9ZKrBBLel3/5DzUNntMohOy7yObVnVoTNVFi2kvpLZlFuKO50d7yDspOtW6XBpiAd0BVXbQ== - dependencies: - "@prisma/engines-version" "5.2.0-25.2804dc98259d2ea960602aca6b8e7fdc03c1758f" - -"@prisma/engines-version@5.2.0-25.2804dc98259d2ea960602aca6b8e7fdc03c1758f": - version "5.2.0-25.2804dc98259d2ea960602aca6b8e7fdc03c1758f" - resolved "https://registry.yarnpkg.com/@prisma/engines-version/-/engines-version-5.2.0-25.2804dc98259d2ea960602aca6b8e7fdc03c1758f.tgz#11366e7ff031c908debf4983248d40046016de37" - integrity sha512-jsnKT5JIDIE01lAeCj2ghY9IwxkedhKNvxQeoyLs6dr4ZXynetD0vTy7u6wMJt8vVPv8I5DPy/I4CFaoXAgbtg== - -"@prisma/engines@5.2.0": - version "5.2.0" - resolved "https://registry.yarnpkg.com/@prisma/engines/-/engines-5.2.0.tgz#e5dff48eb324c8137393933292d44ea5c3bc2ce7" - integrity sha512-dT7FOLUCdZmq+AunLqB1Iz+ZH/IIS1Fz2THmKZQ6aFONrQD/BQ5ecJ7g2wGS2OgyUFf4OaLam6/bxmgdOBDqig== +"@prisma/client@^5.10.2": + version "5.10.2" + resolved "https://registry.yarnpkg.com/@prisma/client/-/client-5.10.2.tgz#e087b40a4de8e3171eb9cbf0a873465cd2068e17" + integrity sha512-ef49hzB2yJZCvM5gFHMxSFL9KYrIP9udpT5rYo0CsHD4P9IKj473MbhU1gjKKftiwWBTIyrt9jukprzZXazyag== + +"@prisma/debug@5.18.0": + version "5.18.0" + resolved "https://registry.yarnpkg.com/@prisma/debug/-/debug-5.18.0.tgz#527799e044d2903a35945e61ac2d8916e4b61ead" + integrity sha512-f+ZvpTLidSo3LMJxQPVgAxdAjzv5OpzAo/eF8qZqbwvgi2F5cTOI9XCpdRzJYA0iGfajjwjOKKrVq64vkxEfUw== + +"@prisma/engines-version@5.18.0-25.4c784e32044a8a016d99474bd02a3b6123742169": + version "5.18.0-25.4c784e32044a8a016d99474bd02a3b6123742169" + resolved "https://registry.yarnpkg.com/@prisma/engines-version/-/engines-version-5.18.0-25.4c784e32044a8a016d99474bd02a3b6123742169.tgz#203426ebf4ec4e1acce7da4a59ec8f0df92b29e7" + integrity sha512-a/+LpJj8vYU3nmtkg+N3X51ddbt35yYrRe8wqHTJtYQt7l1f8kjIBcCs6sHJvodW/EK5XGvboOiwm47fmNrbgg== + +"@prisma/engines@5.18.0": + version "5.18.0" + resolved "https://registry.yarnpkg.com/@prisma/engines/-/engines-5.18.0.tgz#26ea46e26498be622407cf95663d7fb4c39c895b" + integrity sha512-ofmpGLeJ2q2P0wa/XaEgTnX/IsLnvSp/gZts0zjgLNdBhfuj2lowOOPmDcfKljLQUXMvAek3lw5T01kHmCG8rg== + dependencies: + "@prisma/debug" "5.18.0" + "@prisma/engines-version" "5.18.0-25.4c784e32044a8a016d99474bd02a3b6123742169" + "@prisma/fetch-engine" "5.18.0" + "@prisma/get-platform" "5.18.0" + +"@prisma/fetch-engine@5.18.0": + version "5.18.0" + resolved "https://registry.yarnpkg.com/@prisma/fetch-engine/-/fetch-engine-5.18.0.tgz#5b343e2b36b27e2713901ddd032ddd6932b3d55f" + integrity sha512-I/3u0x2n31rGaAuBRx2YK4eB7R/1zCuayo2DGwSpGyrJWsZesrV7QVw7ND0/Suxeo/vLkJ5OwuBqHoCxvTHpOg== + dependencies: + "@prisma/debug" "5.18.0" + "@prisma/engines-version" "5.18.0-25.4c784e32044a8a016d99474bd02a3b6123742169" + "@prisma/get-platform" "5.18.0" + +"@prisma/get-platform@5.18.0": + version "5.18.0" + resolved "https://registry.yarnpkg.com/@prisma/get-platform/-/get-platform-5.18.0.tgz#0dc4c82fe9a4971f4519a57cb2dd69d8e0df4b71" + integrity sha512-Tk+m7+uhqcKDgnMnFN0lRiH7Ewea0OEsZZs9pqXa7i3+7svS3FSCqDBCaM9x5fmhhkufiG0BtunJVDka+46DlA== + dependencies: + "@prisma/debug" "5.18.0" "@types/bcryptjs@^2.4.2": version "2.4.2" @@ -2333,12 +2357,12 @@ pretty-format@^27.5.1: ansi-styles "^5.0.0" react-is "^17.0.1" -prisma@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/prisma/-/prisma-5.2.0.tgz#a302dc2635cdec1d22d552ece837fb29a03563b9" - integrity sha512-FfFlpjVCkZwrqxDnP4smlNYSH1so+CbfjgdpioFzGGqlQAEm6VHAYSzV7jJgC3ebtY9dNOhDMS2+4/1DDSM7bQ== +prisma@^5.18.0: + version "5.18.0" + resolved "https://registry.yarnpkg.com/prisma/-/prisma-5.18.0.tgz#5ef69c802a075b7596231ea57003496873610b9e" + integrity sha512-+TrSIxZsh64OPOmaSgVPH7ALL9dfU0jceYaMJXsNrTkFHO7/3RANi5K2ZiPB1De9+KDxCWn7jvRq8y8pvk+o9g== dependencies: - "@prisma/engines" "5.2.0" + "@prisma/engines" "5.18.0" proxy-addr@~2.0.7: version "2.0.7"