Feat/um 49 query builder api (#1573)

* add uuid to event. add indexes

* eventdata api

* add event data

* remove test data

* update list
This commit is contained in:
Brian Cao 2022-10-21 21:33:23 -07:00 committed by GitHub
parent 9c36dc485e
commit ba31f48f1a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
32 changed files with 690 additions and 64 deletions

View file

@ -16,6 +16,8 @@ model account {
updatedAt DateTime? @default(now()) @map("updated_at") @db.Timestamp(0)
accountUuid String @unique() @map("account_uuid") @db.VarChar(36)
website website[]
@@index([accountUuid])
}
model event {
@ -25,6 +27,7 @@ model event {
createdAt DateTime? @default(now()) @map("created_at") @db.Timestamp(0)
url String @db.VarChar(500)
eventName String @map("event_name") @db.VarChar(50)
eventUuid String @unique() @map("event_uuid") @db.VarChar(36)
session session @relation(fields: [sessionId], references: [id])
website website @relation(fields: [websiteId], references: [id])
eventData eventData?
@ -32,6 +35,7 @@ model event {
@@index([createdAt])
@@index([sessionId])
@@index([websiteId])
@@index([eventUuid])
}
model eventData {
@ -78,6 +82,7 @@ model session {
@@index([createdAt])
@@index([websiteId])
@@index([sessionUuid])
}
model website {
@ -94,4 +99,5 @@ model website {
session session[]
@@index([userId])
@@index([websiteUuid])
}