Update user schema and forms to include address and consent fields

- Replaced 'house_name' with 'address' in user schema and related files.
- Added new fields for terms and privacy policy acceptance in the signup form schema.
- Updated package.json and package-lock.json to include @radix-ui/react-checkbox for checkbox functionality.
- Modified seed script to reflect changes in the user model.
This commit is contained in:
2024-11-30 23:37:35 +05:00
parent 0322bee567
commit 4e78ff2de9
5 changed files with 59 additions and 3 deletions

View File

@ -21,7 +21,7 @@ model User {
firstPaymentDone Boolean @default(false)
verified Boolean @default(false)
// island String?
house_name String?
address String?
id_card String? @unique
dob DateTime?
atoll Atoll? @relation(fields: [atollId], references: [id])
@ -32,6 +32,10 @@ model User {
updatedAt DateTime @updatedAt
phoneNumber String @unique
phoneNumberVerified Boolean @default(false)
termsAccepted Boolean @default(false)
policyAccepted Boolean @default(false)
devices Device[]
role String?
lang String?
@ -102,3 +106,14 @@ model Island {
updatedAt DateTime @updatedAt
User User[]
}
model Device {
id String @id @default(cuid())
name String
mac String
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
User User? @relation(fields: [userId], references: [id])
userId String?
}

View File

@ -12,7 +12,7 @@ async function main() {
emailVerified: false,
firstPaymentDone: false,
verified: false,
house_name: faker.location.streetAddress(),
address: faker.location.streetAddress(),
id_card: `A${Math.round(Math.random() * 999999)}`,
dob: faker.date.between({
from: "1900-01-01",