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
} 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

@ -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

Loading…
Cancel
Save