mirror of
https://github.com/i701/sarlink-portal.git
synced 2025-07-01 21:28:23 +00:00
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:
@ -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?
|
||||
}
|
||||
|
@ -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",
|
||||
|
Reference in New Issue
Block a user