-
Notifications
You must be signed in to change notification settings - Fork 2
/
owl.prisma
91 lines (79 loc) · 1.61 KB
/
owl.prisma
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
type Team {
id: ID! @id
name: String! @unique
score: Int!
endpoints: [Endpoint!]!
}
type Service {
id: ID! @id
createdAt: DateTime! @createdAt
name: String! @unique
description: String! @default(value: "")
enabled: Boolean! @default(value: true)
variants: [ServiceVariant!]!
endpoints: [Endpoint!]!
}
type ServiceVariant {
id: Int! @id
service: Service!
hash: String @unique
attachment: String
}
type ServiceUpdateLog {
id: Int! @id
endpoint: Endpoint!
variant: ServiceVariant!
createdAt: DateTime! @createdAt
}
type Endpoint {
id: ID! @id
team: Team!
service: Service!
createdAt: DateTime! @createdAt
connectionString: String!
serviceUpdateLogs: [ServiceUpdateLog!]!
tasks: [Task!]!
}
type Day {
id: Int! @id
name: String!
startTime: DateTime!
endTime: DateTime!
roundDurationInSeconds: Int!
}
type Exploit {
id: ID! @id
target: Service!
updatedAt: DateTime! @updatedAt
name: String! @unique
attachment: String
tasks: [Task!]!
}
enum TaskStatus {
PENDING
EXPLOITING
SUBMITTING
SUBMIT_CORRECT
SUBMIT_DUPLICATE
SUBMIT_WRONG
SUBMIT_SKIPPED
EXPLOIT_INCOMPATIBLE
EXPLOIT_TIMEOUT
EXPLOIT_ERROR
SUBMIT_ERROR
UNKNOWN_ERROR
}
type Task {
id: Int! @id
exploit: Exploit!
endpoint: Endpoint!
createdAt: DateTime! @createdAt
updatedAt: DateTime! @updatedAt
status: TaskStatus! @default(value: PENDING)
statusMessage: String! @default(value: "")
flag: String
exploitStdout: String! @default(value: "")
exploitStderr: String! @default(value: "")
submitStdout: String! @default(value: "")
submitStderr: String! @default(value: "")
}