Skip to content

Commit

Permalink
fix schema issues to fix broken user interface
Browse files Browse the repository at this point in the history
  • Loading branch information
SrinivasanTarget committed Mar 18, 2024
1 parent 5049f1c commit bf7010b
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 43 deletions.
81 changes: 39 additions & 42 deletions prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -8,52 +8,49 @@ generator client {
}

model Build {
id String @id @default(uuid())
name String?
sessions Session[]
created_at DateTime @default(now())
updated_at DateTime @updatedAt
id String @id @default(uuid()) @map("id")
name String? @map("name")
sessions Session[] @relation("BuildToSession")
createdAt DateTime @default(now()) @map("created_at")
updatedAt DateTime @updatedAt @map("updated_at")
}

model Session {
id String @id
build_id String?
build Build? @relation(fields: [build_id], references: [id])
name String?
status String @default("running")
desired_capabilities String
session_capabilities String
node_id String
has_live_video Boolean
video_recording String?
start_time DateTime @default(now())
end_time DateTime?
failure_reason String?
//device properties
device_udid String
device_platform String
device_version String
device_name String?
// Timestamps
created_at DateTime @default(now())
updated_at DateTime @updatedAt
session_logs SessionLog[]
id String @id @map("id")
buildId String? @map("build_id")
build Build? @relation("BuildToSession", fields: [buildId], references: [id])
name String? @map("name")
status String @default("running") @map("status")
desiredCapabilities String @map("desired_capabilities")
sessionCapabilities String @map("session_capabilities")
nodeId String @map("node_id")
hasLiveVideo Boolean @map("has_live_video")
videoRecording String? @map("video_recording")
startTime DateTime @default(now()) @map("start_time")
endTime DateTime? @map("end_time")
failureReason String? @map("failure_reason")
deviceUdid String @map("device_udid")
devicePlatform String @map("device_platform")
deviceVersion String @map("device_version")
deviceName String? @map("device_name")
createdAt DateTime @default(now()) @map("created_at")
updatedAt DateTime @updatedAt @map("updated_at")
sessionLogs SessionLog[] @relation("SessionToSessionLog")
}

model SessionLog {
id String @id @default(uuid())
session_id String
session Session @relation(fields: [session_id], references: [id])
command_name String?
url String
method String
title String
subtitle String?
body String?
response String
screenshot String?
is_success Boolean?
// Timestamps
created_at DateTime @default(now())
updated_at DateTime @updatedAt
id String @id @default(uuid()) @map("id")
sessionId String @map("session_id")
session Session @relation("SessionToSessionLog", fields: [sessionId], references: [id])
commandName String? @map("command_name")
url String @map("url")
method String @map("method")
title String @map("title")
subtitle String? @map("subtitle")
body String? @map("body")
response String @map("response")
screenshot String? @map("screenshot")
isSuccess Boolean? @map("is_success")
createdAt DateTime @default(now()) @map("created_at")
updatedAt DateTime @updatedAt @map("updated_at")
}
2 changes: 1 addition & 1 deletion src/modules

0 comments on commit bf7010b

Please sign in to comment.