Fix scouthub-home-be
This commit is contained in:
@@ -13,7 +13,9 @@ model GruppoScout {
|
||||
regione String?
|
||||
dataCreazione DateTime @default(now()) @map("data_creazione")
|
||||
|
||||
inviti Invito[]
|
||||
inviti Invito[]
|
||||
richiesteIngresso RichiestaIngresso[]
|
||||
linkIngresso LinkIngresso[]
|
||||
|
||||
@@map("gruppo_scout")
|
||||
}
|
||||
@@ -31,3 +33,57 @@ model Invito {
|
||||
|
||||
@@map("invito")
|
||||
}
|
||||
|
||||
enum StatoRichiesta {
|
||||
PENDING
|
||||
APPROVATA
|
||||
RIFIUTATA
|
||||
}
|
||||
|
||||
enum OrigineRichiesta {
|
||||
LINK
|
||||
PROFILO
|
||||
}
|
||||
|
||||
model RichiestaIngresso {
|
||||
id String @id @default(uuid())
|
||||
userId String @map("user_id")
|
||||
email String
|
||||
orgId String @map("org_id")
|
||||
stato StatoRichiesta @default(PENDING)
|
||||
origine OrigineRichiesta
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
updatedAt DateTime @updatedAt @map("updated_at")
|
||||
|
||||
gruppoScout GruppoScout @relation(fields: [orgId], references: [orgId])
|
||||
|
||||
@@index([email])
|
||||
@@map("richiesta_ingresso")
|
||||
}
|
||||
|
||||
model LinkIngresso {
|
||||
id String @id @default(uuid())
|
||||
token String @unique
|
||||
orgId String @map("org_id")
|
||||
attivo Boolean @default(true)
|
||||
creatoDa String @map("creato_da")
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
|
||||
gruppoScout GruppoScout @relation(fields: [orgId], references: [orgId])
|
||||
|
||||
@@map("link_ingresso")
|
||||
}
|
||||
|
||||
model RichiestaCreazioneGruppo {
|
||||
id String @id @default(uuid())
|
||||
userId String @map("user_id")
|
||||
email String
|
||||
nomeProposto String @map("nome_proposto")
|
||||
regione String?
|
||||
stato StatoRichiesta @default(PENDING)
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
updatedAt DateTime @updatedAt @map("updated_at")
|
||||
|
||||
@@index([email])
|
||||
@@map("richiesta_creazione_gruppo")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user