123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184 |
- # Generic Types
- "Multi-purpose meta information field"
- type Meta {
- "Unique id in the database"
- id: ID! @unique
- "Key for the meta information"
- key: String!
- "Value of the meta information"
- value: String!
- }
- type User {
- id: ID! @unique
- email: String! @unique
- name: String!
- abbreviation: String!
- password: String!
- images: [File]!
- comments: [Comment]! @relation(name: "CommentAuthor", onDelete: CASCADE)
- }
- type File {
- id: ID! @unique
- path: String!
- name: String
- description: String
- filename: String!
- mimetype: String!
- encoding: String!
- size: Int!
- }
- type Comment {
- id: ID! @unique
- text: String
- createdAt: DateTime!
- author: User! @relation(name: "CommentAuthor", onDelete: SET_NULL)
- }
- type Event {
- id: ID! @unique
- json: String!
- when: DateTime!
- }
- # Project Information
- type Project {
- id: ID! @unique
- name: String! @unique
- abbreviation: String! @unique
- description: String
- files: [File]!
- versions: [ProjectVersion]!
- }
- type ProjectVersion {
- id: ID! @unique
- name: String! @unique
- changes: [String]!
- date: DateTime!
- project: Project!
- }
- # Instruments
- type InstrumentParameter {
- id: ID! @unique
- tag: String!
- name: String
- description: String
- type: String!
- values: String
- instrument: Instrument! @relation(name: "Parameters", onDelete: SET_NULL)
- commands: [InstrumentCommand]! @relation(name: "CommandParameters", onDelete: SET_NULL)
- }
- type InstrumentCommand {
- id: ID! @unique
- tag: String!
- name: String
- description: String!
- readString: String
- writeString: String
- subsystem: String
- parameters: [InstrumentParameter]! @relation(name: "CommandParameters", onDelete: SET_NULL)
- }
- type Instrument {
- id: ID! @unique
- name: String!
- manufacturer: String!
- description: String
- picture: ID
- documents: [File]!
- interfaces: [String]!
- commands: [InstrumentCommand]!
- parameters: [InstrumentParameter]! @relation(name: "Parameters", onDelete: CASCADE)
- instances: [InstrumentInstance]! @relation(name: "InstrumentInstances", onDelete: CASCADE)
- }
- type InstrumentInstance {
- id: ID! @unique
- instrument: Instrument! @relation(name: "InstrumentInstances", onDelete: SET_NULL)
- identifier: String!
- label: String
- location: String
- }
- # DUT
- type DUT {
- id: ID! @unique
- name: String!
- description: String
- project: ProjectVersion!
- modifications: [String]!
- }
- # Setup
- type SetupHardware {
- id: ID! @unique
- name: String!
- description: String
- images: [File]!
- }
- type SetupHardwareInstance {
- id: ID! @unique
- setupHardware: SetupHardware!
- identifier: String!
- images: [File]!
- }
- type Setup {
- id: ID! @unique
- name: String!
- description: String!
- images: [File]!
- comments: [Comment]!
- setupHardware: [SetupHardwareInstance]!
- instruments: [InstrumentInstance]!
- }
- # Measurement
- type Measurement {
- id: ID! @unique
- createdAt: DateTime!
- intValue: Int
- floatValue: Float
- stringValue: String
- }
- type MeasurementRun {
- id: ID! @unique
- name: String!
- operators: [User]!
- location: String!
- temperature: Float
- startTime: DateTime!
- endTime: DateTime!
- log: [Event]!
- comments: [Comment]!
- measurements: [Measurement]!
- setup: Setup!
- }
- # Characterization
- type Characterization {
- id: ID! @unique
- name: String!
- projectVersion: ProjectVersion!
- measurementRuns: [MeasurementRun]!
- }
|