invite model
This commit is contained in:
parent
edf9584391
commit
09c4883366
|
@ -24,6 +24,9 @@ model User {
|
||||||
actions ItemAct[]
|
actions ItemAct[]
|
||||||
invoices Invoice[]
|
invoices Invoice[]
|
||||||
withdrawls Withdrawl[]
|
withdrawls Withdrawl[]
|
||||||
|
invites Invite[] @relation(name: "Invites")
|
||||||
|
invite Invite? @relation(fields: [inviteId], references: [id])
|
||||||
|
inviteId String?
|
||||||
bio Item? @relation(name: "Item", fields: [bioId], references: [id])
|
bio Item? @relation(name: "Item", fields: [bioId], references: [id])
|
||||||
bioId Int?
|
bioId Int?
|
||||||
msats Int @default(0)
|
msats Int @default(0)
|
||||||
|
@ -45,6 +48,18 @@ model LnAuth {
|
||||||
pubkey String?
|
pubkey String?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
model Invite {
|
||||||
|
id String @id @default(cuid())
|
||||||
|
createdAt DateTime @default(now()) @map(name: "created_at")
|
||||||
|
updatedAt DateTime @default(now()) @updatedAt @map(name: "updated_at")
|
||||||
|
user User @relation(name: "Invites", fields: [userId], references: [id])
|
||||||
|
userId Int
|
||||||
|
gift Int?
|
||||||
|
limit Int?
|
||||||
|
revoked Boolean @default(false)
|
||||||
|
invitees User[]
|
||||||
|
}
|
||||||
|
|
||||||
model Message {
|
model Message {
|
||||||
id Int @id @default(autoincrement())
|
id Int @id @default(autoincrement())
|
||||||
text String
|
text String
|
||||||
|
|
Loading…
Reference in New Issue