diff --git a/src/model/CargoBike.ts b/src/model/CargoBike.ts index cbd1073..965651a 100644 --- a/src/model/CargoBike.ts +++ b/src/model/CargoBike.ts @@ -30,7 +30,6 @@ import { DeleteDateColumn } from 'typeorm'; import { Provider } from './Provider'; -import { Participant } from './Participant'; import { InsuranceData } from './InsuranceData'; import { TimeFrame } from './TimeFrame'; import { Taxes } from './Taxes'; @@ -205,6 +204,11 @@ export class CargoBike implements Lockable { }) name: string; + @Column({ + nullable: true + }) + state: string; + @OneToMany(type => Equipment, equipment => equipment.cargoBikeId, { nullable: true, eager: true diff --git a/src/schema/type-defs.ts b/src/schema/type-defs.ts index 557f3f8..e5847cc 100644 --- a/src/schema/type-defs.ts +++ b/src/schema/type-defs.ts @@ -38,7 +38,8 @@ export default gql` id: ID! "see column A in info tabelle" group: Group - name: String + name: String! + state: BikeState modelName: String numberOfWheels: Int forCargo: Boolean @@ -83,6 +84,15 @@ export default gql` lockedUntil: Date } + """ + Status of the CargoBike. More fields will be added, or removed. + """ + enum BikeState { + ACTIVE + INACTIVE + INPREPARATION + } + """ if you want to add bike to a lending station, create a new timeFrame with to: Date = null """ @@ -90,6 +100,7 @@ export default gql` "see column A in info tabelle" group: Group! name: String! + state: BikeState modelName: String! numberOfWheels: Int! forCargo: Boolean! @@ -134,6 +145,7 @@ export default gql` "see column A in info tabelle" group: Group name: String + state: BikeState modelName: String numberOfWheels: Int forCargo: Boolean