-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdatamodel.prisma
46 lines (42 loc) · 1.28 KB
/
datamodel.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
type EquipmentClass {
id: ID! @id
name: String!
code: String
description: String
equipmentClassProperties: [EquipmentClassProperty!]
equipments: [Equipment!] @relation(name: "EquipmentClassMapping")
parent: EquipmentClass @relation(name: "EquipmentClass")
children: [EquipmentClass!] @relation(name: "EquipmentClass")
}
type EquipmentClassProperty {
id: ID! @id
name: String!
code: String
description: String
equipmentClass: EquipmentClass!
parent: EquipmentClassProperty @relation(name:"EquipmentClassProperty")
children: [EquipmentClassProperty!] @relation(name:"EquipmentClassProperty")
}
type Equipment {
id: ID! @id
name: String!
code: String
description: String
equipmentProperties : [EquipmentProperty!]
equipmentClasses: [EquipmentClass!]! @relation(name: "EquipmentClassMapping", link: TABLE)
parent: Equipment @relation(name: "Equipment")
children: [Equipment!] @relation(name: "Equipment")
}
type EquipmentProperty {
id: ID! @id
name: String!
code: String
description: String
equipment: Equipment!
parent: EquipmentProperty @relation(name:"EquipmentProperty")
children: [EquipmentProperty!] @relation(name:"EquipmentProperty")
}
type EquipmentClassMapping @relationTable{
equipmentClass : EquipmentClass
equipment : Equipment
}