|
|
@ -412,41 +412,41 @@ input EquipmentTypeUpdateInput {
|
|
|
|
"An Event is a point in time, when the state of the bike somehow changed."
|
|
|
|
"An Event is a point in time, when the state of the bike somehow changed."
|
|
|
|
type BikeEvent {
|
|
|
|
type BikeEvent {
|
|
|
|
id: ID!
|
|
|
|
id: ID!
|
|
|
|
eventType: BikeEventType!
|
|
|
|
bikeEventType: BikeEventType!
|
|
|
|
cargoBike: CargoBike!
|
|
|
|
cargoBike: CargoBike!
|
|
|
|
|
|
|
|
responsible: Participant
|
|
|
|
|
|
|
|
related: Participant
|
|
|
|
date: Date!
|
|
|
|
date: Date!
|
|
|
|
note: String
|
|
|
|
description: String
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
Path to documents
|
|
|
|
Path to documents
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
documents: [String]!
|
|
|
|
documents: [String]!
|
|
|
|
|
|
|
|
remark: String
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
input BikeEventCreateInput {
|
|
|
|
input BikeEventCreateInput {
|
|
|
|
eventType: BikeEventType!
|
|
|
|
bikeEventTypeId: ID!
|
|
|
|
"it is enough to pass the cargoBike id"
|
|
|
|
|
|
|
|
cargoBikeId: ID!
|
|
|
|
cargoBikeId: ID!
|
|
|
|
|
|
|
|
responsibleId: ID
|
|
|
|
|
|
|
|
relatedId: ID
|
|
|
|
date: Date!
|
|
|
|
date: Date!
|
|
|
|
note: String
|
|
|
|
description: String
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
Path to documents
|
|
|
|
Path to documents
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
documents: [String]!
|
|
|
|
documents: [String]
|
|
|
|
|
|
|
|
remark: String
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
"TODO: Some eventTypes are missing"
|
|
|
|
type BikeEventType {
|
|
|
|
enum BikeEventType {
|
|
|
|
id: ID!
|
|
|
|
"""
|
|
|
|
name: String!
|
|
|
|
The enum EventType can also be represented as an enum in postgresQL.
|
|
|
|
}
|
|
|
|
It is possible to add items to an enum in postgresQL without changing the source code.
|
|
|
|
|
|
|
|
However, it not possible to change the graphQL schema.
|
|
|
|
input BikeEventTypeInput {
|
|
|
|
Concluding we should not use an enum here, if users want to add EventTypes to the enum.
|
|
|
|
id: ID!
|
|
|
|
"""
|
|
|
|
name: String
|
|
|
|
KAUF
|
|
|
|
|
|
|
|
INBETRIEBNAHME
|
|
|
|
|
|
|
|
AUSFALL
|
|
|
|
|
|
|
|
WARTUNG
|
|
|
|
|
|
|
|
ANDERE
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
"How are the dimensions and how much weight can handle a bike. This data is merged in the CargoBike table and the BikeModel table."
|
|
|
|
"How are the dimensions and how much weight can handle a bike. This data is merged in the CargoBike table and the BikeModel table."
|
|
|
@ -803,12 +803,16 @@ type Query {
|
|
|
|
timeframes(offset: Int!, limit: Int!): [TimeFrame]!
|
|
|
|
timeframes(offset: Int!, limit: Int!): [TimeFrame]!
|
|
|
|
contactInformation(offset: Int!, limit: Int!): [ContactInformation]!
|
|
|
|
contactInformation(offset: Int!, limit: Int!): [ContactInformation]!
|
|
|
|
persons(offset: Int!, limit: Int!): [Person]
|
|
|
|
persons(offset: Int!, limit: Int!): [Person]
|
|
|
|
|
|
|
|
bikeEventTypes(offset: Int!, limit: Int!): [BikeEventType]
|
|
|
|
"returns BikeEvent with CargoBike"
|
|
|
|
"returns BikeEvent with CargoBike"
|
|
|
|
bikeEventById(id:ID!): BikeEvent!
|
|
|
|
bikeEventById(id:ID!): BikeEvent!
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
type Mutation {
|
|
|
|
type Mutation {
|
|
|
|
"creates new cargoBike and returns cargobike with new ID"
|
|
|
|
"""
|
|
|
|
|
|
|
|
CargoBikes
|
|
|
|
|
|
|
|
creates new cargoBike and returns cargobike with new ID
|
|
|
|
|
|
|
|
"""
|
|
|
|
createCargoBike(cargoBike: CargoBikeCreateInput!): CargoBike!
|
|
|
|
createCargoBike(cargoBike: CargoBikeCreateInput!): CargoBike!
|
|
|
|
"lock cargoBike returns bike if bike is not locked and locks bike or Error if bike cannot be locked"
|
|
|
|
"lock cargoBike returns bike if bike is not locked and locks bike or Error if bike cannot be locked"
|
|
|
|
lockCargoBikeById(id: ID!): CargoBike!
|
|
|
|
lockCargoBikeById(id: ID!): CargoBike!
|
|
|
@ -816,7 +820,10 @@ type Mutation {
|
|
|
|
unlockCargoBikeById(id: ID!): Boolean!
|
|
|
|
unlockCargoBikeById(id: ID!): Boolean!
|
|
|
|
"updates cargoBike of given ID with supplied fields and returns updated cargoBike"
|
|
|
|
"updates cargoBike of given ID with supplied fields and returns updated cargoBike"
|
|
|
|
updateCargoBike(cargoBike: CargoBikeUpdateInput!): CargoBike!
|
|
|
|
updateCargoBike(cargoBike: CargoBikeUpdateInput!): CargoBike!
|
|
|
|
"creates new peace of unique Equipment"
|
|
|
|
"""
|
|
|
|
|
|
|
|
EQUIPMENT
|
|
|
|
|
|
|
|
creates new peace of unique Equipment
|
|
|
|
|
|
|
|
"""
|
|
|
|
createEquipment(equipment: EquipmentCreateInput!): Equipment!
|
|
|
|
createEquipment(equipment: EquipmentCreateInput!): Equipment!
|
|
|
|
"lock equipment returns true if bike is not locked or if it doesnt exist"
|
|
|
|
"lock equipment returns true if bike is not locked or if it doesnt exist"
|
|
|
|
lockEquipmentById(id: ID!): Equipment!
|
|
|
|
lockEquipmentById(id: ID!): Equipment!
|
|
|
@ -825,13 +832,20 @@ type Mutation {
|
|
|
|
"update Equipment, returns updated equipment. CargoBike will be null, if cargoBikeId is not set. Pass null for cargoBikeIs to delete the relation"
|
|
|
|
"update Equipment, returns updated equipment. CargoBike will be null, if cargoBikeId is not set. Pass null for cargoBikeIs to delete the relation"
|
|
|
|
updateEquipment(equipment: EquipmentUpdateInput!): Equipment!
|
|
|
|
updateEquipment(equipment: EquipmentUpdateInput!): Equipment!
|
|
|
|
createEquipmentType(equipmentType: EquipmentTypeCreateInput!): EquipmentType!
|
|
|
|
createEquipmentType(equipmentType: EquipmentTypeCreateInput!): EquipmentType!
|
|
|
|
"creates new lendingStation and returns lendingStation with new ID"
|
|
|
|
"""
|
|
|
|
|
|
|
|
LENDINGSTATION
|
|
|
|
|
|
|
|
creates new lendingStation and returns lendingStation with new ID
|
|
|
|
|
|
|
|
"""
|
|
|
|
createLendingStation(lendingStation: LendingStationCreateInput): LendingStation!
|
|
|
|
createLendingStation(lendingStation: LendingStationCreateInput): LendingStation!
|
|
|
|
"updates lendingStation of given ID with supplied fields and returns updated lendingStation"
|
|
|
|
"updates lendingStation of given ID with supplied fields and returns updated lendingStation"
|
|
|
|
updateLendingStation(lendingStation: LendingStationUpdateInput!): LendingStation!
|
|
|
|
updateLendingStation(lendingStation: LendingStationUpdateInput!): LendingStation!
|
|
|
|
createTimeFrame(timeFrame: TimeFrameCreateInput!): TimeFrame!
|
|
|
|
createTimeFrame(timeFrame: TimeFrameCreateInput!): TimeFrame!
|
|
|
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
BIKEEVENT
|
|
|
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
createBikeEventType(name: String!): BikeEventType!
|
|
|
|
"creates new BikeEvent"
|
|
|
|
"creates new BikeEvent"
|
|
|
|
createBikeEvent(bikeEvent: BikeEventCreateInput): BikeEvent!
|
|
|
|
createBikeEvent(bikeEvent: BikeEventCreateInput!): BikeEvent!
|
|
|
|
"create participant"
|
|
|
|
"create participant"
|
|
|
|
createParticipant(participant: ParticipantCreateInput!): Participant!
|
|
|
|
createParticipant(participant: ParticipantCreateInput!): Participant!
|
|
|
|
createWorkshopType(workshopType: WorkshopTypeCreateInput!): WorkshopType!
|
|
|
|
createWorkshopType(workshopType: WorkshopTypeCreateInput!): WorkshopType!
|
|
|
|