214 lines
5.1 KiB
Plaintext
214 lines
5.1 KiB
Plaintext
// Prisma schema - Generated from schema.json
|
|
//
|
|
// DO NOT EDIT MANUALLY - Regenerate from schema.json
|
|
|
|
generator client {
|
|
provider = "prisma-client-js"
|
|
}
|
|
|
|
datasource db {
|
|
provider = "postgresql"
|
|
url = env("DATABASE_URL")
|
|
}
|
|
|
|
enum Status {
|
|
PENDING
|
|
PLANNED
|
|
BUILDING
|
|
DEV
|
|
LIVE
|
|
READY
|
|
}
|
|
|
|
enum System {
|
|
ARTERY
|
|
ALBUM
|
|
WARD
|
|
}
|
|
|
|
// === Shared Components ===
|
|
|
|
/// Runtime environment configuration. Shared across artery, ward.
|
|
model Nest {
|
|
id Int @id @default(autoincrement())
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
|
|
name String @unique
|
|
slug String @unique
|
|
title String
|
|
status Status? @relation(fields: [statusId], references: [id])
|
|
statusId Int?
|
|
config_path String?
|
|
|
|
@@map("pawprint_nest")
|
|
}
|
|
|
|
/// Data storage. When generated from Template = 'Book (written)'. Independent in ward/artery.
|
|
model Larder {
|
|
id Int @id @default(autoincrement())
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
|
|
name String @unique
|
|
slug String @unique
|
|
title String
|
|
status Status? @relation(fields: [statusId], references: [id])
|
|
statusId Int?
|
|
source_template String?
|
|
data_path String?
|
|
|
|
@@map("pawprint_larder")
|
|
}
|
|
|
|
// === System-Specific Components ===
|
|
|
|
/// Connector (artery). Single responsibility.
|
|
model Vein {
|
|
id Int @id @default(autoincrement())
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
|
|
name String @unique
|
|
slug String @unique
|
|
title String
|
|
status Status? @relation(fields: [statusId], references: [id])
|
|
statusId Int?
|
|
system String @default("artery")
|
|
|
|
@@map("pawprint_vein")
|
|
}
|
|
|
|
/// Documentation template (album). Gherkin, BDD patterns.
|
|
model Template {
|
|
id Int @id @default(autoincrement())
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
|
|
name String @unique
|
|
slug String @unique
|
|
title String
|
|
status Status? @relation(fields: [statusId], references: [id])
|
|
statusId Int?
|
|
template_path String?
|
|
system String @default("album")
|
|
|
|
@@map("pawprint_template")
|
|
}
|
|
|
|
/// Execution tool (ward). Test runners, seeders.
|
|
model Tool {
|
|
id Int @id @default(autoincrement())
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
|
|
name String @unique
|
|
slug String @unique
|
|
title String
|
|
status Status? @relation(fields: [statusId], references: [id])
|
|
statusId Int?
|
|
system String @default("ward")
|
|
|
|
@@map("pawprint_tool")
|
|
}
|
|
|
|
/// Service monitor (ward). Health checks, status watchers.
|
|
model Monitor {
|
|
id Int @id @default(autoincrement())
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
|
|
name String @unique
|
|
slug String @unique
|
|
title String
|
|
status Status? @relation(fields: [statusId], references: [id])
|
|
statusId Int?
|
|
system String @default("ward")
|
|
|
|
@@map("pawprint_monitor")
|
|
}
|
|
|
|
/// Tool cabinet (ward). Contains 0+ tools.
|
|
model Cabinet {
|
|
id Int @id @default(autoincrement())
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
|
|
name String @unique
|
|
slug String @unique
|
|
title String
|
|
status Status? @relation(fields: [statusId], references: [id])
|
|
statusId Int?
|
|
tools Tool[]
|
|
system String @default("ward")
|
|
|
|
@@map("pawprint_cabinet")
|
|
}
|
|
|
|
// === Composed Types ===
|
|
|
|
/// Composed data flow (artery). Pulse = Vein + Nest + Larder.
|
|
model Pulse {
|
|
id Int @id @default(autoincrement())
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
|
|
name String @unique
|
|
slug String @unique
|
|
title String
|
|
status Status? @relation(fields: [statusId], references: [id])
|
|
statusId Int?
|
|
vein Vein? @relation(fields: [veinId], references: [id])
|
|
veinId Int?
|
|
nest Nest? @relation(fields: [nestId], references: [id])
|
|
nestId Int?
|
|
larder Larder? @relation(fields: [larderId], references: [id])
|
|
larderId Int?
|
|
system String @default("artery")
|
|
|
|
@@map("pawprint_pulse")
|
|
}
|
|
|
|
/// Composed documentation (album). Book = Template + Larder.
|
|
model Book {
|
|
id Int @id @default(autoincrement())
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
|
|
name String @unique
|
|
slug String @unique
|
|
title String
|
|
status Status? @relation(fields: [statusId], references: [id])
|
|
statusId Int?
|
|
template Template? @relation(fields: [templateId], references: [id])
|
|
templateId Int?
|
|
larder Larder? @relation(fields: [larderId], references: [id])
|
|
larderId Int?
|
|
output_larder Larder? @relation(fields: [output_larderId], references: [id])
|
|
output_larderId Int?
|
|
system String @default("album")
|
|
|
|
@@map("pawprint_book")
|
|
}
|
|
|
|
/// Composed execution bundle (ward). Table = Cabinet + Nest + Larders.
|
|
model Table {
|
|
id Int @id @default(autoincrement())
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
|
|
name String @unique
|
|
slug String @unique
|
|
title String
|
|
status Status? @relation(fields: [statusId], references: [id])
|
|
statusId Int?
|
|
cabinet Cabinet? @relation(fields: [cabinetId], references: [id])
|
|
cabinetId Int?
|
|
nest Nest? @relation(fields: [nestId], references: [id])
|
|
nestId Int?
|
|
larders Larder[]
|
|
system String @default("ward")
|
|
|
|
@@map("pawprint_table")
|
|
}
|