Last active
April 4, 2025 19:09
-
-
Save haworku/6f1ca4b46399255d9d10c06b21f93a18 to your computer and use it in GitHub Desktop.
MC-Review Prisma sample -interview
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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