Skip to content

Instantly share code, notes, and snippets.

@haworku
Last active April 4, 2025 19:09
Show Gist options
  • Save haworku/6f1ca4b46399255d9d10c06b21f93a18 to your computer and use it in GitHub Desktop.
Save haworku/6f1ca4b46399255d9d10c06b21f93a18 to your computer and use it in GitHub Desktop.
MC-Review Prisma sample -interview
model State {
stateCode String @id @default(uuid())
rates RateTable[]
}
model RateTable {
id String @id @default(uuid())
createdAt DateTime @default(now())
updatedAt DateTime @default(now()) @updatedAt
stateCode String
state State @relation(fields: [stateCode], references: [stateCode])
revisions RateRevisionTable[]
}
model RateRevisionTable {
id String @id @default(uuid())
createdAt DateTime @default(now())
updatedAt DateTime @default(now()) @updatedAt
rateID String
rate RateTable @relation(fields: [rateID], references: [id])
submitInfoID String?
submitInfo UpdateInfoTable? @relation("submitRateInfo", fields: [submitInfoID], references: [id], onDelete: Cascade)
certifyingActuaryContacts ActuaryContact[] @relation(name: "CertifyingActuaryOnRateRevision")
}
model UpdateInfoTable {
id String @id @default(uuid())
updatedAt DateTime
updatedReason String
submittedRates RateRevisionTable[] @relation("submitRateInfo")
}
model ActuaryContact {
id String @id @default(uuid())
createdAt DateTime @default(now())
updatedAt DateTime @default(now()) @updatedAt
name String?
titleRole String?
email String?
rateWithCertifyingActuaryID String?
rateActuaryCertifying RateRevisionTable? @relation(name: "CertifyingActuaryOnRateRevision", fields: [rateWithCertifyingActuaryID], references: [id], onDelete: Cascade)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment