src/schema/*: remove mandatory for fields

pull/24/head
leonnicolas 4 years ago
parent fadf128fa5
commit 4e33ec2095
No known key found for this signature in database
GPG Key ID: 088D0743E2B65C07

@ -65,7 +65,9 @@ export interface Lockable {
}
export class Security {
@Column()
@Column({
nullable: true
})
frameNumber: string;
@Column({
@ -190,9 +192,6 @@ export class CargoBike implements Lockable {
@PrimaryGeneratedColumn()
id: number;
@DeleteDateColumn()
deleteDate: Date;
@Column({
type: 'enum',
enum: Group
@ -268,19 +267,32 @@ export class CargoBike implements Lockable {
})
description: string;
@Column()
@Column({
nullable: true
})
modelName: string;
@Column()
@Column({
nullable: true
})
numberOfWheels: number;
@Column()
@Column({
type: 'boolean',
nullable: true
})
forCargo: boolean;
@Column()
@Column({
type: 'boolean',
nullable: true
})
forChildren: boolean;
@Column()
@Column({
type: 'int',
nullable: true
})
numberOfChildren: number;
@Column(type => TechnicalEquipment)
@ -290,6 +302,7 @@ export class CargoBike implements Lockable {
dimensionsAndLoad: DimensionsAndLoad;
@Column({
type: 'int',
nullable: true
})
lockedBy: number;

@ -45,12 +45,12 @@ export default gql`
numberOfWheels: Int
forCargo: Boolean
forChildren: Boolean
numberOfChildren: Int!
numberOfChildren: Int
"""
Safety is a custom type, that stores information about security features.
TODO: Should this be called Security?
"""
security: Security!
security: Security
"""
Does not refer to an extra table in the database.
"""
@ -102,15 +102,15 @@ export default gql`
group: Group!
name: String!
state: BikeState
modelName: String!
numberOfWheels: Int!
forCargo: Boolean!
forChildren: Boolean!
numberOfChildren: Int!
modelName: String
numberOfWheels: Int
forCargo: Boolean
forChildren: Boolean
numberOfChildren: Int
"""
Safety is a custom type, that stores information about security features.
"""
security: SecurityCreateInput!
security: SecurityCreateInput
"""
Does not refer to an extra table in the database.
"""
@ -360,7 +360,7 @@ export default gql`
So no id needed for mutation. One Mutation for the CargoBike will be enough.
"""
type Security {
frameNumber: String!
frameNumber: String
keyNumberFrameLock: String
keyNumberAXAChain: String
policeCoding: String
@ -368,7 +368,7 @@ export default gql`
}
input SecurityCreateInput {
frameNumber: String!
frameNumber: String
keyNumberFrameLock: String
keyNumberAXAChain: String
policeCoding: String

Loading…
Cancel
Save