d
This commit is contained in:
@@ -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])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user