diff --git a/prisma/migrations/20260219091738_add_pos_exp_fk/migration.sql b/prisma/migrations/20260219091738_add_pos_exp_fk/migration.sql new file mode 100644 index 0000000..6839e7f --- /dev/null +++ b/prisma/migrations/20260219091738_add_pos_exp_fk/migration.sql @@ -0,0 +1,22 @@ +-- RedefineTables +PRAGMA defer_foreign_keys=ON; +PRAGMA foreign_keys=OFF; +CREATE TABLE "new_generations" ( + "id" TEXT NOT NULL PRIMARY KEY, + "character_id" TEXT NOT NULL, + "image_id" TEXT NOT NULL, + "user_prompt" TEXT, + "pose" TEXT, + "expression" TEXT, + "created_at" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updated_at" DATETIME NOT NULL, + CONSTRAINT "generations_character_id_fkey" FOREIGN KEY ("character_id") REFERENCES "characters" ("id") ON DELETE RESTRICT ON UPDATE CASCADE, + CONSTRAINT "generations_image_id_fkey" FOREIGN KEY ("image_id") REFERENCES "assets" ("id") ON DELETE RESTRICT ON UPDATE CASCADE, + CONSTRAINT "generations_pose_fkey" FOREIGN KEY ("pose") REFERENCES "poses" ("id") ON DELETE SET NULL ON UPDATE CASCADE, + CONSTRAINT "generations_expression_fkey" FOREIGN KEY ("expression") REFERENCES "expressions" ("id") ON DELETE SET NULL ON UPDATE CASCADE +); +INSERT INTO "new_generations" ("character_id", "created_at", "expression", "id", "image_id", "pose", "updated_at", "user_prompt") SELECT "character_id", "created_at", "expression", "id", "image_id", "pose", "updated_at", "user_prompt" FROM "generations"; +DROP TABLE "generations"; +ALTER TABLE "new_generations" RENAME TO "generations"; +PRAGMA foreign_keys=ON; +PRAGMA defer_foreign_keys=OFF; diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 2cbe3a1..e09cbc4 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -65,19 +65,21 @@ model Equipment { } model Generation { - id String @id @default(ulid()) - characterId String @map("character_id") - imageId String @map("image_id") - userPrompt String? @map("user_prompt") - pose String? - expression String? - createdAt DateTime @default(now()) @map("created_at") - updatedAt DateTime @updatedAt @map("updated_at") + id String @id @default(ulid()) + characterId String @map("character_id") + imageId String @map("image_id") + userPrompt String? @map("user_prompt") + poseId String? @map("pose") + expressionId String? @map("expression") + createdAt DateTime @default(now()) @map("created_at") + updatedAt DateTime @updatedAt @map("updated_at") // Relations - character Character @relation(fields: [characterId], references: [id]) - image Asset @relation(fields: [imageId], references: [id]) - equipments GenerationEquipment[] + character Character @relation(fields: [characterId], references: [id]) + image Asset @relation(fields: [imageId], references: [id]) + pose Pose? @relation(fields: [poseId], references: [id]) + expression Expression? @relation(fields: [expressionId], references: [id]) + equipments GenerationEquipment[] @@map("generations") } @@ -135,7 +137,8 @@ model Pose { updatedAt DateTime @updatedAt @map("updated_at") // Relations - image Asset @relation(fields: [imageId], references: [id]) + image Asset @relation(fields: [imageId], references: [id]) + generations Generation[] @@map("poses") } @@ -148,7 +151,8 @@ model Expression { updatedAt DateTime @updatedAt @map("updated_at") // Relations - image Asset @relation(fields: [imageId], references: [id]) + image Asset @relation(fields: [imageId], references: [id]) + generations Generation[] @@map("expressions") } diff --git a/src/generated/prisma/internal/class.ts b/src/generated/prisma/internal/class.ts index f819325..92124cb 100644 --- a/src/generated/prisma/internal/class.ts +++ b/src/generated/prisma/internal/class.ts @@ -20,7 +20,7 @@ const config: runtime.GetPrismaClientConfig = { "clientVersion": "7.3.0", "engineVersion": "9d6ad21cbbceab97458517b147a6a09ff43aa735", "activeProvider": "sqlite", - "inlineSchema": "// This is your Prisma schema file,\n// learn more about it in the docs: https://pris.ly/d/prisma-schema\n\ngenerator client {\n provider = \"prisma-client\"\n output = \"../src/generated/prisma\"\n binaryTargets = [\"native\", \"linux-musl-openssl-3.0.x\"]\n engineType = \"client\"\n runtime = \"bun\"\n}\n\ndatasource db {\n provider = \"sqlite\"\n}\n\nmodel Asset {\n id String @id @default(ulid())\n name String\n type String\n path String\n createdAt DateTime @default(now()) @map(\"created_at\")\n updatedAt DateTime @updatedAt @map(\"updated_at\")\n\n // Relations\n characters Character[]\n equipments Equipment[]\n generations Generation[]\n poses Pose[]\n expressions Expression[]\n\n @@map(\"assets\")\n}\n\nmodel Character {\n id String @id @default(ulid())\n name String\n description String?\n imageId String @map(\"image_id\")\n createdAt DateTime @default(now()) @map(\"created_at\")\n updatedAt DateTime @updatedAt @map(\"updated_at\")\n\n // Relations\n image Asset @relation(fields: [imageId], references: [id])\n generations Generation[]\n\n @@map(\"characters\")\n}\n\nmodel Equipment {\n id String @id @default(ulid())\n name String\n description String\n category String\n imageId String @map(\"image_id\")\n createdAt DateTime @default(now()) @map(\"created_at\")\n updatedAt DateTime @updatedAt @map(\"updated_at\")\n\n // Relations\n image Asset @relation(fields: [imageId], references: [id])\n generations GenerationEquipment[]\n outfits OutfitEquipment[]\n\n @@index([category])\n @@map(\"equipments\")\n}\n\nmodel Generation {\n id String @id @default(ulid())\n characterId String @map(\"character_id\")\n imageId String @map(\"image_id\")\n userPrompt String? @map(\"user_prompt\")\n pose String?\n expression String?\n createdAt DateTime @default(now()) @map(\"created_at\")\n updatedAt DateTime @updatedAt @map(\"updated_at\")\n\n // Relations\n character Character @relation(fields: [characterId], references: [id])\n image Asset @relation(fields: [imageId], references: [id])\n equipments GenerationEquipment[]\n\n @@map(\"generations\")\n}\n\nmodel GenerationEquipment {\n generationId String @map(\"generation_id\")\n equipmentId String @map(\"equipment_id\")\n\n generation Generation @relation(fields: [generationId], references: [id])\n equipment Equipment @relation(fields: [equipmentId], references: [id])\n\n @@id([generationId, equipmentId])\n @@map(\"generation_equipments\")\n}\n\nmodel Outfit {\n id String @id @default(ulid())\n name String\n prompt String?\n createdAt DateTime @default(now()) @map(\"created_at\")\n updatedAt DateTime @updatedAt @map(\"updated_at\")\n\n // Relations\n equipments OutfitEquipment[]\n\n @@map(\"outfits\")\n}\n\nmodel OutfitEquipment {\n outfitId String @map(\"outfit_id\")\n equipmentId String @map(\"equipment_id\")\n\n outfit Outfit @relation(fields: [outfitId], references: [id], onDelete: Cascade)\n equipment Equipment @relation(fields: [equipmentId], references: [id], onDelete: Cascade)\n\n @@id([outfitId, equipmentId])\n @@map(\"outfit_equipments\")\n}\n\nmodel Setting {\n key String @id\n value String\n\n createdAt DateTime @default(now()) @map(\"created_at\")\n updatedAt DateTime @updatedAt @map(\"updated_at\")\n\n @@map(\"settings\")\n}\n\nmodel Pose {\n id String @id @default(ulid())\n name String\n imageId String @map(\"image_id\")\n createdAt DateTime @default(now()) @map(\"created_at\")\n updatedAt DateTime @updatedAt @map(\"updated_at\")\n\n // Relations\n image Asset @relation(fields: [imageId], references: [id])\n\n @@map(\"poses\")\n}\n\nmodel Expression {\n id String @id @default(ulid())\n name String\n imageId String @map(\"image_id\")\n createdAt DateTime @default(now()) @map(\"created_at\")\n updatedAt DateTime @updatedAt @map(\"updated_at\")\n\n // Relations\n image Asset @relation(fields: [imageId], references: [id])\n\n @@map(\"expressions\")\n}\n", + "inlineSchema": "// This is your Prisma schema file,\n// learn more about it in the docs: https://pris.ly/d/prisma-schema\n\ngenerator client {\n provider = \"prisma-client\"\n output = \"../src/generated/prisma\"\n binaryTargets = [\"native\", \"linux-musl-openssl-3.0.x\"]\n engineType = \"client\"\n runtime = \"bun\"\n}\n\ndatasource db {\n provider = \"sqlite\"\n}\n\nmodel Asset {\n id String @id @default(ulid())\n name String\n type String\n path String\n createdAt DateTime @default(now()) @map(\"created_at\")\n updatedAt DateTime @updatedAt @map(\"updated_at\")\n\n // Relations\n characters Character[]\n equipments Equipment[]\n generations Generation[]\n poses Pose[]\n expressions Expression[]\n\n @@map(\"assets\")\n}\n\nmodel Character {\n id String @id @default(ulid())\n name String\n description String?\n imageId String @map(\"image_id\")\n createdAt DateTime @default(now()) @map(\"created_at\")\n updatedAt DateTime @updatedAt @map(\"updated_at\")\n\n // Relations\n image Asset @relation(fields: [imageId], references: [id])\n generations Generation[]\n\n @@map(\"characters\")\n}\n\nmodel Equipment {\n id String @id @default(ulid())\n name String\n description String\n category String\n imageId String @map(\"image_id\")\n createdAt DateTime @default(now()) @map(\"created_at\")\n updatedAt DateTime @updatedAt @map(\"updated_at\")\n\n // Relations\n image Asset @relation(fields: [imageId], references: [id])\n generations GenerationEquipment[]\n outfits OutfitEquipment[]\n\n @@index([category])\n @@map(\"equipments\")\n}\n\nmodel Generation {\n id String @id @default(ulid())\n characterId String @map(\"character_id\")\n imageId String @map(\"image_id\")\n userPrompt String? @map(\"user_prompt\")\n poseId String? @map(\"pose\")\n expressionId String? @map(\"expression\")\n createdAt DateTime @default(now()) @map(\"created_at\")\n updatedAt DateTime @updatedAt @map(\"updated_at\")\n\n // Relations\n character Character @relation(fields: [characterId], references: [id])\n image Asset @relation(fields: [imageId], references: [id])\n pose Pose? @relation(fields: [poseId], references: [id])\n expression Expression? @relation(fields: [expressionId], references: [id])\n equipments GenerationEquipment[]\n\n @@map(\"generations\")\n}\n\nmodel GenerationEquipment {\n generationId String @map(\"generation_id\")\n equipmentId String @map(\"equipment_id\")\n\n generation Generation @relation(fields: [generationId], references: [id])\n equipment Equipment @relation(fields: [equipmentId], references: [id])\n\n @@id([generationId, equipmentId])\n @@map(\"generation_equipments\")\n}\n\nmodel Outfit {\n id String @id @default(ulid())\n name String\n prompt String?\n createdAt DateTime @default(now()) @map(\"created_at\")\n updatedAt DateTime @updatedAt @map(\"updated_at\")\n\n // Relations\n equipments OutfitEquipment[]\n\n @@map(\"outfits\")\n}\n\nmodel OutfitEquipment {\n outfitId String @map(\"outfit_id\")\n equipmentId String @map(\"equipment_id\")\n\n outfit Outfit @relation(fields: [outfitId], references: [id], onDelete: Cascade)\n equipment Equipment @relation(fields: [equipmentId], references: [id], onDelete: Cascade)\n\n @@id([outfitId, equipmentId])\n @@map(\"outfit_equipments\")\n}\n\nmodel Setting {\n key String @id\n value String\n\n createdAt DateTime @default(now()) @map(\"created_at\")\n updatedAt DateTime @updatedAt @map(\"updated_at\")\n\n @@map(\"settings\")\n}\n\nmodel Pose {\n id String @id @default(ulid())\n name String\n imageId String @map(\"image_id\")\n createdAt DateTime @default(now()) @map(\"created_at\")\n updatedAt DateTime @updatedAt @map(\"updated_at\")\n\n // Relations\n image Asset @relation(fields: [imageId], references: [id])\n generations Generation[]\n\n @@map(\"poses\")\n}\n\nmodel Expression {\n id String @id @default(ulid())\n name String\n imageId String @map(\"image_id\")\n createdAt DateTime @default(now()) @map(\"created_at\")\n updatedAt DateTime @updatedAt @map(\"updated_at\")\n\n // Relations\n image Asset @relation(fields: [imageId], references: [id])\n generations Generation[]\n\n @@map(\"expressions\")\n}\n", "runtimeDataModel": { "models": {}, "enums": {}, @@ -28,7 +28,7 @@ const config: runtime.GetPrismaClientConfig = { } } -config.runtimeDataModel = JSON.parse("{\"models\":{\"Asset\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"type\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"path\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"created_at\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"updated_at\"},{\"name\":\"characters\",\"kind\":\"object\",\"type\":\"Character\",\"relationName\":\"AssetToCharacter\"},{\"name\":\"equipments\",\"kind\":\"object\",\"type\":\"Equipment\",\"relationName\":\"AssetToEquipment\"},{\"name\":\"generations\",\"kind\":\"object\",\"type\":\"Generation\",\"relationName\":\"AssetToGeneration\"},{\"name\":\"poses\",\"kind\":\"object\",\"type\":\"Pose\",\"relationName\":\"AssetToPose\"},{\"name\":\"expressions\",\"kind\":\"object\",\"type\":\"Expression\",\"relationName\":\"AssetToExpression\"}],\"dbName\":\"assets\"},\"Character\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"imageId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"image_id\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"created_at\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"updated_at\"},{\"name\":\"image\",\"kind\":\"object\",\"type\":\"Asset\",\"relationName\":\"AssetToCharacter\"},{\"name\":\"generations\",\"kind\":\"object\",\"type\":\"Generation\",\"relationName\":\"CharacterToGeneration\"}],\"dbName\":\"characters\"},\"Equipment\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"category\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"imageId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"image_id\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"created_at\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"updated_at\"},{\"name\":\"image\",\"kind\":\"object\",\"type\":\"Asset\",\"relationName\":\"AssetToEquipment\"},{\"name\":\"generations\",\"kind\":\"object\",\"type\":\"GenerationEquipment\",\"relationName\":\"EquipmentToGenerationEquipment\"},{\"name\":\"outfits\",\"kind\":\"object\",\"type\":\"OutfitEquipment\",\"relationName\":\"EquipmentToOutfitEquipment\"}],\"dbName\":\"equipments\"},\"Generation\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"characterId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"character_id\"},{\"name\":\"imageId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"image_id\"},{\"name\":\"userPrompt\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"user_prompt\"},{\"name\":\"pose\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"expression\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"created_at\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"updated_at\"},{\"name\":\"character\",\"kind\":\"object\",\"type\":\"Character\",\"relationName\":\"CharacterToGeneration\"},{\"name\":\"image\",\"kind\":\"object\",\"type\":\"Asset\",\"relationName\":\"AssetToGeneration\"},{\"name\":\"equipments\",\"kind\":\"object\",\"type\":\"GenerationEquipment\",\"relationName\":\"GenerationToGenerationEquipment\"}],\"dbName\":\"generations\"},\"GenerationEquipment\":{\"fields\":[{\"name\":\"generationId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"generation_id\"},{\"name\":\"equipmentId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"equipment_id\"},{\"name\":\"generation\",\"kind\":\"object\",\"type\":\"Generation\",\"relationName\":\"GenerationToGenerationEquipment\"},{\"name\":\"equipment\",\"kind\":\"object\",\"type\":\"Equipment\",\"relationName\":\"EquipmentToGenerationEquipment\"}],\"dbName\":\"generation_equipments\"},\"Outfit\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"prompt\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"created_at\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"updated_at\"},{\"name\":\"equipments\",\"kind\":\"object\",\"type\":\"OutfitEquipment\",\"relationName\":\"OutfitToOutfitEquipment\"}],\"dbName\":\"outfits\"},\"OutfitEquipment\":{\"fields\":[{\"name\":\"outfitId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"outfit_id\"},{\"name\":\"equipmentId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"equipment_id\"},{\"name\":\"outfit\",\"kind\":\"object\",\"type\":\"Outfit\",\"relationName\":\"OutfitToOutfitEquipment\"},{\"name\":\"equipment\",\"kind\":\"object\",\"type\":\"Equipment\",\"relationName\":\"EquipmentToOutfitEquipment\"}],\"dbName\":\"outfit_equipments\"},\"Setting\":{\"fields\":[{\"name\":\"key\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"value\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"created_at\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"updated_at\"}],\"dbName\":\"settings\"},\"Pose\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"imageId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"image_id\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"created_at\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"updated_at\"},{\"name\":\"image\",\"kind\":\"object\",\"type\":\"Asset\",\"relationName\":\"AssetToPose\"}],\"dbName\":\"poses\"},\"Expression\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"imageId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"image_id\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"created_at\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"updated_at\"},{\"name\":\"image\",\"kind\":\"object\",\"type\":\"Asset\",\"relationName\":\"AssetToExpression\"}],\"dbName\":\"expressions\"}},\"enums\":{},\"types\":{}}") +config.runtimeDataModel = JSON.parse("{\"models\":{\"Asset\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"type\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"path\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"created_at\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"updated_at\"},{\"name\":\"characters\",\"kind\":\"object\",\"type\":\"Character\",\"relationName\":\"AssetToCharacter\"},{\"name\":\"equipments\",\"kind\":\"object\",\"type\":\"Equipment\",\"relationName\":\"AssetToEquipment\"},{\"name\":\"generations\",\"kind\":\"object\",\"type\":\"Generation\",\"relationName\":\"AssetToGeneration\"},{\"name\":\"poses\",\"kind\":\"object\",\"type\":\"Pose\",\"relationName\":\"AssetToPose\"},{\"name\":\"expressions\",\"kind\":\"object\",\"type\":\"Expression\",\"relationName\":\"AssetToExpression\"}],\"dbName\":\"assets\"},\"Character\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"imageId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"image_id\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"created_at\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"updated_at\"},{\"name\":\"image\",\"kind\":\"object\",\"type\":\"Asset\",\"relationName\":\"AssetToCharacter\"},{\"name\":\"generations\",\"kind\":\"object\",\"type\":\"Generation\",\"relationName\":\"CharacterToGeneration\"}],\"dbName\":\"characters\"},\"Equipment\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"category\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"imageId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"image_id\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"created_at\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"updated_at\"},{\"name\":\"image\",\"kind\":\"object\",\"type\":\"Asset\",\"relationName\":\"AssetToEquipment\"},{\"name\":\"generations\",\"kind\":\"object\",\"type\":\"GenerationEquipment\",\"relationName\":\"EquipmentToGenerationEquipment\"},{\"name\":\"outfits\",\"kind\":\"object\",\"type\":\"OutfitEquipment\",\"relationName\":\"EquipmentToOutfitEquipment\"}],\"dbName\":\"equipments\"},\"Generation\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"characterId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"character_id\"},{\"name\":\"imageId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"image_id\"},{\"name\":\"userPrompt\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"user_prompt\"},{\"name\":\"poseId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"pose\"},{\"name\":\"expressionId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"expression\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"created_at\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"updated_at\"},{\"name\":\"character\",\"kind\":\"object\",\"type\":\"Character\",\"relationName\":\"CharacterToGeneration\"},{\"name\":\"image\",\"kind\":\"object\",\"type\":\"Asset\",\"relationName\":\"AssetToGeneration\"},{\"name\":\"pose\",\"kind\":\"object\",\"type\":\"Pose\",\"relationName\":\"GenerationToPose\"},{\"name\":\"expression\",\"kind\":\"object\",\"type\":\"Expression\",\"relationName\":\"ExpressionToGeneration\"},{\"name\":\"equipments\",\"kind\":\"object\",\"type\":\"GenerationEquipment\",\"relationName\":\"GenerationToGenerationEquipment\"}],\"dbName\":\"generations\"},\"GenerationEquipment\":{\"fields\":[{\"name\":\"generationId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"generation_id\"},{\"name\":\"equipmentId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"equipment_id\"},{\"name\":\"generation\",\"kind\":\"object\",\"type\":\"Generation\",\"relationName\":\"GenerationToGenerationEquipment\"},{\"name\":\"equipment\",\"kind\":\"object\",\"type\":\"Equipment\",\"relationName\":\"EquipmentToGenerationEquipment\"}],\"dbName\":\"generation_equipments\"},\"Outfit\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"prompt\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"created_at\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"updated_at\"},{\"name\":\"equipments\",\"kind\":\"object\",\"type\":\"OutfitEquipment\",\"relationName\":\"OutfitToOutfitEquipment\"}],\"dbName\":\"outfits\"},\"OutfitEquipment\":{\"fields\":[{\"name\":\"outfitId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"outfit_id\"},{\"name\":\"equipmentId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"equipment_id\"},{\"name\":\"outfit\",\"kind\":\"object\",\"type\":\"Outfit\",\"relationName\":\"OutfitToOutfitEquipment\"},{\"name\":\"equipment\",\"kind\":\"object\",\"type\":\"Equipment\",\"relationName\":\"EquipmentToOutfitEquipment\"}],\"dbName\":\"outfit_equipments\"},\"Setting\":{\"fields\":[{\"name\":\"key\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"value\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"created_at\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"updated_at\"}],\"dbName\":\"settings\"},\"Pose\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"imageId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"image_id\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"created_at\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"updated_at\"},{\"name\":\"image\",\"kind\":\"object\",\"type\":\"Asset\",\"relationName\":\"AssetToPose\"},{\"name\":\"generations\",\"kind\":\"object\",\"type\":\"Generation\",\"relationName\":\"GenerationToPose\"}],\"dbName\":\"poses\"},\"Expression\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"imageId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"image_id\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"created_at\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"updated_at\"},{\"name\":\"image\",\"kind\":\"object\",\"type\":\"Asset\",\"relationName\":\"AssetToExpression\"},{\"name\":\"generations\",\"kind\":\"object\",\"type\":\"Generation\",\"relationName\":\"ExpressionToGeneration\"}],\"dbName\":\"expressions\"}},\"enums\":{},\"types\":{}}") async function decodeBase64AsWasm(wasmBase64: string): Promise { const { Buffer } = await import('node:buffer') diff --git a/src/generated/prisma/internal/prismaNamespace.ts b/src/generated/prisma/internal/prismaNamespace.ts index 079f8d5..5958d31 100644 --- a/src/generated/prisma/internal/prismaNamespace.ts +++ b/src/generated/prisma/internal/prismaNamespace.ts @@ -1231,8 +1231,8 @@ export const GenerationScalarFieldEnum = { characterId: 'characterId', imageId: 'imageId', userPrompt: 'userPrompt', - pose: 'pose', - expression: 'expression', + poseId: 'poseId', + expressionId: 'expressionId', createdAt: 'createdAt', updatedAt: 'updatedAt' } as const diff --git a/src/generated/prisma/internal/prismaNamespaceBrowser.ts b/src/generated/prisma/internal/prismaNamespaceBrowser.ts index caee60a..c9e634c 100644 --- a/src/generated/prisma/internal/prismaNamespaceBrowser.ts +++ b/src/generated/prisma/internal/prismaNamespaceBrowser.ts @@ -118,8 +118,8 @@ export const GenerationScalarFieldEnum = { characterId: 'characterId', imageId: 'imageId', userPrompt: 'userPrompt', - pose: 'pose', - expression: 'expression', + poseId: 'poseId', + expressionId: 'expressionId', createdAt: 'createdAt', updatedAt: 'updatedAt' } as const diff --git a/src/generated/prisma/models/Expression.ts b/src/generated/prisma/models/Expression.ts index bf24d31..01d3f99 100644 --- a/src/generated/prisma/models/Expression.ts +++ b/src/generated/prisma/models/Expression.ts @@ -183,6 +183,7 @@ export type ExpressionWhereInput = { createdAt?: Prisma.DateTimeFilter<"Expression"> | Date | string updatedAt?: Prisma.DateTimeFilter<"Expression"> | Date | string image?: Prisma.XOR + generations?: Prisma.GenerationListRelationFilter } export type ExpressionOrderByWithRelationInput = { @@ -192,6 +193,7 @@ export type ExpressionOrderByWithRelationInput = { createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder image?: Prisma.AssetOrderByWithRelationInput + generations?: Prisma.GenerationOrderByRelationAggregateInput } export type ExpressionWhereUniqueInput = Prisma.AtLeast<{ @@ -204,6 +206,7 @@ export type ExpressionWhereUniqueInput = Prisma.AtLeast<{ createdAt?: Prisma.DateTimeFilter<"Expression"> | Date | string updatedAt?: Prisma.DateTimeFilter<"Expression"> | Date | string image?: Prisma.XOR + generations?: Prisma.GenerationListRelationFilter }, "id"> export type ExpressionOrderByWithAggregationInput = { @@ -234,6 +237,7 @@ export type ExpressionCreateInput = { createdAt?: Date | string updatedAt?: Date | string image: Prisma.AssetCreateNestedOneWithoutExpressionsInput + generations?: Prisma.GenerationCreateNestedManyWithoutExpressionInput } export type ExpressionUncheckedCreateInput = { @@ -242,6 +246,7 @@ export type ExpressionUncheckedCreateInput = { imageId: string createdAt?: Date | string updatedAt?: Date | string + generations?: Prisma.GenerationUncheckedCreateNestedManyWithoutExpressionInput } export type ExpressionUpdateInput = { @@ -250,6 +255,7 @@ export type ExpressionUpdateInput = { createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string image?: Prisma.AssetUpdateOneRequiredWithoutExpressionsNestedInput + generations?: Prisma.GenerationUpdateManyWithoutExpressionNestedInput } export type ExpressionUncheckedUpdateInput = { @@ -258,6 +264,7 @@ export type ExpressionUncheckedUpdateInput = { imageId?: Prisma.StringFieldUpdateOperationsInput | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + generations?: Prisma.GenerationUncheckedUpdateManyWithoutExpressionNestedInput } export type ExpressionCreateManyInput = { @@ -293,6 +300,11 @@ export type ExpressionOrderByRelationAggregateInput = { _count?: Prisma.SortOrder } +export type ExpressionNullableScalarRelationFilter = { + is?: Prisma.ExpressionWhereInput | null + isNot?: Prisma.ExpressionWhereInput | null +} + export type ExpressionCountOrderByAggregateInput = { id?: Prisma.SortOrder name?: Prisma.SortOrder @@ -359,11 +371,28 @@ export type ExpressionUncheckedUpdateManyWithoutImageNestedInput = { deleteMany?: Prisma.ExpressionScalarWhereInput | Prisma.ExpressionScalarWhereInput[] } +export type ExpressionCreateNestedOneWithoutGenerationsInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.ExpressionCreateOrConnectWithoutGenerationsInput + connect?: Prisma.ExpressionWhereUniqueInput +} + +export type ExpressionUpdateOneWithoutGenerationsNestedInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.ExpressionCreateOrConnectWithoutGenerationsInput + upsert?: Prisma.ExpressionUpsertWithoutGenerationsInput + disconnect?: Prisma.ExpressionWhereInput | boolean + delete?: Prisma.ExpressionWhereInput | boolean + connect?: Prisma.ExpressionWhereUniqueInput + update?: Prisma.XOR, Prisma.ExpressionUncheckedUpdateWithoutGenerationsInput> +} + export type ExpressionCreateWithoutImageInput = { id?: string name: string createdAt?: Date | string updatedAt?: Date | string + generations?: Prisma.GenerationCreateNestedManyWithoutExpressionInput } export type ExpressionUncheckedCreateWithoutImageInput = { @@ -371,6 +400,7 @@ export type ExpressionUncheckedCreateWithoutImageInput = { name: string createdAt?: Date | string updatedAt?: Date | string + generations?: Prisma.GenerationUncheckedCreateNestedManyWithoutExpressionInput } export type ExpressionCreateOrConnectWithoutImageInput = { @@ -409,6 +439,54 @@ export type ExpressionScalarWhereInput = { updatedAt?: Prisma.DateTimeFilter<"Expression"> | Date | string } +export type ExpressionCreateWithoutGenerationsInput = { + id?: string + name: string + createdAt?: Date | string + updatedAt?: Date | string + image: Prisma.AssetCreateNestedOneWithoutExpressionsInput +} + +export type ExpressionUncheckedCreateWithoutGenerationsInput = { + id?: string + name: string + imageId: string + createdAt?: Date | string + updatedAt?: Date | string +} + +export type ExpressionCreateOrConnectWithoutGenerationsInput = { + where: Prisma.ExpressionWhereUniqueInput + create: Prisma.XOR +} + +export type ExpressionUpsertWithoutGenerationsInput = { + update: Prisma.XOR + create: Prisma.XOR + where?: Prisma.ExpressionWhereInput +} + +export type ExpressionUpdateToOneWithWhereWithoutGenerationsInput = { + where?: Prisma.ExpressionWhereInput + data: Prisma.XOR +} + +export type ExpressionUpdateWithoutGenerationsInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + image?: Prisma.AssetUpdateOneRequiredWithoutExpressionsNestedInput +} + +export type ExpressionUncheckedUpdateWithoutGenerationsInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + imageId?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + export type ExpressionCreateManyImageInput = { id?: string name: string @@ -421,6 +499,7 @@ export type ExpressionUpdateWithoutImageInput = { name?: Prisma.StringFieldUpdateOperationsInput | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + generations?: Prisma.GenerationUpdateManyWithoutExpressionNestedInput } export type ExpressionUncheckedUpdateWithoutImageInput = { @@ -428,6 +507,7 @@ export type ExpressionUncheckedUpdateWithoutImageInput = { name?: Prisma.StringFieldUpdateOperationsInput | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + generations?: Prisma.GenerationUncheckedUpdateManyWithoutExpressionNestedInput } export type ExpressionUncheckedUpdateManyWithoutImageInput = { @@ -438,6 +518,35 @@ export type ExpressionUncheckedUpdateManyWithoutImageInput = { } +/** + * Count Type ExpressionCountOutputType + */ + +export type ExpressionCountOutputType = { + generations: number +} + +export type ExpressionCountOutputTypeSelect = { + generations?: boolean | ExpressionCountOutputTypeCountGenerationsArgs +} + +/** + * ExpressionCountOutputType without action + */ +export type ExpressionCountOutputTypeDefaultArgs = { + /** + * Select specific fields to fetch from the ExpressionCountOutputType + */ + select?: Prisma.ExpressionCountOutputTypeSelect | null +} + +/** + * ExpressionCountOutputType without action + */ +export type ExpressionCountOutputTypeCountGenerationsArgs = { + where?: Prisma.GenerationWhereInput +} + export type ExpressionSelect = runtime.Types.Extensions.GetSelect<{ id?: boolean @@ -446,6 +555,8 @@ export type ExpressionSelect + generations?: boolean | Prisma.Expression$generationsArgs + _count?: boolean | Prisma.ExpressionCountOutputTypeDefaultArgs }, ExtArgs["result"]["expression"]> export type ExpressionSelectCreateManyAndReturn = runtime.Types.Extensions.GetSelect<{ @@ -477,6 +588,8 @@ export type ExpressionSelectScalar = { export type ExpressionOmit = runtime.Types.Extensions.GetOmit<"id" | "name" | "imageId" | "createdAt" | "updatedAt", ExtArgs["result"]["expression"]> export type ExpressionInclude = { image?: boolean | Prisma.AssetDefaultArgs + generations?: boolean | Prisma.Expression$generationsArgs + _count?: boolean | Prisma.ExpressionCountOutputTypeDefaultArgs } export type ExpressionIncludeCreateManyAndReturn = { image?: boolean | Prisma.AssetDefaultArgs @@ -489,6 +602,7 @@ export type $ExpressionPayload + generations: Prisma.$GenerationPayload[] } scalars: runtime.Types.Extensions.GetPayloadResult<{ id: string @@ -891,6 +1005,7 @@ readonly fields: ExpressionFieldRefs; export interface Prisma__ExpressionClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: "PrismaPromise" image = {}>(args?: Prisma.Subset>): Prisma.Prisma__AssetClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + generations = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> /** * Attaches callbacks for the resolution and/or rejection of the Promise. * @param onfulfilled The callback to execute when the Promise is resolved. @@ -1318,6 +1433,30 @@ export type ExpressionDeleteManyArgs = { + /** + * Select specific fields to fetch from the Generation + */ + select?: Prisma.GenerationSelect | null + /** + * Omit specific fields from the Generation + */ + omit?: Prisma.GenerationOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GenerationInclude | null + where?: Prisma.GenerationWhereInput + orderBy?: Prisma.GenerationOrderByWithRelationInput | Prisma.GenerationOrderByWithRelationInput[] + cursor?: Prisma.GenerationWhereUniqueInput + take?: number + skip?: number + distinct?: Prisma.GenerationScalarFieldEnum | Prisma.GenerationScalarFieldEnum[] +} + /** * Expression without action */ diff --git a/src/generated/prisma/models/Generation.ts b/src/generated/prisma/models/Generation.ts index 464b34e..5d8499f 100644 --- a/src/generated/prisma/models/Generation.ts +++ b/src/generated/prisma/models/Generation.ts @@ -29,8 +29,8 @@ export type GenerationMinAggregateOutputType = { characterId: string | null imageId: string | null userPrompt: string | null - pose: string | null - expression: string | null + poseId: string | null + expressionId: string | null createdAt: Date | null updatedAt: Date | null } @@ -40,8 +40,8 @@ export type GenerationMaxAggregateOutputType = { characterId: string | null imageId: string | null userPrompt: string | null - pose: string | null - expression: string | null + poseId: string | null + expressionId: string | null createdAt: Date | null updatedAt: Date | null } @@ -51,8 +51,8 @@ export type GenerationCountAggregateOutputType = { characterId: number imageId: number userPrompt: number - pose: number - expression: number + poseId: number + expressionId: number createdAt: number updatedAt: number _all: number @@ -64,8 +64,8 @@ export type GenerationMinAggregateInputType = { characterId?: true imageId?: true userPrompt?: true - pose?: true - expression?: true + poseId?: true + expressionId?: true createdAt?: true updatedAt?: true } @@ -75,8 +75,8 @@ export type GenerationMaxAggregateInputType = { characterId?: true imageId?: true userPrompt?: true - pose?: true - expression?: true + poseId?: true + expressionId?: true createdAt?: true updatedAt?: true } @@ -86,8 +86,8 @@ export type GenerationCountAggregateInputType = { characterId?: true imageId?: true userPrompt?: true - pose?: true - expression?: true + poseId?: true + expressionId?: true createdAt?: true updatedAt?: true _all?: true @@ -170,8 +170,8 @@ export type GenerationGroupByOutputType = { characterId: string imageId: string userPrompt: string | null - pose: string | null - expression: string | null + poseId: string | null + expressionId: string | null createdAt: Date updatedAt: Date _count: GenerationCountAggregateOutputType | null @@ -202,12 +202,14 @@ export type GenerationWhereInput = { characterId?: Prisma.StringFilter<"Generation"> | string imageId?: Prisma.StringFilter<"Generation"> | string userPrompt?: Prisma.StringNullableFilter<"Generation"> | string | null - pose?: Prisma.StringNullableFilter<"Generation"> | string | null - expression?: Prisma.StringNullableFilter<"Generation"> | string | null + poseId?: Prisma.StringNullableFilter<"Generation"> | string | null + expressionId?: Prisma.StringNullableFilter<"Generation"> | string | null createdAt?: Prisma.DateTimeFilter<"Generation"> | Date | string updatedAt?: Prisma.DateTimeFilter<"Generation"> | Date | string character?: Prisma.XOR image?: Prisma.XOR + pose?: Prisma.XOR | null + expression?: Prisma.XOR | null equipments?: Prisma.GenerationEquipmentListRelationFilter } @@ -216,12 +218,14 @@ export type GenerationOrderByWithRelationInput = { characterId?: Prisma.SortOrder imageId?: Prisma.SortOrder userPrompt?: Prisma.SortOrderInput | Prisma.SortOrder - pose?: Prisma.SortOrderInput | Prisma.SortOrder - expression?: Prisma.SortOrderInput | Prisma.SortOrder + poseId?: Prisma.SortOrderInput | Prisma.SortOrder + expressionId?: Prisma.SortOrderInput | Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder character?: Prisma.CharacterOrderByWithRelationInput image?: Prisma.AssetOrderByWithRelationInput + pose?: Prisma.PoseOrderByWithRelationInput + expression?: Prisma.ExpressionOrderByWithRelationInput equipments?: Prisma.GenerationEquipmentOrderByRelationAggregateInput } @@ -233,12 +237,14 @@ export type GenerationWhereUniqueInput = Prisma.AtLeast<{ characterId?: Prisma.StringFilter<"Generation"> | string imageId?: Prisma.StringFilter<"Generation"> | string userPrompt?: Prisma.StringNullableFilter<"Generation"> | string | null - pose?: Prisma.StringNullableFilter<"Generation"> | string | null - expression?: Prisma.StringNullableFilter<"Generation"> | string | null + poseId?: Prisma.StringNullableFilter<"Generation"> | string | null + expressionId?: Prisma.StringNullableFilter<"Generation"> | string | null createdAt?: Prisma.DateTimeFilter<"Generation"> | Date | string updatedAt?: Prisma.DateTimeFilter<"Generation"> | Date | string character?: Prisma.XOR image?: Prisma.XOR + pose?: Prisma.XOR | null + expression?: Prisma.XOR | null equipments?: Prisma.GenerationEquipmentListRelationFilter }, "id"> @@ -247,8 +253,8 @@ export type GenerationOrderByWithAggregationInput = { characterId?: Prisma.SortOrder imageId?: Prisma.SortOrder userPrompt?: Prisma.SortOrderInput | Prisma.SortOrder - pose?: Prisma.SortOrderInput | Prisma.SortOrder - expression?: Prisma.SortOrderInput | Prisma.SortOrder + poseId?: Prisma.SortOrderInput | Prisma.SortOrder + expressionId?: Prisma.SortOrderInput | Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder _count?: Prisma.GenerationCountOrderByAggregateInput @@ -264,8 +270,8 @@ export type GenerationScalarWhereWithAggregatesInput = { characterId?: Prisma.StringWithAggregatesFilter<"Generation"> | string imageId?: Prisma.StringWithAggregatesFilter<"Generation"> | string userPrompt?: Prisma.StringNullableWithAggregatesFilter<"Generation"> | string | null - pose?: Prisma.StringNullableWithAggregatesFilter<"Generation"> | string | null - expression?: Prisma.StringNullableWithAggregatesFilter<"Generation"> | string | null + poseId?: Prisma.StringNullableWithAggregatesFilter<"Generation"> | string | null + expressionId?: Prisma.StringNullableWithAggregatesFilter<"Generation"> | string | null createdAt?: Prisma.DateTimeWithAggregatesFilter<"Generation"> | Date | string updatedAt?: Prisma.DateTimeWithAggregatesFilter<"Generation"> | Date | string } @@ -273,12 +279,12 @@ export type GenerationScalarWhereWithAggregatesInput = { export type GenerationCreateInput = { id?: string userPrompt?: string | null - pose?: string | null - expression?: string | null createdAt?: Date | string updatedAt?: Date | string character: Prisma.CharacterCreateNestedOneWithoutGenerationsInput image: Prisma.AssetCreateNestedOneWithoutGenerationsInput + pose?: Prisma.PoseCreateNestedOneWithoutGenerationsInput + expression?: Prisma.ExpressionCreateNestedOneWithoutGenerationsInput equipments?: Prisma.GenerationEquipmentCreateNestedManyWithoutGenerationInput } @@ -287,8 +293,8 @@ export type GenerationUncheckedCreateInput = { characterId: string imageId: string userPrompt?: string | null - pose?: string | null - expression?: string | null + poseId?: string | null + expressionId?: string | null createdAt?: Date | string updatedAt?: Date | string equipments?: Prisma.GenerationEquipmentUncheckedCreateNestedManyWithoutGenerationInput @@ -297,12 +303,12 @@ export type GenerationUncheckedCreateInput = { export type GenerationUpdateInput = { id?: Prisma.StringFieldUpdateOperationsInput | string userPrompt?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - pose?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - expression?: Prisma.NullableStringFieldUpdateOperationsInput | string | null createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string character?: Prisma.CharacterUpdateOneRequiredWithoutGenerationsNestedInput image?: Prisma.AssetUpdateOneRequiredWithoutGenerationsNestedInput + pose?: Prisma.PoseUpdateOneWithoutGenerationsNestedInput + expression?: Prisma.ExpressionUpdateOneWithoutGenerationsNestedInput equipments?: Prisma.GenerationEquipmentUpdateManyWithoutGenerationNestedInput } @@ -311,8 +317,8 @@ export type GenerationUncheckedUpdateInput = { characterId?: Prisma.StringFieldUpdateOperationsInput | string imageId?: Prisma.StringFieldUpdateOperationsInput | string userPrompt?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - pose?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - expression?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + poseId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + expressionId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string equipments?: Prisma.GenerationEquipmentUncheckedUpdateManyWithoutGenerationNestedInput @@ -323,8 +329,8 @@ export type GenerationCreateManyInput = { characterId: string imageId: string userPrompt?: string | null - pose?: string | null - expression?: string | null + poseId?: string | null + expressionId?: string | null createdAt?: Date | string updatedAt?: Date | string } @@ -332,8 +338,6 @@ export type GenerationCreateManyInput = { export type GenerationUpdateManyMutationInput = { id?: Prisma.StringFieldUpdateOperationsInput | string userPrompt?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - pose?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - expression?: Prisma.NullableStringFieldUpdateOperationsInput | string | null createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string } @@ -343,8 +347,8 @@ export type GenerationUncheckedUpdateManyInput = { characterId?: Prisma.StringFieldUpdateOperationsInput | string imageId?: Prisma.StringFieldUpdateOperationsInput | string userPrompt?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - pose?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - expression?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + poseId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + expressionId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string } @@ -364,8 +368,8 @@ export type GenerationCountOrderByAggregateInput = { characterId?: Prisma.SortOrder imageId?: Prisma.SortOrder userPrompt?: Prisma.SortOrder - pose?: Prisma.SortOrder - expression?: Prisma.SortOrder + poseId?: Prisma.SortOrder + expressionId?: Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder } @@ -375,8 +379,8 @@ export type GenerationMaxOrderByAggregateInput = { characterId?: Prisma.SortOrder imageId?: Prisma.SortOrder userPrompt?: Prisma.SortOrder - pose?: Prisma.SortOrder - expression?: Prisma.SortOrder + poseId?: Prisma.SortOrder + expressionId?: Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder } @@ -386,8 +390,8 @@ export type GenerationMinOrderByAggregateInput = { characterId?: Prisma.SortOrder imageId?: Prisma.SortOrder userPrompt?: Prisma.SortOrder - pose?: Prisma.SortOrder - expression?: Prisma.SortOrder + poseId?: Prisma.SortOrder + expressionId?: Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder } @@ -495,14 +499,98 @@ export type GenerationUpdateOneRequiredWithoutEquipmentsNestedInput = { update?: Prisma.XOR, Prisma.GenerationUncheckedUpdateWithoutEquipmentsInput> } +export type GenerationCreateNestedManyWithoutPoseInput = { + create?: Prisma.XOR | Prisma.GenerationCreateWithoutPoseInput[] | Prisma.GenerationUncheckedCreateWithoutPoseInput[] + connectOrCreate?: Prisma.GenerationCreateOrConnectWithoutPoseInput | Prisma.GenerationCreateOrConnectWithoutPoseInput[] + createMany?: Prisma.GenerationCreateManyPoseInputEnvelope + connect?: Prisma.GenerationWhereUniqueInput | Prisma.GenerationWhereUniqueInput[] +} + +export type GenerationUncheckedCreateNestedManyWithoutPoseInput = { + create?: Prisma.XOR | Prisma.GenerationCreateWithoutPoseInput[] | Prisma.GenerationUncheckedCreateWithoutPoseInput[] + connectOrCreate?: Prisma.GenerationCreateOrConnectWithoutPoseInput | Prisma.GenerationCreateOrConnectWithoutPoseInput[] + createMany?: Prisma.GenerationCreateManyPoseInputEnvelope + connect?: Prisma.GenerationWhereUniqueInput | Prisma.GenerationWhereUniqueInput[] +} + +export type GenerationUpdateManyWithoutPoseNestedInput = { + create?: Prisma.XOR | Prisma.GenerationCreateWithoutPoseInput[] | Prisma.GenerationUncheckedCreateWithoutPoseInput[] + connectOrCreate?: Prisma.GenerationCreateOrConnectWithoutPoseInput | Prisma.GenerationCreateOrConnectWithoutPoseInput[] + upsert?: Prisma.GenerationUpsertWithWhereUniqueWithoutPoseInput | Prisma.GenerationUpsertWithWhereUniqueWithoutPoseInput[] + createMany?: Prisma.GenerationCreateManyPoseInputEnvelope + set?: Prisma.GenerationWhereUniqueInput | Prisma.GenerationWhereUniqueInput[] + disconnect?: Prisma.GenerationWhereUniqueInput | Prisma.GenerationWhereUniqueInput[] + delete?: Prisma.GenerationWhereUniqueInput | Prisma.GenerationWhereUniqueInput[] + connect?: Prisma.GenerationWhereUniqueInput | Prisma.GenerationWhereUniqueInput[] + update?: Prisma.GenerationUpdateWithWhereUniqueWithoutPoseInput | Prisma.GenerationUpdateWithWhereUniqueWithoutPoseInput[] + updateMany?: Prisma.GenerationUpdateManyWithWhereWithoutPoseInput | Prisma.GenerationUpdateManyWithWhereWithoutPoseInput[] + deleteMany?: Prisma.GenerationScalarWhereInput | Prisma.GenerationScalarWhereInput[] +} + +export type GenerationUncheckedUpdateManyWithoutPoseNestedInput = { + create?: Prisma.XOR | Prisma.GenerationCreateWithoutPoseInput[] | Prisma.GenerationUncheckedCreateWithoutPoseInput[] + connectOrCreate?: Prisma.GenerationCreateOrConnectWithoutPoseInput | Prisma.GenerationCreateOrConnectWithoutPoseInput[] + upsert?: Prisma.GenerationUpsertWithWhereUniqueWithoutPoseInput | Prisma.GenerationUpsertWithWhereUniqueWithoutPoseInput[] + createMany?: Prisma.GenerationCreateManyPoseInputEnvelope + set?: Prisma.GenerationWhereUniqueInput | Prisma.GenerationWhereUniqueInput[] + disconnect?: Prisma.GenerationWhereUniqueInput | Prisma.GenerationWhereUniqueInput[] + delete?: Prisma.GenerationWhereUniqueInput | Prisma.GenerationWhereUniqueInput[] + connect?: Prisma.GenerationWhereUniqueInput | Prisma.GenerationWhereUniqueInput[] + update?: Prisma.GenerationUpdateWithWhereUniqueWithoutPoseInput | Prisma.GenerationUpdateWithWhereUniqueWithoutPoseInput[] + updateMany?: Prisma.GenerationUpdateManyWithWhereWithoutPoseInput | Prisma.GenerationUpdateManyWithWhereWithoutPoseInput[] + deleteMany?: Prisma.GenerationScalarWhereInput | Prisma.GenerationScalarWhereInput[] +} + +export type GenerationCreateNestedManyWithoutExpressionInput = { + create?: Prisma.XOR | Prisma.GenerationCreateWithoutExpressionInput[] | Prisma.GenerationUncheckedCreateWithoutExpressionInput[] + connectOrCreate?: Prisma.GenerationCreateOrConnectWithoutExpressionInput | Prisma.GenerationCreateOrConnectWithoutExpressionInput[] + createMany?: Prisma.GenerationCreateManyExpressionInputEnvelope + connect?: Prisma.GenerationWhereUniqueInput | Prisma.GenerationWhereUniqueInput[] +} + +export type GenerationUncheckedCreateNestedManyWithoutExpressionInput = { + create?: Prisma.XOR | Prisma.GenerationCreateWithoutExpressionInput[] | Prisma.GenerationUncheckedCreateWithoutExpressionInput[] + connectOrCreate?: Prisma.GenerationCreateOrConnectWithoutExpressionInput | Prisma.GenerationCreateOrConnectWithoutExpressionInput[] + createMany?: Prisma.GenerationCreateManyExpressionInputEnvelope + connect?: Prisma.GenerationWhereUniqueInput | Prisma.GenerationWhereUniqueInput[] +} + +export type GenerationUpdateManyWithoutExpressionNestedInput = { + create?: Prisma.XOR | Prisma.GenerationCreateWithoutExpressionInput[] | Prisma.GenerationUncheckedCreateWithoutExpressionInput[] + connectOrCreate?: Prisma.GenerationCreateOrConnectWithoutExpressionInput | Prisma.GenerationCreateOrConnectWithoutExpressionInput[] + upsert?: Prisma.GenerationUpsertWithWhereUniqueWithoutExpressionInput | Prisma.GenerationUpsertWithWhereUniqueWithoutExpressionInput[] + createMany?: Prisma.GenerationCreateManyExpressionInputEnvelope + set?: Prisma.GenerationWhereUniqueInput | Prisma.GenerationWhereUniqueInput[] + disconnect?: Prisma.GenerationWhereUniqueInput | Prisma.GenerationWhereUniqueInput[] + delete?: Prisma.GenerationWhereUniqueInput | Prisma.GenerationWhereUniqueInput[] + connect?: Prisma.GenerationWhereUniqueInput | Prisma.GenerationWhereUniqueInput[] + update?: Prisma.GenerationUpdateWithWhereUniqueWithoutExpressionInput | Prisma.GenerationUpdateWithWhereUniqueWithoutExpressionInput[] + updateMany?: Prisma.GenerationUpdateManyWithWhereWithoutExpressionInput | Prisma.GenerationUpdateManyWithWhereWithoutExpressionInput[] + deleteMany?: Prisma.GenerationScalarWhereInput | Prisma.GenerationScalarWhereInput[] +} + +export type GenerationUncheckedUpdateManyWithoutExpressionNestedInput = { + create?: Prisma.XOR | Prisma.GenerationCreateWithoutExpressionInput[] | Prisma.GenerationUncheckedCreateWithoutExpressionInput[] + connectOrCreate?: Prisma.GenerationCreateOrConnectWithoutExpressionInput | Prisma.GenerationCreateOrConnectWithoutExpressionInput[] + upsert?: Prisma.GenerationUpsertWithWhereUniqueWithoutExpressionInput | Prisma.GenerationUpsertWithWhereUniqueWithoutExpressionInput[] + createMany?: Prisma.GenerationCreateManyExpressionInputEnvelope + set?: Prisma.GenerationWhereUniqueInput | Prisma.GenerationWhereUniqueInput[] + disconnect?: Prisma.GenerationWhereUniqueInput | Prisma.GenerationWhereUniqueInput[] + delete?: Prisma.GenerationWhereUniqueInput | Prisma.GenerationWhereUniqueInput[] + connect?: Prisma.GenerationWhereUniqueInput | Prisma.GenerationWhereUniqueInput[] + update?: Prisma.GenerationUpdateWithWhereUniqueWithoutExpressionInput | Prisma.GenerationUpdateWithWhereUniqueWithoutExpressionInput[] + updateMany?: Prisma.GenerationUpdateManyWithWhereWithoutExpressionInput | Prisma.GenerationUpdateManyWithWhereWithoutExpressionInput[] + deleteMany?: Prisma.GenerationScalarWhereInput | Prisma.GenerationScalarWhereInput[] +} + export type GenerationCreateWithoutImageInput = { id?: string userPrompt?: string | null - pose?: string | null - expression?: string | null createdAt?: Date | string updatedAt?: Date | string character: Prisma.CharacterCreateNestedOneWithoutGenerationsInput + pose?: Prisma.PoseCreateNestedOneWithoutGenerationsInput + expression?: Prisma.ExpressionCreateNestedOneWithoutGenerationsInput equipments?: Prisma.GenerationEquipmentCreateNestedManyWithoutGenerationInput } @@ -510,8 +598,8 @@ export type GenerationUncheckedCreateWithoutImageInput = { id?: string characterId: string userPrompt?: string | null - pose?: string | null - expression?: string | null + poseId?: string | null + expressionId?: string | null createdAt?: Date | string updatedAt?: Date | string equipments?: Prisma.GenerationEquipmentUncheckedCreateNestedManyWithoutGenerationInput @@ -550,8 +638,8 @@ export type GenerationScalarWhereInput = { characterId?: Prisma.StringFilter<"Generation"> | string imageId?: Prisma.StringFilter<"Generation"> | string userPrompt?: Prisma.StringNullableFilter<"Generation"> | string | null - pose?: Prisma.StringNullableFilter<"Generation"> | string | null - expression?: Prisma.StringNullableFilter<"Generation"> | string | null + poseId?: Prisma.StringNullableFilter<"Generation"> | string | null + expressionId?: Prisma.StringNullableFilter<"Generation"> | string | null createdAt?: Prisma.DateTimeFilter<"Generation"> | Date | string updatedAt?: Prisma.DateTimeFilter<"Generation"> | Date | string } @@ -559,11 +647,11 @@ export type GenerationScalarWhereInput = { export type GenerationCreateWithoutCharacterInput = { id?: string userPrompt?: string | null - pose?: string | null - expression?: string | null createdAt?: Date | string updatedAt?: Date | string image: Prisma.AssetCreateNestedOneWithoutGenerationsInput + pose?: Prisma.PoseCreateNestedOneWithoutGenerationsInput + expression?: Prisma.ExpressionCreateNestedOneWithoutGenerationsInput equipments?: Prisma.GenerationEquipmentCreateNestedManyWithoutGenerationInput } @@ -571,8 +659,8 @@ export type GenerationUncheckedCreateWithoutCharacterInput = { id?: string imageId: string userPrompt?: string | null - pose?: string | null - expression?: string | null + poseId?: string | null + expressionId?: string | null createdAt?: Date | string updatedAt?: Date | string equipments?: Prisma.GenerationEquipmentUncheckedCreateNestedManyWithoutGenerationInput @@ -606,12 +694,12 @@ export type GenerationUpdateManyWithWhereWithoutCharacterInput = { export type GenerationCreateWithoutEquipmentsInput = { id?: string userPrompt?: string | null - pose?: string | null - expression?: string | null createdAt?: Date | string updatedAt?: Date | string character: Prisma.CharacterCreateNestedOneWithoutGenerationsInput image: Prisma.AssetCreateNestedOneWithoutGenerationsInput + pose?: Prisma.PoseCreateNestedOneWithoutGenerationsInput + expression?: Prisma.ExpressionCreateNestedOneWithoutGenerationsInput } export type GenerationUncheckedCreateWithoutEquipmentsInput = { @@ -619,8 +707,8 @@ export type GenerationUncheckedCreateWithoutEquipmentsInput = { characterId: string imageId: string userPrompt?: string | null - pose?: string | null - expression?: string | null + poseId?: string | null + expressionId?: string | null createdAt?: Date | string updatedAt?: Date | string } @@ -644,12 +732,12 @@ export type GenerationUpdateToOneWithWhereWithoutEquipmentsInput = { export type GenerationUpdateWithoutEquipmentsInput = { id?: Prisma.StringFieldUpdateOperationsInput | string userPrompt?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - pose?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - expression?: Prisma.NullableStringFieldUpdateOperationsInput | string | null createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string character?: Prisma.CharacterUpdateOneRequiredWithoutGenerationsNestedInput image?: Prisma.AssetUpdateOneRequiredWithoutGenerationsNestedInput + pose?: Prisma.PoseUpdateOneWithoutGenerationsNestedInput + expression?: Prisma.ExpressionUpdateOneWithoutGenerationsNestedInput } export type GenerationUncheckedUpdateWithoutEquipmentsInput = { @@ -657,18 +745,112 @@ export type GenerationUncheckedUpdateWithoutEquipmentsInput = { characterId?: Prisma.StringFieldUpdateOperationsInput | string imageId?: Prisma.StringFieldUpdateOperationsInput | string userPrompt?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - pose?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - expression?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + poseId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + expressionId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string } +export type GenerationCreateWithoutPoseInput = { + id?: string + userPrompt?: string | null + createdAt?: Date | string + updatedAt?: Date | string + character: Prisma.CharacterCreateNestedOneWithoutGenerationsInput + image: Prisma.AssetCreateNestedOneWithoutGenerationsInput + expression?: Prisma.ExpressionCreateNestedOneWithoutGenerationsInput + equipments?: Prisma.GenerationEquipmentCreateNestedManyWithoutGenerationInput +} + +export type GenerationUncheckedCreateWithoutPoseInput = { + id?: string + characterId: string + imageId: string + userPrompt?: string | null + expressionId?: string | null + createdAt?: Date | string + updatedAt?: Date | string + equipments?: Prisma.GenerationEquipmentUncheckedCreateNestedManyWithoutGenerationInput +} + +export type GenerationCreateOrConnectWithoutPoseInput = { + where: Prisma.GenerationWhereUniqueInput + create: Prisma.XOR +} + +export type GenerationCreateManyPoseInputEnvelope = { + data: Prisma.GenerationCreateManyPoseInput | Prisma.GenerationCreateManyPoseInput[] +} + +export type GenerationUpsertWithWhereUniqueWithoutPoseInput = { + where: Prisma.GenerationWhereUniqueInput + update: Prisma.XOR + create: Prisma.XOR +} + +export type GenerationUpdateWithWhereUniqueWithoutPoseInput = { + where: Prisma.GenerationWhereUniqueInput + data: Prisma.XOR +} + +export type GenerationUpdateManyWithWhereWithoutPoseInput = { + where: Prisma.GenerationScalarWhereInput + data: Prisma.XOR +} + +export type GenerationCreateWithoutExpressionInput = { + id?: string + userPrompt?: string | null + createdAt?: Date | string + updatedAt?: Date | string + character: Prisma.CharacterCreateNestedOneWithoutGenerationsInput + image: Prisma.AssetCreateNestedOneWithoutGenerationsInput + pose?: Prisma.PoseCreateNestedOneWithoutGenerationsInput + equipments?: Prisma.GenerationEquipmentCreateNestedManyWithoutGenerationInput +} + +export type GenerationUncheckedCreateWithoutExpressionInput = { + id?: string + characterId: string + imageId: string + userPrompt?: string | null + poseId?: string | null + createdAt?: Date | string + updatedAt?: Date | string + equipments?: Prisma.GenerationEquipmentUncheckedCreateNestedManyWithoutGenerationInput +} + +export type GenerationCreateOrConnectWithoutExpressionInput = { + where: Prisma.GenerationWhereUniqueInput + create: Prisma.XOR +} + +export type GenerationCreateManyExpressionInputEnvelope = { + data: Prisma.GenerationCreateManyExpressionInput | Prisma.GenerationCreateManyExpressionInput[] +} + +export type GenerationUpsertWithWhereUniqueWithoutExpressionInput = { + where: Prisma.GenerationWhereUniqueInput + update: Prisma.XOR + create: Prisma.XOR +} + +export type GenerationUpdateWithWhereUniqueWithoutExpressionInput = { + where: Prisma.GenerationWhereUniqueInput + data: Prisma.XOR +} + +export type GenerationUpdateManyWithWhereWithoutExpressionInput = { + where: Prisma.GenerationScalarWhereInput + data: Prisma.XOR +} + export type GenerationCreateManyImageInput = { id?: string characterId: string userPrompt?: string | null - pose?: string | null - expression?: string | null + poseId?: string | null + expressionId?: string | null createdAt?: Date | string updatedAt?: Date | string } @@ -676,11 +858,11 @@ export type GenerationCreateManyImageInput = { export type GenerationUpdateWithoutImageInput = { id?: Prisma.StringFieldUpdateOperationsInput | string userPrompt?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - pose?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - expression?: Prisma.NullableStringFieldUpdateOperationsInput | string | null createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string character?: Prisma.CharacterUpdateOneRequiredWithoutGenerationsNestedInput + pose?: Prisma.PoseUpdateOneWithoutGenerationsNestedInput + expression?: Prisma.ExpressionUpdateOneWithoutGenerationsNestedInput equipments?: Prisma.GenerationEquipmentUpdateManyWithoutGenerationNestedInput } @@ -688,8 +870,8 @@ export type GenerationUncheckedUpdateWithoutImageInput = { id?: Prisma.StringFieldUpdateOperationsInput | string characterId?: Prisma.StringFieldUpdateOperationsInput | string userPrompt?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - pose?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - expression?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + poseId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + expressionId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string equipments?: Prisma.GenerationEquipmentUncheckedUpdateManyWithoutGenerationNestedInput @@ -699,8 +881,8 @@ export type GenerationUncheckedUpdateManyWithoutImageInput = { id?: Prisma.StringFieldUpdateOperationsInput | string characterId?: Prisma.StringFieldUpdateOperationsInput | string userPrompt?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - pose?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - expression?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + poseId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + expressionId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string } @@ -709,8 +891,8 @@ export type GenerationCreateManyCharacterInput = { id?: string imageId: string userPrompt?: string | null - pose?: string | null - expression?: string | null + poseId?: string | null + expressionId?: string | null createdAt?: Date | string updatedAt?: Date | string } @@ -718,11 +900,11 @@ export type GenerationCreateManyCharacterInput = { export type GenerationUpdateWithoutCharacterInput = { id?: Prisma.StringFieldUpdateOperationsInput | string userPrompt?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - pose?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - expression?: Prisma.NullableStringFieldUpdateOperationsInput | string | null createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string image?: Prisma.AssetUpdateOneRequiredWithoutGenerationsNestedInput + pose?: Prisma.PoseUpdateOneWithoutGenerationsNestedInput + expression?: Prisma.ExpressionUpdateOneWithoutGenerationsNestedInput equipments?: Prisma.GenerationEquipmentUpdateManyWithoutGenerationNestedInput } @@ -730,8 +912,8 @@ export type GenerationUncheckedUpdateWithoutCharacterInput = { id?: Prisma.StringFieldUpdateOperationsInput | string imageId?: Prisma.StringFieldUpdateOperationsInput | string userPrompt?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - pose?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - expression?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + poseId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + expressionId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string equipments?: Prisma.GenerationEquipmentUncheckedUpdateManyWithoutGenerationNestedInput @@ -741,8 +923,92 @@ export type GenerationUncheckedUpdateManyWithoutCharacterInput = { id?: Prisma.StringFieldUpdateOperationsInput | string imageId?: Prisma.StringFieldUpdateOperationsInput | string userPrompt?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - pose?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - expression?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + poseId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + expressionId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type GenerationCreateManyPoseInput = { + id?: string + characterId: string + imageId: string + userPrompt?: string | null + expressionId?: string | null + createdAt?: Date | string + updatedAt?: Date | string +} + +export type GenerationUpdateWithoutPoseInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + userPrompt?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + character?: Prisma.CharacterUpdateOneRequiredWithoutGenerationsNestedInput + image?: Prisma.AssetUpdateOneRequiredWithoutGenerationsNestedInput + expression?: Prisma.ExpressionUpdateOneWithoutGenerationsNestedInput + equipments?: Prisma.GenerationEquipmentUpdateManyWithoutGenerationNestedInput +} + +export type GenerationUncheckedUpdateWithoutPoseInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + characterId?: Prisma.StringFieldUpdateOperationsInput | string + imageId?: Prisma.StringFieldUpdateOperationsInput | string + userPrompt?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + expressionId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + equipments?: Prisma.GenerationEquipmentUncheckedUpdateManyWithoutGenerationNestedInput +} + +export type GenerationUncheckedUpdateManyWithoutPoseInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + characterId?: Prisma.StringFieldUpdateOperationsInput | string + imageId?: Prisma.StringFieldUpdateOperationsInput | string + userPrompt?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + expressionId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type GenerationCreateManyExpressionInput = { + id?: string + characterId: string + imageId: string + userPrompt?: string | null + poseId?: string | null + createdAt?: Date | string + updatedAt?: Date | string +} + +export type GenerationUpdateWithoutExpressionInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + userPrompt?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + character?: Prisma.CharacterUpdateOneRequiredWithoutGenerationsNestedInput + image?: Prisma.AssetUpdateOneRequiredWithoutGenerationsNestedInput + pose?: Prisma.PoseUpdateOneWithoutGenerationsNestedInput + equipments?: Prisma.GenerationEquipmentUpdateManyWithoutGenerationNestedInput +} + +export type GenerationUncheckedUpdateWithoutExpressionInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + characterId?: Prisma.StringFieldUpdateOperationsInput | string + imageId?: Prisma.StringFieldUpdateOperationsInput | string + userPrompt?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + poseId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + equipments?: Prisma.GenerationEquipmentUncheckedUpdateManyWithoutGenerationNestedInput +} + +export type GenerationUncheckedUpdateManyWithoutExpressionInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + characterId?: Prisma.StringFieldUpdateOperationsInput | string + imageId?: Prisma.StringFieldUpdateOperationsInput | string + userPrompt?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + poseId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string } @@ -783,12 +1049,14 @@ export type GenerationSelect image?: boolean | Prisma.AssetDefaultArgs + pose?: boolean | Prisma.Generation$poseArgs + expression?: boolean | Prisma.Generation$expressionArgs equipments?: boolean | Prisma.Generation$equipmentsArgs _count?: boolean | Prisma.GenerationCountOutputTypeDefaultArgs }, ExtArgs["result"]["generation"]> @@ -798,12 +1066,14 @@ export type GenerationSelectCreateManyAndReturn image?: boolean | Prisma.AssetDefaultArgs + pose?: boolean | Prisma.Generation$poseArgs + expression?: boolean | Prisma.Generation$expressionArgs }, ExtArgs["result"]["generation"]> export type GenerationSelectUpdateManyAndReturn = runtime.Types.Extensions.GetSelect<{ @@ -811,12 +1081,14 @@ export type GenerationSelectUpdateManyAndReturn image?: boolean | Prisma.AssetDefaultArgs + pose?: boolean | Prisma.Generation$poseArgs + expression?: boolean | Prisma.Generation$expressionArgs }, ExtArgs["result"]["generation"]> export type GenerationSelectScalar = { @@ -824,26 +1096,32 @@ export type GenerationSelectScalar = { characterId?: boolean imageId?: boolean userPrompt?: boolean - pose?: boolean - expression?: boolean + poseId?: boolean + expressionId?: boolean createdAt?: boolean updatedAt?: boolean } -export type GenerationOmit = runtime.Types.Extensions.GetOmit<"id" | "characterId" | "imageId" | "userPrompt" | "pose" | "expression" | "createdAt" | "updatedAt", ExtArgs["result"]["generation"]> +export type GenerationOmit = runtime.Types.Extensions.GetOmit<"id" | "characterId" | "imageId" | "userPrompt" | "poseId" | "expressionId" | "createdAt" | "updatedAt", ExtArgs["result"]["generation"]> export type GenerationInclude = { character?: boolean | Prisma.CharacterDefaultArgs image?: boolean | Prisma.AssetDefaultArgs + pose?: boolean | Prisma.Generation$poseArgs + expression?: boolean | Prisma.Generation$expressionArgs equipments?: boolean | Prisma.Generation$equipmentsArgs _count?: boolean | Prisma.GenerationCountOutputTypeDefaultArgs } export type GenerationIncludeCreateManyAndReturn = { character?: boolean | Prisma.CharacterDefaultArgs image?: boolean | Prisma.AssetDefaultArgs + pose?: boolean | Prisma.Generation$poseArgs + expression?: boolean | Prisma.Generation$expressionArgs } export type GenerationIncludeUpdateManyAndReturn = { character?: boolean | Prisma.CharacterDefaultArgs image?: boolean | Prisma.AssetDefaultArgs + pose?: boolean | Prisma.Generation$poseArgs + expression?: boolean | Prisma.Generation$expressionArgs } export type $GenerationPayload = { @@ -851,6 +1129,8 @@ export type $GenerationPayload image: Prisma.$AssetPayload + pose: Prisma.$PosePayload | null + expression: Prisma.$ExpressionPayload | null equipments: Prisma.$GenerationEquipmentPayload[] } scalars: runtime.Types.Extensions.GetPayloadResult<{ @@ -858,8 +1138,8 @@ export type $GenerationPayload @@ -1258,6 +1538,8 @@ export interface Prisma__GenerationClient = {}>(args?: Prisma.Subset>): Prisma.Prisma__CharacterClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> image = {}>(args?: Prisma.Subset>): Prisma.Prisma__AssetClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + pose = {}>(args?: Prisma.Subset>): Prisma.Prisma__PoseClient, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + expression = {}>(args?: Prisma.Subset>): Prisma.Prisma__ExpressionClient, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> equipments = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> /** * Attaches callbacks for the resolution and/or rejection of the Promise. @@ -1292,8 +1574,8 @@ export interface GenerationFieldRefs { readonly characterId: Prisma.FieldRef<"Generation", 'String'> readonly imageId: Prisma.FieldRef<"Generation", 'String'> readonly userPrompt: Prisma.FieldRef<"Generation", 'String'> - readonly pose: Prisma.FieldRef<"Generation", 'String'> - readonly expression: Prisma.FieldRef<"Generation", 'String'> + readonly poseId: Prisma.FieldRef<"Generation", 'String'> + readonly expressionId: Prisma.FieldRef<"Generation", 'String'> readonly createdAt: Prisma.FieldRef<"Generation", 'DateTime'> readonly updatedAt: Prisma.FieldRef<"Generation", 'DateTime'> } @@ -1689,6 +1971,44 @@ export type GenerationDeleteManyArgs = { + /** + * Select specific fields to fetch from the Pose + */ + select?: Prisma.PoseSelect | null + /** + * Omit specific fields from the Pose + */ + omit?: Prisma.PoseOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.PoseInclude | null + where?: Prisma.PoseWhereInput +} + +/** + * Generation.expression + */ +export type Generation$expressionArgs = { + /** + * Select specific fields to fetch from the Expression + */ + select?: Prisma.ExpressionSelect | null + /** + * Omit specific fields from the Expression + */ + omit?: Prisma.ExpressionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.ExpressionInclude | null + where?: Prisma.ExpressionWhereInput +} + /** * Generation.equipments */ diff --git a/src/generated/prisma/models/Pose.ts b/src/generated/prisma/models/Pose.ts index 3b0d1aa..be0ce0d 100644 --- a/src/generated/prisma/models/Pose.ts +++ b/src/generated/prisma/models/Pose.ts @@ -183,6 +183,7 @@ export type PoseWhereInput = { createdAt?: Prisma.DateTimeFilter<"Pose"> | Date | string updatedAt?: Prisma.DateTimeFilter<"Pose"> | Date | string image?: Prisma.XOR + generations?: Prisma.GenerationListRelationFilter } export type PoseOrderByWithRelationInput = { @@ -192,6 +193,7 @@ export type PoseOrderByWithRelationInput = { createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder image?: Prisma.AssetOrderByWithRelationInput + generations?: Prisma.GenerationOrderByRelationAggregateInput } export type PoseWhereUniqueInput = Prisma.AtLeast<{ @@ -204,6 +206,7 @@ export type PoseWhereUniqueInput = Prisma.AtLeast<{ createdAt?: Prisma.DateTimeFilter<"Pose"> | Date | string updatedAt?: Prisma.DateTimeFilter<"Pose"> | Date | string image?: Prisma.XOR + generations?: Prisma.GenerationListRelationFilter }, "id"> export type PoseOrderByWithAggregationInput = { @@ -234,6 +237,7 @@ export type PoseCreateInput = { createdAt?: Date | string updatedAt?: Date | string image: Prisma.AssetCreateNestedOneWithoutPosesInput + generations?: Prisma.GenerationCreateNestedManyWithoutPoseInput } export type PoseUncheckedCreateInput = { @@ -242,6 +246,7 @@ export type PoseUncheckedCreateInput = { imageId: string createdAt?: Date | string updatedAt?: Date | string + generations?: Prisma.GenerationUncheckedCreateNestedManyWithoutPoseInput } export type PoseUpdateInput = { @@ -250,6 +255,7 @@ export type PoseUpdateInput = { createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string image?: Prisma.AssetUpdateOneRequiredWithoutPosesNestedInput + generations?: Prisma.GenerationUpdateManyWithoutPoseNestedInput } export type PoseUncheckedUpdateInput = { @@ -258,6 +264,7 @@ export type PoseUncheckedUpdateInput = { imageId?: Prisma.StringFieldUpdateOperationsInput | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + generations?: Prisma.GenerationUncheckedUpdateManyWithoutPoseNestedInput } export type PoseCreateManyInput = { @@ -293,6 +300,11 @@ export type PoseOrderByRelationAggregateInput = { _count?: Prisma.SortOrder } +export type PoseNullableScalarRelationFilter = { + is?: Prisma.PoseWhereInput | null + isNot?: Prisma.PoseWhereInput | null +} + export type PoseCountOrderByAggregateInput = { id?: Prisma.SortOrder name?: Prisma.SortOrder @@ -359,11 +371,28 @@ export type PoseUncheckedUpdateManyWithoutImageNestedInput = { deleteMany?: Prisma.PoseScalarWhereInput | Prisma.PoseScalarWhereInput[] } +export type PoseCreateNestedOneWithoutGenerationsInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.PoseCreateOrConnectWithoutGenerationsInput + connect?: Prisma.PoseWhereUniqueInput +} + +export type PoseUpdateOneWithoutGenerationsNestedInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.PoseCreateOrConnectWithoutGenerationsInput + upsert?: Prisma.PoseUpsertWithoutGenerationsInput + disconnect?: Prisma.PoseWhereInput | boolean + delete?: Prisma.PoseWhereInput | boolean + connect?: Prisma.PoseWhereUniqueInput + update?: Prisma.XOR, Prisma.PoseUncheckedUpdateWithoutGenerationsInput> +} + export type PoseCreateWithoutImageInput = { id?: string name: string createdAt?: Date | string updatedAt?: Date | string + generations?: Prisma.GenerationCreateNestedManyWithoutPoseInput } export type PoseUncheckedCreateWithoutImageInput = { @@ -371,6 +400,7 @@ export type PoseUncheckedCreateWithoutImageInput = { name: string createdAt?: Date | string updatedAt?: Date | string + generations?: Prisma.GenerationUncheckedCreateNestedManyWithoutPoseInput } export type PoseCreateOrConnectWithoutImageInput = { @@ -409,6 +439,54 @@ export type PoseScalarWhereInput = { updatedAt?: Prisma.DateTimeFilter<"Pose"> | Date | string } +export type PoseCreateWithoutGenerationsInput = { + id?: string + name: string + createdAt?: Date | string + updatedAt?: Date | string + image: Prisma.AssetCreateNestedOneWithoutPosesInput +} + +export type PoseUncheckedCreateWithoutGenerationsInput = { + id?: string + name: string + imageId: string + createdAt?: Date | string + updatedAt?: Date | string +} + +export type PoseCreateOrConnectWithoutGenerationsInput = { + where: Prisma.PoseWhereUniqueInput + create: Prisma.XOR +} + +export type PoseUpsertWithoutGenerationsInput = { + update: Prisma.XOR + create: Prisma.XOR + where?: Prisma.PoseWhereInput +} + +export type PoseUpdateToOneWithWhereWithoutGenerationsInput = { + where?: Prisma.PoseWhereInput + data: Prisma.XOR +} + +export type PoseUpdateWithoutGenerationsInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + image?: Prisma.AssetUpdateOneRequiredWithoutPosesNestedInput +} + +export type PoseUncheckedUpdateWithoutGenerationsInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + imageId?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + export type PoseCreateManyImageInput = { id?: string name: string @@ -421,6 +499,7 @@ export type PoseUpdateWithoutImageInput = { name?: Prisma.StringFieldUpdateOperationsInput | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + generations?: Prisma.GenerationUpdateManyWithoutPoseNestedInput } export type PoseUncheckedUpdateWithoutImageInput = { @@ -428,6 +507,7 @@ export type PoseUncheckedUpdateWithoutImageInput = { name?: Prisma.StringFieldUpdateOperationsInput | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + generations?: Prisma.GenerationUncheckedUpdateManyWithoutPoseNestedInput } export type PoseUncheckedUpdateManyWithoutImageInput = { @@ -438,6 +518,35 @@ export type PoseUncheckedUpdateManyWithoutImageInput = { } +/** + * Count Type PoseCountOutputType + */ + +export type PoseCountOutputType = { + generations: number +} + +export type PoseCountOutputTypeSelect = { + generations?: boolean | PoseCountOutputTypeCountGenerationsArgs +} + +/** + * PoseCountOutputType without action + */ +export type PoseCountOutputTypeDefaultArgs = { + /** + * Select specific fields to fetch from the PoseCountOutputType + */ + select?: Prisma.PoseCountOutputTypeSelect | null +} + +/** + * PoseCountOutputType without action + */ +export type PoseCountOutputTypeCountGenerationsArgs = { + where?: Prisma.GenerationWhereInput +} + export type PoseSelect = runtime.Types.Extensions.GetSelect<{ id?: boolean @@ -446,6 +555,8 @@ export type PoseSelect + generations?: boolean | Prisma.Pose$generationsArgs + _count?: boolean | Prisma.PoseCountOutputTypeDefaultArgs }, ExtArgs["result"]["pose"]> export type PoseSelectCreateManyAndReturn = runtime.Types.Extensions.GetSelect<{ @@ -477,6 +588,8 @@ export type PoseSelectScalar = { export type PoseOmit = runtime.Types.Extensions.GetOmit<"id" | "name" | "imageId" | "createdAt" | "updatedAt", ExtArgs["result"]["pose"]> export type PoseInclude = { image?: boolean | Prisma.AssetDefaultArgs + generations?: boolean | Prisma.Pose$generationsArgs + _count?: boolean | Prisma.PoseCountOutputTypeDefaultArgs } export type PoseIncludeCreateManyAndReturn = { image?: boolean | Prisma.AssetDefaultArgs @@ -489,6 +602,7 @@ export type $PosePayload + generations: Prisma.$GenerationPayload[] } scalars: runtime.Types.Extensions.GetPayloadResult<{ id: string @@ -891,6 +1005,7 @@ readonly fields: PoseFieldRefs; export interface Prisma__PoseClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: "PrismaPromise" image = {}>(args?: Prisma.Subset>): Prisma.Prisma__AssetClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + generations = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> /** * Attaches callbacks for the resolution and/or rejection of the Promise. * @param onfulfilled The callback to execute when the Promise is resolved. @@ -1318,6 +1433,30 @@ export type PoseDeleteManyArgs = { + /** + * Select specific fields to fetch from the Generation + */ + select?: Prisma.GenerationSelect | null + /** + * Omit specific fields from the Generation + */ + omit?: Prisma.GenerationOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GenerationInclude | null + where?: Prisma.GenerationWhereInput + orderBy?: Prisma.GenerationOrderByWithRelationInput | Prisma.GenerationOrderByWithRelationInput[] + cursor?: Prisma.GenerationWhereUniqueInput + take?: number + skip?: number + distinct?: Prisma.GenerationScalarFieldEnum | Prisma.GenerationScalarFieldEnum[] +} + /** * Pose without action */ diff --git a/src/service/example-data.ts b/src/service/example-data.ts index 5313160..7433b5f 100644 --- a/src/service/example-data.ts +++ b/src/service/example-data.ts @@ -151,8 +151,8 @@ export class ExampleDataService { id: g.id, characterId: g.characterId, userPrompt: g.userPrompt, - pose: g.pose, - expression: g.expression, + pose: g.poseId, + expression: g.expressionId, asset: { name: g.image.name, type: g.image.type, @@ -267,8 +267,8 @@ export class ExampleDataService { id: item.id, characterId: item.characterId, userPrompt: item.userPrompt, - pose: item.pose, - expression: item.expression, + poseId: item.pose, + expressionId: item.expression, imageId: asset.id, equipments: { create: item.equipmentIds.map((id) => ({ diff --git a/src/service/generation.test.ts b/src/service/generation.test.ts index b6603e0..a6a3030 100644 --- a/src/service/generation.test.ts +++ b/src/service/generation.test.ts @@ -1,4 +1,4 @@ -import { describe, it, expect, mock, afterEach } from 'bun:test' +import { afterEach, describe, expect, it, mock } from 'bun:test' const mockPrisma = { generation: { @@ -157,7 +157,7 @@ describe('GenerationService', () => { expect(mockPrisma.generation.create).toHaveBeenCalledWith( expect.objectContaining({ data: expect.objectContaining({ - pose: 'pose1', + poseId: 'pose1', }), }), ) diff --git a/src/service/generation.ts b/src/service/generation.ts index 33798aa..5f07455 100644 --- a/src/service/generation.ts +++ b/src/service/generation.ts @@ -186,8 +186,8 @@ category: ${eq.category} characterId: character.id, imageId: asset.id, userPrompt: userPrompt, - pose: poseId, - expression: expressionId, + poseId: poseId, + expressionId: expressionId, equipments: { create: equipmentIds.map((eqId) => ({ equipmentId: eqId, @@ -197,6 +197,8 @@ category: ${eq.category} include: { image: true, character: true, + pose: { include: { image: true } }, + expression: { include: { image: true } }, equipments: { include: { equipment: { @@ -241,6 +243,8 @@ category: ${eq.category} include: { image: true, character: true, + pose: { include: { image: true } }, + expression: { include: { image: true } }, equipments: { include: { equipment: { diff --git a/src/ui/components/EquipmentDetailsDialog.tsx b/src/ui/components/EquipmentDetailsDialog.tsx index 1d94dbc..92f3f3f 100644 --- a/src/ui/components/EquipmentDetailsDialog.tsx +++ b/src/ui/components/EquipmentDetailsDialog.tsx @@ -1,13 +1,13 @@ -import React, { useEffect, useState } from 'react' import { InferResponseType } from 'hono/client' -import { client } from '../client' -import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription } from './ui/dialog' -import { Button } from './ui/button' -import { Input } from './ui/input' -import { Textarea } from './ui/textarea' -import { Label } from './ui/label' -import { toast } from 'sonner' import { Loader2 } from 'lucide-react' +import React, { useEffect, useState } from 'react' +import { toast } from 'sonner' +import { client } from '../client' +import { Button } from './ui/button' +import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from './ui/dialog' +import { Input } from './ui/input' +import { Label } from './ui/label' +import { Textarea } from './ui/textarea' type EquipmentResponse = InferResponseType type EquipmentItem = EquipmentResponse['items'][number] @@ -68,14 +68,12 @@ export const EquipmentDetailsDialog: React.FC = ({ Equipment Details - - {equipment.category} - + {equipment.category}
{/* Top: Full Image */} -
+
@@ -18,8 +19,113 @@ export const LookDetailsDialog: React.FC = ({ onOpenChange, generation, }) => { + const [scale, setScale] = useState(1) + const [position, setPosition] = useState({ x: 0, y: 0 }) + const [isDragging, setIsDragging] = useState(false) + const dragStartRef = useRef({ x: 0, y: 0 }) + + const items = useMemo(() => { + if (!generation) return [] + const list: Array<{ + id: string + name: string + category: string + image?: { path: string } | null + }> = [] + + // Equipments + generation.equipments?.forEach((relation: any) => { + const eq = relation.equipment + if (eq) { + list.push({ + id: eq.id, + name: eq.name, + category: eq.category, + image: eq.image, + }) + } + }) + + // Pose + // @ts-ignore + if (generation.pose && typeof generation.pose === 'object') { + // @ts-ignore + const p = generation.pose + list.push({ + id: p.id, + name: p.name, + category: 'Pose', + image: p.image, + }) + } + + // Expression + // @ts-ignore + if (generation.expression && typeof generation.expression === 'object') { + // @ts-ignore + const e = generation.expression + list.push({ + id: e.id, + name: e.name, + category: 'Expression', + image: e.image, + }) + } + + return list + }, [generation]) + + // Reset zoom when generation changes + useEffect(() => { + setScale(1) + setPosition({ x: 0, y: 0 }) + }, [generation?.id]) + + // Global mouse up to stop dragging + useEffect(() => { + const handleGlobalMouseUp = () => { + if (isDragging) setIsDragging(false) + } + window.addEventListener('mouseup', handleGlobalMouseUp) + return () => window.removeEventListener('mouseup', handleGlobalMouseUp) + }, [isDragging]) + if (!generation) return null + const handleZoomIn = () => { + setScale((prev) => Math.min(prev + 0.5, 4)) + } + + const handleZoomOut = () => { + setScale((prev) => { + const next = Math.max(prev - 0.5, 1) + if (next === 1) setPosition({ x: 0, y: 0 }) + return next + }) + } + + const handleReset = () => { + setScale(1) + setPosition({ x: 0, y: 0 }) + } + + const handleMouseDown = (e: React.MouseEvent) => { + if (scale > 1) { + setIsDragging(true) + dragStartRef.current = { x: e.clientX - position.x, y: e.clientY - position.y } + } + } + + const handleMouseMove = (e: React.MouseEvent) => { + if (isDragging && scale > 1) { + e.preventDefault() + setPosition({ + x: e.clientX - dragStartRef.current.x, + y: e.clientY - dragStartRef.current.y, + }) + } + } + return ( @@ -33,8 +139,12 @@ export const LookDetailsDialog: React.FC = ({
- {/* Top: Full Image */} -
+ {/* Top: Full Image Viewer */} +
= ({ backgroundSize: '24px 24px', }} >
+ Generated Look 1 ? (isDragging ? 'grabbing' : 'grab') : 'default', + }} /> + + {/* Zoom Controls */} +
+ + + +
{/* Bottom: Details */} -
- +
+
- {/* Equipments Used */} + {/* Items Used */}

- Equipments Used + Items Used

- {/* @ts-ignore - type inference might be tricky with nested includes */} - {generation.equipments?.map((relation) => { - const eq = relation.equipment - return ( -
-
- {eq.image ? ( - {eq.name} - ) : ( -
- )} -
-
-

{eq.name}

-

{eq.category}

-
+ {items.map((item) => ( +
+
+ {item.image ? ( + {item.name} + ) : ( +
+ )}
- ) - })} - {/* @ts-ignore */} - {(!generation.equipments || generation.equipments.length === 0) && ( -

No equipment recorded.

+
+

{item.name}

+

{item.category}

+
+
+ ))} + {items.length === 0 && ( +

No items recorded.

)}