This commit is contained in:
jackbeeby
2025-04-14 12:17:06 +10:00
parent 0b9d543d36
commit c30cc6a377

View File

@@ -13,32 +13,44 @@ datasource db {
url = env("DATABASE_URL")
}
/*
Some tips:
? means can be null or optional
[] means 1 to many
*/
model Account {
id Int @id @default(autoincrement())
type String?
firstName String?
lastName String?
email String? @unique
email String?
phone Int?
company String?
password String?
accountInformation AccountInformation?
BusinessInformation BusinessInformation?
JobPost JobPost[]
}
model JobPost {
id BigInt @id @default(autoincrement())
businessId Int?
heading BigInt?
description BigInt?
locationText BigInt?
locationLongLat BigInt?
field BigInt?
contractType BigInt?
payRange BigInt?
hours BigInt?
createdAt BigInt?
endingAtTime BigInt?
heading String?
description String?
locationText Int?
locationLongLat Int?
jobField String?
contractType String?
payRange String?
hours String?
createdAt DateTime @default(now())
endingAtTime DateTime?
accountId Int
account Account @relation(fields: [accountId], references: [id])
}
model AccountInformation {
@@ -53,3 +65,11 @@ model AccountInformation {
accountId Int @unique // Add the unique constraint here
account Account @relation(fields: [accountId], references: [id])
}
model BusinessInformation {
id Int @id @default(autoincrement())
businessName String?
abn Int?
accountId Int @unique // Add the unique constraint here
account Account @relation(fields: [accountId], references: [id])
}