Sieht gut aus und geht (noch keine Bildeingabe)
This commit is contained in:
		
							
								
								
									
										53
									
								
								nodejs-version/backend/prisma/schema.prisma
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										53
									
								
								nodejs-version/backend/prisma/schema.prisma
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,53 @@ | ||||
| // This is your Prisma schema file, | ||||
| // learn more about it in the docs: https://pris.ly/d/prisma-schema | ||||
|  | ||||
| generator client { | ||||
|   provider = "prisma-client-js" | ||||
| } | ||||
|  | ||||
| datasource db { | ||||
|   provider = "mysql" | ||||
|   url      = env("DATABASE_URL") | ||||
| } | ||||
|  | ||||
| model Recipe { | ||||
|   id            Int      @id @default(autoincrement()) | ||||
|   recipeNumber  String   @unique @map("Rezeptnummer") @db.VarChar(50) | ||||
|   title         String   @map("Bezeichnung") @db.Text | ||||
|   description   String?  @map("Beschreibung") @db.Text | ||||
|   category      String?  @map("Kategorie") @db.VarChar(100) | ||||
|   filePath      String?  @map("datei_pfad") @db.VarChar(255) | ||||
|   preparation   String?  @map("Vorbereitung") @db.Text | ||||
|   servings      Int      @map("Anzahl") @default(1) | ||||
|   ingredients   String?  @map("Zutaten") @db.Text | ||||
|   instructions  String?  @map("Zubereitung") @db.Text | ||||
|   comment       String?  @map("Kommentar") @db.Text | ||||
|  | ||||
|   // Relations | ||||
|   images            RecipeImage[] | ||||
|   ingredientsList   Ingredient[] | ||||
|  | ||||
|   @@map("Rezepte") | ||||
| } | ||||
|  | ||||
| model Ingredient { | ||||
|   id           Int    @id @default(autoincrement()) | ||||
|   recipeNumber String @map("rezeptnr") @db.VarChar(20) | ||||
|   ingredients  String @map("ingr") @db.Text | ||||
|  | ||||
|   // Relations | ||||
|   recipe Recipe? @relation(fields: [recipeNumber], references: [recipeNumber]) | ||||
|  | ||||
|   @@map("ingredients") | ||||
| } | ||||
|  | ||||
| model RecipeImage { | ||||
|   id          Int    @id @default(autoincrement()) | ||||
|   recipeId    Int    @map("rezepte_id") | ||||
|   filePath    String @map("datei_pfad") @db.VarChar(255) | ||||
|  | ||||
|   // Relations | ||||
|   recipe Recipe? @relation(fields: [recipeId], references: [id]) | ||||
|  | ||||
|   @@map("rezepte_bilder") | ||||
| } | ||||
		Reference in New Issue
	
	Block a user