Prechádzať zdrojové kódy

prepared characterization structure.

Tomi Cvetic 5 rokov pred
rodič
commit
6937a048a3

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 549 - 250
backend/database/generated/prisma-client/index.d.ts


+ 4 - 0
backend/database/generated/prisma-client/index.js

@@ -4,6 +4,10 @@ var prisma_lib_1 = require("prisma-client-lib");
 var typeDefs = require("./prisma-schema").typeDefs;
 
 var models = [
+  {
+    name: "Meta",
+    embedded: false
+  },
   {
     name: "User",
     embedded: false

+ 393 - 93
backend/database/generated/prisma-client/prisma-schema.js

@@ -51,6 +51,10 @@ type AggregateMeasurementRun {
   count: Int!
 }
 
+type AggregateMeta {
+  count: Int!
+}
+
 type AggregateProject {
   count: Int!
 }
@@ -81,7 +85,8 @@ type BatchPayload {
 
 type Characterization {
   id: ID!
-  project: Project!
+  name: String!
+  projectVersion: ProjectVersion!
   measurementRuns(where: MeasurementRunWhereInput, orderBy: MeasurementRunOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [MeasurementRun!]
 }
 
@@ -92,7 +97,8 @@ type CharacterizationConnection {
 }
 
 input CharacterizationCreateInput {
-  project: ProjectCreateOneInput!
+  name: String!
+  projectVersion: ProjectVersionCreateOneInput!
   measurementRuns: MeasurementRunCreateManyInput
 }
 
@@ -104,6 +110,8 @@ type CharacterizationEdge {
 enum CharacterizationOrderByInput {
   id_ASC
   id_DESC
+  name_ASC
+  name_DESC
   createdAt_ASC
   createdAt_DESC
   updatedAt_ASC
@@ -112,6 +120,7 @@ enum CharacterizationOrderByInput {
 
 type CharacterizationPreviousValues {
   id: ID!
+  name: String!
 }
 
 type CharacterizationSubscriptionPayload {
@@ -133,10 +142,15 @@ input CharacterizationSubscriptionWhereInput {
 }
 
 input CharacterizationUpdateInput {
-  project: ProjectUpdateOneRequiredInput
+  name: String
+  projectVersion: ProjectVersionUpdateOneRequiredInput
   measurementRuns: MeasurementRunUpdateManyInput
 }
 
+input CharacterizationUpdateManyMutationInput {
+  name: String
+}
+
 input CharacterizationWhereInput {
   id: ID
   id_not: ID
@@ -152,7 +166,21 @@ input CharacterizationWhereInput {
   id_not_starts_with: ID
   id_ends_with: ID
   id_not_ends_with: ID
-  project: ProjectWhereInput
+  name: String
+  name_not: String
+  name_in: [String!]
+  name_not_in: [String!]
+  name_lt: String
+  name_lte: String
+  name_gt: String
+  name_gte: String
+  name_contains: String
+  name_not_contains: String
+  name_starts_with: String
+  name_not_starts_with: String
+  name_ends_with: String
+  name_not_ends_with: String
+  projectVersion: ProjectVersionWhereInput
   measurementRuns_every: MeasurementRunWhereInput
   measurementRuns_some: MeasurementRunWhereInput
   measurementRuns_none: MeasurementRunWhereInput
@@ -524,7 +552,7 @@ input DUTWhereUniqueInput {
 
 type Event {
   id: ID!
-  type: String!
+  json: String!
   when: DateTime!
 }
 
@@ -535,7 +563,7 @@ type EventConnection {
 }
 
 input EventCreateInput {
-  type: String!
+  json: String!
   when: DateTime!
 }
 
@@ -552,8 +580,8 @@ type EventEdge {
 enum EventOrderByInput {
   id_ASC
   id_DESC
-  type_ASC
-  type_DESC
+  json_ASC
+  json_DESC
   when_ASC
   when_DESC
   createdAt_ASC
@@ -564,7 +592,7 @@ enum EventOrderByInput {
 
 type EventPreviousValues {
   id: ID!
-  type: String!
+  json: String!
   when: DateTime!
 }
 
@@ -583,20 +611,20 @@ input EventScalarWhereInput {
   id_not_starts_with: ID
   id_ends_with: ID
   id_not_ends_with: ID
-  type: String
-  type_not: String
-  type_in: [String!]
-  type_not_in: [String!]
-  type_lt: String
-  type_lte: String
-  type_gt: String
-  type_gte: String
-  type_contains: String
-  type_not_contains: String
-  type_starts_with: String
-  type_not_starts_with: String
-  type_ends_with: String
-  type_not_ends_with: String
+  json: String
+  json_not: String
+  json_in: [String!]
+  json_not_in: [String!]
+  json_lt: String
+  json_lte: String
+  json_gt: String
+  json_gte: String
+  json_contains: String
+  json_not_contains: String
+  json_starts_with: String
+  json_not_starts_with: String
+  json_ends_with: String
+  json_not_ends_with: String
   when: DateTime
   when_not: DateTime
   when_in: [DateTime!]
@@ -629,17 +657,17 @@ input EventSubscriptionWhereInput {
 }
 
 input EventUpdateDataInput {
-  type: String
+  json: String
   when: DateTime
 }
 
 input EventUpdateInput {
-  type: String
+  json: String
   when: DateTime
 }
 
 input EventUpdateManyDataInput {
-  type: String
+  json: String
   when: DateTime
 }
 
@@ -656,7 +684,7 @@ input EventUpdateManyInput {
 }
 
 input EventUpdateManyMutationInput {
-  type: String
+  json: String
   when: DateTime
 }
 
@@ -691,20 +719,20 @@ input EventWhereInput {
   id_not_starts_with: ID
   id_ends_with: ID
   id_not_ends_with: ID
-  type: String
-  type_not: String
-  type_in: [String!]
-  type_not_in: [String!]
-  type_lt: String
-  type_lte: String
-  type_gt: String
-  type_gte: String
-  type_contains: String
-  type_not_contains: String
-  type_starts_with: String
-  type_not_starts_with: String
-  type_ends_with: String
-  type_not_ends_with: String
+  json: String
+  json_not: String
+  json_in: [String!]
+  json_not_in: [String!]
+  json_lt: String
+  json_lte: String
+  json_gt: String
+  json_gte: String
+  json_contains: String
+  json_not_contains: String
+  json_starts_with: String
+  json_not_starts_with: String
+  json_ends_with: String
+  json_not_ends_with: String
   when: DateTime
   when_not: DateTime
   when_in: [DateTime!]
@@ -2492,12 +2520,13 @@ type MeasurementPreviousValues {
 
 type MeasurementRun {
   id: ID!
-  operator(where: UserWhereInput, orderBy: UserOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [User!]
+  name: String!
+  operators(where: UserWhereInput, orderBy: UserOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [User!]
   location: String!
   temperature: Float
   startTime: DateTime!
   endTime: DateTime!
-  timeline(where: EventWhereInput, orderBy: EventOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [Event!]
+  log(where: EventWhereInput, orderBy: EventOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [Event!]
   comments(where: CommentWhereInput, orderBy: CommentOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [Comment!]
   measurements(where: MeasurementWhereInput, orderBy: MeasurementOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [Measurement!]
   setup: Setup!
@@ -2510,12 +2539,13 @@ type MeasurementRunConnection {
 }
 
 input MeasurementRunCreateInput {
-  operator: UserCreateManyInput
+  name: String!
+  operators: UserCreateManyInput
   location: String!
   temperature: Float
   startTime: DateTime!
   endTime: DateTime!
-  timeline: EventCreateManyInput
+  log: EventCreateManyInput
   comments: CommentCreateManyInput
   measurements: MeasurementCreateManyInput
   setup: SetupCreateOneInput!
@@ -2534,6 +2564,8 @@ type MeasurementRunEdge {
 enum MeasurementRunOrderByInput {
   id_ASC
   id_DESC
+  name_ASC
+  name_DESC
   location_ASC
   location_DESC
   temperature_ASC
@@ -2550,6 +2582,7 @@ enum MeasurementRunOrderByInput {
 
 type MeasurementRunPreviousValues {
   id: ID!
+  name: String!
   location: String!
   temperature: Float
   startTime: DateTime!
@@ -2571,6 +2604,20 @@ input MeasurementRunScalarWhereInput {
   id_not_starts_with: ID
   id_ends_with: ID
   id_not_ends_with: ID
+  name: String
+  name_not: String
+  name_in: [String!]
+  name_not_in: [String!]
+  name_lt: String
+  name_lte: String
+  name_gt: String
+  name_gte: String
+  name_contains: String
+  name_not_contains: String
+  name_starts_with: String
+  name_not_starts_with: String
+  name_ends_with: String
+  name_not_ends_with: String
   location: String
   location_not: String
   location_in: [String!]
@@ -2633,30 +2680,33 @@ input MeasurementRunSubscriptionWhereInput {
 }
 
 input MeasurementRunUpdateDataInput {
-  operator: UserUpdateManyInput
+  name: String
+  operators: UserUpdateManyInput
   location: String
   temperature: Float
   startTime: DateTime
   endTime: DateTime
-  timeline: EventUpdateManyInput
+  log: EventUpdateManyInput
   comments: CommentUpdateManyInput
   measurements: MeasurementUpdateManyInput
   setup: SetupUpdateOneRequiredInput
 }
 
 input MeasurementRunUpdateInput {
-  operator: UserUpdateManyInput
+  name: String
+  operators: UserUpdateManyInput
   location: String
   temperature: Float
   startTime: DateTime
   endTime: DateTime
-  timeline: EventUpdateManyInput
+  log: EventUpdateManyInput
   comments: CommentUpdateManyInput
   measurements: MeasurementUpdateManyInput
   setup: SetupUpdateOneRequiredInput
 }
 
 input MeasurementRunUpdateManyDataInput {
+  name: String
   location: String
   temperature: Float
   startTime: DateTime
@@ -2676,6 +2726,7 @@ input MeasurementRunUpdateManyInput {
 }
 
 input MeasurementRunUpdateManyMutationInput {
+  name: String
   location: String
   temperature: Float
   startTime: DateTime
@@ -2713,9 +2764,23 @@ input MeasurementRunWhereInput {
   id_not_starts_with: ID
   id_ends_with: ID
   id_not_ends_with: ID
-  operator_every: UserWhereInput
-  operator_some: UserWhereInput
-  operator_none: UserWhereInput
+  name: String
+  name_not: String
+  name_in: [String!]
+  name_not_in: [String!]
+  name_lt: String
+  name_lte: String
+  name_gt: String
+  name_gte: String
+  name_contains: String
+  name_not_contains: String
+  name_starts_with: String
+  name_not_starts_with: String
+  name_ends_with: String
+  name_not_ends_with: String
+  operators_every: UserWhereInput
+  operators_some: UserWhereInput
+  operators_none: UserWhereInput
   location: String
   location_not: String
   location_in: [String!]
@@ -2754,9 +2819,9 @@ input MeasurementRunWhereInput {
   endTime_lte: DateTime
   endTime_gt: DateTime
   endTime_gte: DateTime
-  timeline_every: EventWhereInput
-  timeline_some: EventWhereInput
-  timeline_none: EventWhereInput
+  log_every: EventWhereInput
+  log_some: EventWhereInput
+  log_none: EventWhereInput
   comments_every: CommentWhereInput
   comments_some: CommentWhereInput
   comments_none: CommentWhereInput
@@ -2963,9 +3028,131 @@ input MeasurementWhereUniqueInput {
   id: ID
 }
 
+type Meta {
+  id: ID!
+  key: String!
+  value: String!
+}
+
+type MetaConnection {
+  pageInfo: PageInfo!
+  edges: [MetaEdge]!
+  aggregate: AggregateMeta!
+}
+
+input MetaCreateInput {
+  key: String!
+  value: String!
+}
+
+type MetaEdge {
+  node: Meta!
+  cursor: String!
+}
+
+enum MetaOrderByInput {
+  id_ASC
+  id_DESC
+  key_ASC
+  key_DESC
+  value_ASC
+  value_DESC
+  createdAt_ASC
+  createdAt_DESC
+  updatedAt_ASC
+  updatedAt_DESC
+}
+
+type MetaPreviousValues {
+  id: ID!
+  key: String!
+  value: String!
+}
+
+type MetaSubscriptionPayload {
+  mutation: MutationType!
+  node: Meta
+  updatedFields: [String!]
+  previousValues: MetaPreviousValues
+}
+
+input MetaSubscriptionWhereInput {
+  mutation_in: [MutationType!]
+  updatedFields_contains: String
+  updatedFields_contains_every: [String!]
+  updatedFields_contains_some: [String!]
+  node: MetaWhereInput
+  AND: [MetaSubscriptionWhereInput!]
+  OR: [MetaSubscriptionWhereInput!]
+  NOT: [MetaSubscriptionWhereInput!]
+}
+
+input MetaUpdateInput {
+  key: String
+  value: String
+}
+
+input MetaUpdateManyMutationInput {
+  key: String
+  value: String
+}
+
+input MetaWhereInput {
+  id: ID
+  id_not: ID
+  id_in: [ID!]
+  id_not_in: [ID!]
+  id_lt: ID
+  id_lte: ID
+  id_gt: ID
+  id_gte: ID
+  id_contains: ID
+  id_not_contains: ID
+  id_starts_with: ID
+  id_not_starts_with: ID
+  id_ends_with: ID
+  id_not_ends_with: ID
+  key: String
+  key_not: String
+  key_in: [String!]
+  key_not_in: [String!]
+  key_lt: String
+  key_lte: String
+  key_gt: String
+  key_gte: String
+  key_contains: String
+  key_not_contains: String
+  key_starts_with: String
+  key_not_starts_with: String
+  key_ends_with: String
+  key_not_ends_with: String
+  value: String
+  value_not: String
+  value_in: [String!]
+  value_not_in: [String!]
+  value_lt: String
+  value_lte: String
+  value_gt: String
+  value_gte: String
+  value_contains: String
+  value_not_contains: String
+  value_starts_with: String
+  value_not_starts_with: String
+  value_ends_with: String
+  value_not_ends_with: String
+  AND: [MetaWhereInput!]
+  OR: [MetaWhereInput!]
+  NOT: [MetaWhereInput!]
+}
+
+input MetaWhereUniqueInput {
+  id: ID
+}
+
 type Mutation {
   createCharacterization(data: CharacterizationCreateInput!): Characterization!
   updateCharacterization(data: CharacterizationUpdateInput!, where: CharacterizationWhereUniqueInput!): Characterization
+  updateManyCharacterizations(data: CharacterizationUpdateManyMutationInput!, where: CharacterizationWhereInput): BatchPayload!
   upsertCharacterization(where: CharacterizationWhereUniqueInput!, create: CharacterizationCreateInput!, update: CharacterizationUpdateInput!): Characterization!
   deleteCharacterization(where: CharacterizationWhereUniqueInput!): Characterization
   deleteManyCharacterizations(where: CharacterizationWhereInput): BatchPayload!
@@ -3035,6 +3222,12 @@ type Mutation {
   upsertMeasurementRun(where: MeasurementRunWhereUniqueInput!, create: MeasurementRunCreateInput!, update: MeasurementRunUpdateInput!): MeasurementRun!
   deleteMeasurementRun(where: MeasurementRunWhereUniqueInput!): MeasurementRun
   deleteManyMeasurementRuns(where: MeasurementRunWhereInput): BatchPayload!
+  createMeta(data: MetaCreateInput!): Meta!
+  updateMeta(data: MetaUpdateInput!, where: MetaWhereUniqueInput!): Meta
+  updateManyMetas(data: MetaUpdateManyMutationInput!, where: MetaWhereInput): BatchPayload!
+  upsertMeta(where: MetaWhereUniqueInput!, create: MetaCreateInput!, update: MetaUpdateInput!): Meta!
+  deleteMeta(where: MetaWhereUniqueInput!): Meta
+  deleteManyMetas(where: MetaWhereInput): BatchPayload!
   createProject(data: ProjectCreateInput!): Project!
   updateProject(data: ProjectUpdateInput!, where: ProjectWhereUniqueInput!): Project
   updateManyProjects(data: ProjectUpdateManyMutationInput!, where: ProjectWhereInput): BatchPayload!
@@ -3096,6 +3289,7 @@ type Project {
   abbreviation: String!
   description: String
   images(where: FileWhereInput, orderBy: FileOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [File!]
+  versions(where: ProjectVersionWhereInput, orderBy: ProjectVersionOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [ProjectVersion!]
 }
 
 type ProjectConnection {
@@ -3109,13 +3303,21 @@ input ProjectCreateInput {
   abbreviation: String!
   description: String
   images: FileCreateManyInput
+  versions: ProjectVersionCreateManyWithoutProjectInput
 }
 
-input ProjectCreateOneInput {
-  create: ProjectCreateInput
+input ProjectCreateOneWithoutVersionsInput {
+  create: ProjectCreateWithoutVersionsInput
   connect: ProjectWhereUniqueInput
 }
 
+input ProjectCreateWithoutVersionsInput {
+  name: String!
+  abbreviation: String!
+  description: String
+  images: FileCreateManyInput
+}
+
 type ProjectEdge {
   node: Project!
   cursor: String!
@@ -3161,18 +3363,12 @@ input ProjectSubscriptionWhereInput {
   NOT: [ProjectSubscriptionWhereInput!]
 }
 
-input ProjectUpdateDataInput {
-  name: String
-  abbreviation: String
-  description: String
-  images: FileUpdateManyInput
-}
-
 input ProjectUpdateInput {
   name: String
   abbreviation: String
   description: String
   images: FileUpdateManyInput
+  versions: ProjectVersionUpdateManyWithoutProjectInput
 }
 
 input ProjectUpdateManyMutationInput {
@@ -3181,23 +3377,31 @@ input ProjectUpdateManyMutationInput {
   description: String
 }
 
-input ProjectUpdateOneRequiredInput {
-  create: ProjectCreateInput
-  update: ProjectUpdateDataInput
-  upsert: ProjectUpsertNestedInput
+input ProjectUpdateOneRequiredWithoutVersionsInput {
+  create: ProjectCreateWithoutVersionsInput
+  update: ProjectUpdateWithoutVersionsDataInput
+  upsert: ProjectUpsertWithoutVersionsInput
   connect: ProjectWhereUniqueInput
 }
 
-input ProjectUpsertNestedInput {
-  update: ProjectUpdateDataInput!
-  create: ProjectCreateInput!
+input ProjectUpdateWithoutVersionsDataInput {
+  name: String
+  abbreviation: String
+  description: String
+  images: FileUpdateManyInput
+}
+
+input ProjectUpsertWithoutVersionsInput {
+  update: ProjectUpdateWithoutVersionsDataInput!
+  create: ProjectCreateWithoutVersionsInput!
 }
 
 type ProjectVersion {
   id: ID!
   name: String!
-  changes: String!
+  changes: [String!]!
   date: DateTime!
+  project: Project!
 }
 
 type ProjectVersionConnection {
@@ -3206,10 +3410,20 @@ type ProjectVersionConnection {
   aggregate: AggregateProjectVersion!
 }
 
+input ProjectVersionCreatechangesInput {
+  set: [String!]
+}
+
 input ProjectVersionCreateInput {
   name: String!
-  changes: String!
+  changes: ProjectVersionCreatechangesInput
   date: DateTime!
+  project: ProjectCreateOneWithoutVersionsInput!
+}
+
+input ProjectVersionCreateManyWithoutProjectInput {
+  create: [ProjectVersionCreateWithoutProjectInput!]
+  connect: [ProjectVersionWhereUniqueInput!]
 }
 
 input ProjectVersionCreateOneInput {
@@ -3217,6 +3431,12 @@ input ProjectVersionCreateOneInput {
   connect: ProjectVersionWhereUniqueInput
 }
 
+input ProjectVersionCreateWithoutProjectInput {
+  name: String!
+  changes: ProjectVersionCreatechangesInput
+  date: DateTime!
+}
+
 type ProjectVersionEdge {
   node: ProjectVersion!
   cursor: String!
@@ -3227,8 +3447,6 @@ enum ProjectVersionOrderByInput {
   id_DESC
   name_ASC
   name_DESC
-  changes_ASC
-  changes_DESC
   date_ASC
   date_DESC
   createdAt_ASC
@@ -3240,10 +3458,52 @@ enum ProjectVersionOrderByInput {
 type ProjectVersionPreviousValues {
   id: ID!
   name: String!
-  changes: String!
+  changes: [String!]!
   date: DateTime!
 }
 
+input ProjectVersionScalarWhereInput {
+  id: ID
+  id_not: ID
+  id_in: [ID!]
+  id_not_in: [ID!]
+  id_lt: ID
+  id_lte: ID
+  id_gt: ID
+  id_gte: ID
+  id_contains: ID
+  id_not_contains: ID
+  id_starts_with: ID
+  id_not_starts_with: ID
+  id_ends_with: ID
+  id_not_ends_with: ID
+  name: String
+  name_not: String
+  name_in: [String!]
+  name_not_in: [String!]
+  name_lt: String
+  name_lte: String
+  name_gt: String
+  name_gte: String
+  name_contains: String
+  name_not_contains: String
+  name_starts_with: String
+  name_not_starts_with: String
+  name_ends_with: String
+  name_not_ends_with: String
+  date: DateTime
+  date_not: DateTime
+  date_in: [DateTime!]
+  date_not_in: [DateTime!]
+  date_lt: DateTime
+  date_lte: DateTime
+  date_gt: DateTime
+  date_gte: DateTime
+  AND: [ProjectVersionScalarWhereInput!]
+  OR: [ProjectVersionScalarWhereInput!]
+  NOT: [ProjectVersionScalarWhereInput!]
+}
+
 type ProjectVersionSubscriptionPayload {
   mutation: MutationType!
   node: ProjectVersion
@@ -3262,24 +3522,53 @@ input ProjectVersionSubscriptionWhereInput {
   NOT: [ProjectVersionSubscriptionWhereInput!]
 }
 
+input ProjectVersionUpdatechangesInput {
+  set: [String!]
+}
+
 input ProjectVersionUpdateDataInput {
   name: String
-  changes: String
+  changes: ProjectVersionUpdatechangesInput
   date: DateTime
+  project: ProjectUpdateOneRequiredWithoutVersionsInput
 }
 
 input ProjectVersionUpdateInput {
   name: String
-  changes: String
+  changes: ProjectVersionUpdatechangesInput
+  date: DateTime
+  project: ProjectUpdateOneRequiredWithoutVersionsInput
+}
+
+input ProjectVersionUpdateManyDataInput {
+  name: String
+  changes: ProjectVersionUpdatechangesInput
   date: DateTime
 }
 
 input ProjectVersionUpdateManyMutationInput {
   name: String
-  changes: String
+  changes: ProjectVersionUpdatechangesInput
   date: DateTime
 }
 
+input ProjectVersionUpdateManyWithoutProjectInput {
+  create: [ProjectVersionCreateWithoutProjectInput!]
+  delete: [ProjectVersionWhereUniqueInput!]
+  connect: [ProjectVersionWhereUniqueInput!]
+  set: [ProjectVersionWhereUniqueInput!]
+  disconnect: [ProjectVersionWhereUniqueInput!]
+  update: [ProjectVersionUpdateWithWhereUniqueWithoutProjectInput!]
+  upsert: [ProjectVersionUpsertWithWhereUniqueWithoutProjectInput!]
+  deleteMany: [ProjectVersionScalarWhereInput!]
+  updateMany: [ProjectVersionUpdateManyWithWhereNestedInput!]
+}
+
+input ProjectVersionUpdateManyWithWhereNestedInput {
+  where: ProjectVersionScalarWhereInput!
+  data: ProjectVersionUpdateManyDataInput!
+}
+
 input ProjectVersionUpdateOneRequiredInput {
   create: ProjectVersionCreateInput
   update: ProjectVersionUpdateDataInput
@@ -3287,11 +3576,28 @@ input ProjectVersionUpdateOneRequiredInput {
   connect: ProjectVersionWhereUniqueInput
 }
 
+input ProjectVersionUpdateWithoutProjectDataInput {
+  name: String
+  changes: ProjectVersionUpdatechangesInput
+  date: DateTime
+}
+
+input ProjectVersionUpdateWithWhereUniqueWithoutProjectInput {
+  where: ProjectVersionWhereUniqueInput!
+  data: ProjectVersionUpdateWithoutProjectDataInput!
+}
+
 input ProjectVersionUpsertNestedInput {
   update: ProjectVersionUpdateDataInput!
   create: ProjectVersionCreateInput!
 }
 
+input ProjectVersionUpsertWithWhereUniqueWithoutProjectInput {
+  where: ProjectVersionWhereUniqueInput!
+  update: ProjectVersionUpdateWithoutProjectDataInput!
+  create: ProjectVersionCreateWithoutProjectInput!
+}
+
 input ProjectVersionWhereInput {
   id: ID
   id_not: ID
@@ -3321,20 +3627,6 @@ input ProjectVersionWhereInput {
   name_not_starts_with: String
   name_ends_with: String
   name_not_ends_with: String
-  changes: String
-  changes_not: String
-  changes_in: [String!]
-  changes_not_in: [String!]
-  changes_lt: String
-  changes_lte: String
-  changes_gt: String
-  changes_gte: String
-  changes_contains: String
-  changes_not_contains: String
-  changes_starts_with: String
-  changes_not_starts_with: String
-  changes_ends_with: String
-  changes_not_ends_with: String
   date: DateTime
   date_not: DateTime
   date_in: [DateTime!]
@@ -3343,6 +3635,7 @@ input ProjectVersionWhereInput {
   date_lte: DateTime
   date_gt: DateTime
   date_gte: DateTime
+  project: ProjectWhereInput
   AND: [ProjectVersionWhereInput!]
   OR: [ProjectVersionWhereInput!]
   NOT: [ProjectVersionWhereInput!]
@@ -3413,6 +3706,9 @@ input ProjectWhereInput {
   images_every: FileWhereInput
   images_some: FileWhereInput
   images_none: FileWhereInput
+  versions_every: ProjectVersionWhereInput
+  versions_some: ProjectVersionWhereInput
+  versions_none: ProjectVersionWhereInput
   AND: [ProjectWhereInput!]
   OR: [ProjectWhereInput!]
   NOT: [ProjectWhereInput!]
@@ -3461,6 +3757,9 @@ type Query {
   measurementRun(where: MeasurementRunWhereUniqueInput!): MeasurementRun
   measurementRuns(where: MeasurementRunWhereInput, orderBy: MeasurementRunOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [MeasurementRun]!
   measurementRunsConnection(where: MeasurementRunWhereInput, orderBy: MeasurementRunOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): MeasurementRunConnection!
+  meta(where: MetaWhereUniqueInput!): Meta
+  metas(where: MetaWhereInput, orderBy: MetaOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [Meta]!
+  metasConnection(where: MetaWhereInput, orderBy: MetaOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): MetaConnection!
   project(where: ProjectWhereUniqueInput!): Project
   projects(where: ProjectWhereInput, orderBy: ProjectOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [Project]!
   projectsConnection(where: ProjectWhereInput, orderBy: ProjectOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): ProjectConnection!
@@ -4003,6 +4302,7 @@ type Subscription {
   instrumentSubsystem(where: InstrumentSubsystemSubscriptionWhereInput): InstrumentSubsystemSubscriptionPayload
   measurement(where: MeasurementSubscriptionWhereInput): MeasurementSubscriptionPayload
   measurementRun(where: MeasurementRunSubscriptionWhereInput): MeasurementRunSubscriptionPayload
+  meta(where: MetaSubscriptionWhereInput): MetaSubscriptionPayload
   project(where: ProjectSubscriptionWhereInput): ProjectSubscriptionPayload
   projectVersion(where: ProjectVersionSubscriptionWhereInput): ProjectVersionSubscriptionPayload
   setup(where: SetupSubscriptionWhereInput): SetupSubscriptionPayload

+ 9 - 5
backend/datamodel.prisma

@@ -33,7 +33,7 @@ type Comment {
 
 type Event {
   id: ID! @unique
-  type: String!
+  json: String!
   when: DateTime!
 }
 
@@ -46,13 +46,15 @@ type Project {
   abbreviation: String! @unique
   description: String
   images: [File]!
+  versions: [ProjectVersion]!
 }
 
 type ProjectVersion {
   id: ID! @unique
   name: String! @unique
-  changes: String!
+  changes: [String]!
   date: DateTime!
+  project: Project!
 }
 
 
@@ -158,12 +160,13 @@ type Measurement {
 
 type MeasurementRun {
   id: ID! @unique
-  operator: [User]!
+  name: String!
+  operators: [User]!
   location: String!
   temperature: Float
   startTime: DateTime!
   endTime: DateTime!
-  timeline: [Event]!
+  log: [Event]!
   comments: [Comment]!
   measurements: [Measurement]!
   setup: Setup!
@@ -174,6 +177,7 @@ type MeasurementRun {
 
 type Characterization {
   id: ID! @unique
-  project: Project!
+  name: String!
+  projectVersion: ProjectVersion!
   measurementRuns: [MeasurementRun]!
 }

+ 20 - 0
frontend/components/Characterization.js

@@ -0,0 +1,20 @@
+import React from 'react'
+import ProjectVersion from './ProjectVersion'
+import MeasurementRun from './MeasurementRun'
+
+class Characterization extends React.Component {
+  render() {
+    const { name, projectVersion, measurementRuns } = this.props.data
+    return (
+      <div>
+        <h1>{name}</h1>
+        <ProjectVersion data={projectVersion} />
+        {measurementRuns.map(measurementRun =>
+          <MeasurementRun key={measurementRun.id} data={measurementRun} />)
+        }
+      </div>
+    )
+  }
+}
+
+export default Characterization

+ 5 - 0
frontend/components/Comment.js

@@ -0,0 +1,5 @@
+const Comment = props => (
+  <div>This is a comment</div>
+)
+
+export default Comment

+ 5 - 0
frontend/components/Event.js

@@ -0,0 +1,5 @@
+const Event = props => (
+  <div>An event</div>
+)
+
+export default Event

+ 3 - 0
frontend/components/Header.js

@@ -29,6 +29,9 @@ const Header = props => {
       <Link href='/interfaces'>
         <a>Interfaces</a>
       </Link>
+      <Link href='/characterization'>
+        <a>Characterization</a>
+      </Link>
       <Link href='/user'>
         <a>{user ? user.name : 'User'}</a>
       </Link>

+ 6 - 0
frontend/components/Interface.js

@@ -1 +1,7 @@
 import React from 'react'
+
+const Interface = props => (
+  <div>Interface</div>
+)
+
+export default Interface

+ 15 - 0
frontend/components/Log.js

@@ -0,0 +1,15 @@
+import React from 'react'
+
+const LogItem = props => (
+  <div>{props.title}</div>
+)
+
+const Log = props => (
+  <ul>
+    <li><LogItem title="Log item 1" /></li>
+    <li><LogItem title="Log item 2" /></li>
+    <li><LogItem title="Log item 3" /></li>
+  </ul>
+)
+
+export default Log

+ 4 - 0
frontend/components/Measurement.js

@@ -0,0 +1,4 @@
+const Measurement = props => (
+  <div>This is a measurment.</div>
+)
+export default Measurement

+ 29 - 0
frontend/components/MeasurementRun.js

@@ -0,0 +1,29 @@
+import React from 'react'
+import Event from './Event'
+import Comment from './Comment'
+import Measurement from './Measurement'
+import Setup from './Setup'
+
+const MeasurementRun = props => {
+  const {
+    name, operators, location, temperature,
+    startTime, endTime, log, comments,
+    measurements, setup
+  } = props.data
+  return (
+    <div>
+      <h2>{name}</h2>
+      <p>{operators.map(operator => operator.name).join(', ')}</p>
+      <p>{location}</p>
+      <p>{temperature}</p>
+      <p>{startTime}</p>
+      <p>{endTime}</p>
+      <Setup setup={setup} />
+      {log.map(event => <Event event={event} />)}
+      {comments.map(comment => <Comment comment={comment} />)}
+      {measurements.map(measurement => <Measurement measurement={measurement} />)}
+    </div>
+  )
+}
+
+export default MeasurementRun

+ 5 - 0
frontend/components/Project.js

@@ -0,0 +1,5 @@
+const Project = props => (
+  <div>This is a project</div>
+)
+
+export default Project

+ 17 - 0
frontend/components/ProjectVersion.js

@@ -0,0 +1,17 @@
+import Project from './Project'
+
+const ProjectVersion = props => {
+  const { id, name, changes, date, project } = props.data
+  return (
+    <div>
+      <Project project={project} />
+      <h2>Project version: {name}</h2>
+      <p>{date}</p>
+      <ul>
+        {changes.map(change => <li>{change}</li>)}
+      </ul>
+    </div>
+  )
+}
+
+export default ProjectVersion

+ 5 - 0
frontend/components/Setup.js

@@ -0,0 +1,5 @@
+const Setup = props => (
+  <div>This is a setup.</div>
+)
+
+export default Setup

+ 43 - 0
frontend/pages/characterization.js

@@ -0,0 +1,43 @@
+import Characterization from '../components/Characterization'
+
+const MOCK_DATA = {
+  name: "DCDC Efficiency",
+  projectVersion: {
+    id: "ashvkjhskrjhskfsvsfs",
+    name: "Production Tapeout",
+    changes: ['DCDC removed', 'Logo changed'],
+    date: Date.now(),
+    project: {
+
+    }
+  },
+  measurementRuns: [{
+    id: "asdsdghwkerhkvbsdf",
+    name: "Temperature sweep with L=5nH",
+    operators: [{
+      name: "Tomi"
+    }],
+    location: "Thalwil",
+    temperature: 24.5,
+    startTime: Date.now(),
+    endTime: Date.now(),
+    log: [],
+    comments: [],
+    measurements: [],
+    setup: {
+      id: "jnerktnkfjgnksdf",
+      name: "DCDC Setup",
+      description: "JU characterization board",
+      images: [],
+      comments: [],
+      setupHardware: [],
+      instruments: []
+    }
+  }]
+}
+
+const CharacterizationPage = props => (
+  <Characterization data={MOCK_DATA} />
+)
+
+export default CharacterizationPage

Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov