src/model schema: added bike Status

pull/23/head
leonnicolas 4 years ago
parent 2c8a5ea6b7
commit 321dc72123
No known key found for this signature in database
GPG Key ID: 088D0743E2B65C07

@ -30,7 +30,6 @@ import {
DeleteDateColumn DeleteDateColumn
} from 'typeorm'; } from 'typeorm';
import { Provider } from './Provider'; import { Provider } from './Provider';
import { Participant } from './Participant';
import { InsuranceData } from './InsuranceData'; import { InsuranceData } from './InsuranceData';
import { TimeFrame } from './TimeFrame'; import { TimeFrame } from './TimeFrame';
import { Taxes } from './Taxes'; import { Taxes } from './Taxes';
@ -205,6 +204,11 @@ export class CargoBike implements Lockable {
}) })
name: string; name: string;
@Column({
nullable: true
})
state: string;
@OneToMany(type => Equipment, equipment => equipment.cargoBikeId, { @OneToMany(type => Equipment, equipment => equipment.cargoBikeId, {
nullable: true, nullable: true,
eager: true eager: true

@ -38,7 +38,8 @@ export default gql`
id: ID! id: ID!
"see column A in info tabelle" "see column A in info tabelle"
group: Group group: Group
name: String name: String!
state: BikeState
modelName: String modelName: String
numberOfWheels: Int numberOfWheels: Int
forCargo: Boolean forCargo: Boolean
@ -83,6 +84,15 @@ export default gql`
lockedUntil: Date 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 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" "see column A in info tabelle"
group: Group! group: Group!
name: String! name: String!
state: BikeState
modelName: String! modelName: String!
numberOfWheels: Int! numberOfWheels: Int!
forCargo: Boolean! forCargo: Boolean!
@ -134,6 +145,7 @@ export default gql`
"see column A in info tabelle" "see column A in info tabelle"
group: Group group: Group
name: String name: String
state: BikeState
modelName: String modelName: String
numberOfWheels: Int numberOfWheels: Int
forCargo: Boolean forCargo: Boolean

Loading…
Cancel
Save